/* ============================================
   SHARED COMPONENTS — concrete-jungle.jp
   Depends on: tokens.css
   ============================================ */

/* === CUSTOM CURSOR === */
.cursor-dot {
  width: 8px;
  height: 8px;
  background: var(--color-neon-pink);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: var(--z-cursor);
  transform: translate(-50%, -50%);
  transition: transform var(--duration-fast);
}

.cursor-ring {
  width: 40px;
  height: 40px;
  border: 2px solid var(--color-neon-pink);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: calc(var(--z-cursor) - 1);
  opacity: 0.5;
  transform: translate(-50%, -50%);
  transition:
    transform var(--duration-normal),
    width var(--duration-normal),
    height var(--duration-normal);
}

.cursor-dot.is-hovering {
  transform: translate(-50%, -50%) scale(2);
  background: var(--color-neon-cyan);
}

.cursor-ring.is-hovering {
  width: 60px;
  height: 60px;
  border-color: var(--color-neon-cyan);
  opacity: 0.3;
  transform: translate(-50%, -50%);
}

/* === MOUSE AURA === */
.mouse-aura {
  position: fixed;
  top: 0;
  left: 0;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(140, 0, 255, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
  pointer-events: none;
  z-index: 9999; /* 全面のコンテンツの上に薄く被せる */
  transform: translate(-50%, -50%);
  mix-blend-mode: screen;
}

/* === PARTICLES CANVAS === */
.particles-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9998; /* コンテンツの上、オーラの下 */
  mix-blend-mode: screen;
}

/* === LOADER === */
.loader {
  position: fixed;
  inset: 0;
  background: #000000;
  z-index: var(--z-loader);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s;
}

.loader.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.loader__screen {
  width: 600px;
  max-width: 90vw;
}

.loader__lines p {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--color-neon-green);
  opacity: 0;
  margin-bottom: var(--space-xs);
  white-space: nowrap;
  overflow: hidden;
}

.loader__lines p.is-typed {
  opacity: 1;
}

.loader__progress {
  width: 100%;
  height: 4px;
  background: var(--color-bg-elevated);
  border-radius: 2px;
  margin-top: var(--space-lg);
  overflow: hidden;
}

.loader__progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--color-neon-pink), var(--color-neon-cyan));
  border-radius: 2px;
  transition: width 0.1s linear;
}

.loader__status {
  margin-top: var(--space-sm);
  text-align: right;
}

/* === POPUP OVERLAY === */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: calc(var(--z-popup) - 1);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-normal);
}

.popup-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* === POPUP WINDOW === */
.popup-window {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 500px;
  max-width: 90vw;
  max-height: 80vh;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  z-index: var(--z-popup);
  opacity: 0;
  pointer-events: none;
  transition:
    transform var(--duration-normal) var(--ease-out-expo),
    opacity var(--duration-normal);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.popup-window.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.popup-window__titlebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  background: var(--color-bg-elevated);
  border-bottom: 1px solid var(--color-border);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  cursor: grab;
  user-select: none;
}

.popup-window__title {
  font-size: var(--fs-small);
  color: var(--color-text-muted);
}

.popup-window__controls {
  display: flex;
  gap: var(--space-xs);
}

.popup-window__btn {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  font-size: 10px;
  line-height: 14px;
  text-align: center;
  color: transparent;
  transition: color var(--duration-fast);
}

.popup-window__btn:hover {
  color: var(--color-bg-primary);
}

.popup-window__btn--close { background: #ff5f57; }
.popup-window__btn--minimize { background: #febc2e; }
.popup-window__btn--maximize { background: #28c840; }

.popup-window__body {
  padding: var(--space-lg);
  overflow-y: auto;
  max-height: calc(80vh - 40px);
}

.popup-window__body h3 { margin-bottom: var(--space-sm); }
.popup-window__body p { margin-bottom: var(--space-md); }

.popup-window__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.popup-window__tag {
  padding: var(--space-xs) var(--space-sm);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--fs-small);
  color: var(--color-text-muted);
}

/* === MARQUEE === */
.marquee {
  width: 100%;
  overflow: hidden;
  padding: var(--space-md) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 20s linear infinite;
}

.marquee__track--reverse {
  animation-direction: reverse;
}

.marquee__text {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.5rem);
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: var(--ls-ultra);
  white-space: nowrap;
  padding-right: var(--space-lg);
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
