/* vi3i0nn.dev - Dark Monochromatic Cyber Minimalist Game UI */

@import url('https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400&family=JetBrains+Mono:wght@300;400;500;700&display=swap');

:root {
  --bg-color: #030304;
  --text-primary: #ffffff;
  --text-secondary: #8c8c94;
  --text-dim: #4c4c54;
  --text-highlight: #ffffff;
  --accent-glow: rgba(255, 255, 255, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.12);
  --border-active: rgba(255, 255, 255, 0.4);
  --font-mono: 'JetBrains Mono', 'Space Mono', ui-monospace, 'SF Mono', Monaco, monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
  background-color: var(--bg-color);
  background-image: radial-gradient(circle at 68% 46%, #080e1c 0%, #030408 55%, #010102 100%);
  color: var(--text-primary);
  font-family: var(--font-mono);
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* ==========================================================================
   Retro Pixel Cursor (Desktop fine pointer only)
   ========================================================================== */
@media (pointer: fine) {
  html, body, #canvas-container {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32' shape-rendering='crispEdges'%3E%3Cpath fill='%23000000' d='M0 0h1v1h-1zM0 1h2v1h-2zM0 2h1v1h-1zM2 2h1v1h-1zM0 3h1v1h-1zM3 3h1v1h-1zM0 4h1v1h-1zM4 4h1v1h-1zM0 5h1v1h-1zM5 5h1v1h-1zM0 6h1v1h-1zM6 6h1v1h-1zM0 7h1v1h-1zM7 7h1v1h-1zM0 8h1v1h-1zM8 8h1v1h-1zM0 9h1v1h-1zM10 9h1v1h-1zM0 10h1v1h-1zM7 10h5v1h-5zM0 11h1v1h-1zM3 11h1v1h-1zM6 11h1v1h-1zM0 12h1v1h-1zM2 12h1v1h-1zM5 12h1v1h-1zM8 12h1v1h-1zM0 13h2v1h-2zM5 13h1v1h-1zM8 13h1v1h-1zM0 14h1v1h-1zM6 14h1v1h-1zM9 14h1v1h-1zM6 15h1v1h-1zM9 15h1v1h-1zM7 16h1v1h-1zM10 16h1v1h-1zM7 17h1v1h-1zM10 17h1v1h-1zM8 18h2v1h-2z'/%3E%3Cpath fill='%23ffffff' d='M1 2h1v1h-1zM1 3h2v1h-2zM1 4h3v1h-3zM1 5h4v1h-4zM1 6h5v1h-5zM1 7h6v1h-6zM1 8h7v1h-7zM1 9h9v1h-9zM1 10h6v1h-6zM1 11h2v1h-2zM4 11h2v1h-2zM1 12h1v1h-1zM6 12h2v1h-2zM6 13h2v1h-2zM7 14h2v1h-2zM7 15h2v1h-2zM8 16h2v1h-2zM8 17h2v1h-2z'/%3E%3C/svg%3E") 0 0, auto;
  }

  *, *::before, *::after {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32' shape-rendering='crispEdges'%3E%3Cpath fill='%23000000' d='M0 0h1v1h-1zM0 1h2v1h-2zM0 2h1v1h-1zM2 2h1v1h-1zM0 3h1v1h-1zM3 3h1v1h-1zM0 4h1v1h-1zM4 4h1v1h-1zM0 5h1v1h-1zM5 5h1v1h-1zM0 6h1v1h-1zM6 6h1v1h-1zM0 7h1v1h-1zM7 7h1v1h-1zM0 8h1v1h-1zM8 8h1v1h-1zM0 9h1v1h-1zM10 9h1v1h-1zM0 10h1v1h-1zM7 10h5v1h-5zM0 11h1v1h-1zM3 11h1v1h-1zM6 11h1v1h-1zM0 12h1v1h-1zM2 12h1v1h-1zM5 12h1v1h-1zM8 12h1v1h-1zM0 13h2v1h-2zM5 13h1v1h-1zM8 13h1v1h-1zM0 14h1v1h-1zM6 14h1v1h-1zM9 14h1v1h-1zM6 15h1v1h-1zM9 15h1v1h-1zM7 16h1v1h-1zM10 16h1v1h-1zM7 17h1v1h-1zM10 17h1v1h-1zM8 18h2v1h-2z'/%3E%3Cpath fill='%23ffffff' d='M1 2h1v1h-1zM1 3h2v1h-2zM1 4h3v1h-3zM1 5h4v1h-4zM1 6h5v1h-5zM1 7h6v1h-6zM1 8h7v1h-7zM1 9h9v1h-9zM1 10h6v1h-6zM1 11h2v1h-2zM4 11h2v1h-2zM1 12h1v1h-1zM6 12h2v1h-2zM6 13h2v1h-2zM7 14h2v1h-2zM7 15h2v1h-2zM8 16h2v1h-2zM8 17h2v1h-2z'/%3E%3C/svg%3E") 0 0, auto;
  }

  a, button, [role="button"],
  .menu-item-btn, .project-link-btn:not(.btn-status),
  .contact-row-link, .sound-toggle-btn, .brand-logo,
  .settings-toggle-val, .slider-arrow-btn {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32' shape-rendering='crispEdges'%3E%3Cpath fill='%23000000' d='M5 0h2v1h-2zM4 1h1v1h-1zM7 1h1v1h-1zM4 2h1v1h-1zM7 2h1v1h-1zM4 3h1v1h-1zM7 3h1v1h-1zM4 4h1v1h-1zM7 4h1v1h-1zM11 4h2v1h-2zM4 5h1v1h-1zM7 5h1v1h-1zM10 5h1v1h-1zM13 5h1v1h-1zM1 6h2v1h-2zM4 6h1v1h-1zM7 6h1v1h-1zM10 6h1v1h-1zM13 6h1v1h-1zM0 7h1v1h-1zM3 7h2v1h-2zM7 7h1v1h-1zM10 7h1v1h-1zM13 7h1v1h-1zM15 7h1v1h-1zM0 8h1v1h-1zM3 8h2v1h-2zM7 8h2v1h-2zM10 8h1v1h-1zM13 8h1v1h-1zM15 8h1v1h-1zM1 9h1v1h-1zM8 9h2v1h-2zM12 9h2v1h-2zM16 9h1v1h-1zM2 10h1v1h-1zM16 10h1v1h-1zM2 11h1v1h-1zM16 11h1v1h-1zM2 12h1v1h-1zM16 12h1v1h-1zM3 13h1v1h-1zM15 13h1v1h-1zM4 14h1v1h-1zM14 14h1v1h-1zM5 15h9v1h-9z'/%3E%3Cpath fill='%23ffffff' d='M5 1h2v1h-2zM5 2h2v1h-2zM5 3h2v1h-2zM5 4h2v1h-2zM5 5h2v1h-2zM11 5h2v1h-2zM5 6h2v1h-2zM11 6h2v1h-2zM1 7h2v1h-2zM5 7h2v1h-2zM11 7h2v1h-2zM1 8h2v1h-2zM5 8h2v1h-2zM11 8h2v1h-2zM2 9h6v1h-6zM10 9h2v1h-2zM14 9h2v1h-2zM3 10h13v1h-13zM3 11h13v1h-13zM3 12h13v1h-13zM4 13h11v1h-11zM5 14h9v1h-9z'/%3E%3C/svg%3E") 6 1, pointer !important;
  }

  .btn-status, [style*="cursor: default"] {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32' shape-rendering='crispEdges'%3E%3Cpath fill='%23000000' d='M0 0h1v1h-1zM0 1h2v1h-2zM0 2h1v1h-1zM2 2h1v1h-1zM0 3h1v1h-1zM3 3h1v1h-1zM0 4h1v1h-1zM4 4h1v1h-1zM0 5h1v1h-1zM5 5h1v1h-1zM0 6h1v1h-1zM6 6h1v1h-1zM0 7h1v1h-1zM7 7h1v1h-1zM0 8h1v1h-1zM8 8h1v1h-1zM0 9h1v1h-1zM10 9h1v1h-1zM0 10h1v1h-1zM7 10h5v1h-5zM0 11h1v1h-1zM3 11h1v1h-1zM6 11h1v1h-1zM0 12h1v1h-1zM2 12h1v1h-1zM5 12h1v1h-1zM8 12h1v1h-1zM0 13h2v1h-2zM5 13h1v1h-1zM8 13h1v1h-1zM0 14h1v1h-1zM6 14h1v1h-1zM9 14h1v1h-1zM6 15h1v1h-1zM9 15h1v1h-1zM7 16h1v1h-1zM10 16h1v1h-1zM7 17h1v1h-1zM10 17h1v1h-1zM8 18h2v1h-2z'/%3E%3Cpath fill='%23ffffff' d='M1 2h1v1h-1zM1 3h2v1h-2zM1 4h3v1h-3zM1 5h4v1h-4zM1 6h5v1h-5zM1 7h6v1h-6zM1 8h7v1h-7zM1 9h9v1h-9zM1 10h6v1h-6zM1 11h2v1h-2zM4 11h2v1h-2zM1 12h1v1h-1zM6 12h2v1h-2zM6 13h2v1h-2zM7 14h2v1h-2zM7 15h2v1h-2zM8 16h2v1h-2zM8 17h2v1h-2z'/%3E%3C/svg%3E") 0 0, default !important;
  }
}

/* Background 3D Canvas Container */
#canvas-container {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: auto;
  cursor: grab;
}

#canvas-container:active {
  cursor: grabbing;
}

/* UI Overlay Layer */
#ui-root {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100%;
  height: 100dvh;
  z-index: 10;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3.5rem 4rem;
}

/* Top Navigation / Brand Bar */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: auto;
  width: 100%;
}

.brand-logo {
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.38em;
  color: var(--text-primary);
  text-transform: uppercase;
  text-decoration: none;
  transition: opacity 0.25s ease, text-shadow 0.25s ease;
  cursor: pointer;
}

.brand-logo:hover {
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.7);
  opacity: 0.9;
}

.top-controls {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.sound-toggle-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sound-toggle-btn:hover {
  border-color: var(--border-active);
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

/* Center Interactive Area */
.center-viewport {
  position: relative;
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  pointer-events: none;
}

/* Screen Panels */
.screen-panel {
  position: absolute;
  left: 0;
  width: 100%;
  max-width: 580px;
  max-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  pointer-events: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-15px);
  transition: opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.32s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.32s;
  padding-right: 6px;
  padding-bottom: 0.5rem;
}

.screen-panel::-webkit-scrollbar {
  width: 3px;
}

.screen-panel::-webkit-scrollbar-track {
  background: transparent;
}

.screen-panel::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 2px;
}

.screen-panel.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* Stagger Screen Transitions */
.screen-panel .stagger-item {
  opacity: 0;
  transform: translateY(12px) translateX(-8px);
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.screen-panel.active .stagger-item {
  opacity: 1;
  transform: translate(0);
}

/* Up to 8 stagger items (0.06s increments) */
.screen-panel.active .stagger-item:nth-child(1) { transition-delay: 0.06s; }
.screen-panel.active .stagger-item:nth-child(2) { transition-delay: 0.12s; }
.screen-panel.active .stagger-item:nth-child(3) { transition-delay: 0.18s; }
.screen-panel.active .stagger-item:nth-child(4) { transition-delay: 0.24s; }
.screen-panel.active .stagger-item:nth-child(5) { transition-delay: 0.30s; }
.screen-panel.active .stagger-item:nth-child(6) { transition-delay: 0.36s; }
.screen-panel.active .stagger-item:nth-child(7) { transition-delay: 0.42s; }
.screen-panel.active .stagger-item:nth-child(8) { transition-delay: 0.48s; }

/* Contacts list nested sequential cascade */
#contacts-panel.active .contacts-list .stagger-item:nth-child(1) { transition-delay: 0.12s; }
#contacts-panel.active .contacts-list .stagger-item:nth-child(2) { transition-delay: 0.18s; }
#contacts-panel.active .btn-back.stagger-item { transition-delay: 0.24s; }

/* Preserve hover interactions for staggered elements */
.screen-panel.active .menu-item-btn.stagger-item:hover,
.screen-panel.active .menu-item-btn.stagger-item:focus-visible {
  transform: translateX(6px);
}

.screen-panel.active .contact-row-link.stagger-item:hover {
  transform: translateX(4px);
}

/* Main Menu List */
.menu-list {
  display: flex;
  flex-direction: column;
  gap: 1.55rem;
  list-style: none;
}

.menu-item-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 1.05rem;
  letter-spacing: 0.26em;
  text-align: left;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: color 0.18s ease, transform 0.18s ease, text-shadow 0.18s ease;
  padding: 0.3rem 0;
  position: relative;
}

.menu-item-btn::before {
  content: '';
  display: inline-block;
  width: 0;
  height: 1px;
  background-color: var(--text-primary);
  margin-right: 0;
  opacity: 0;
  transition: width 0.2s ease, margin-right 0.2s ease, opacity 0.2s ease;
}

.menu-item-btn:hover,
.menu-item-btn.selected,
.menu-item-btn:focus-visible {
  color: var(--text-primary);
  outline: none;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
  transform: translateX(6px);
}

.menu-item-btn:hover::before,
.menu-item-btn.selected::before,
.menu-item-btn:focus-visible::before {
  width: 14px;
  margin-right: 12px;
  opacity: 0.85;
}

/* Section Header (Matches Screenshot 2: — НАСТРОЙКИ —) */
.section-header {
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.32em;
  color: var(--text-secondary);
  margin-bottom: 2.2rem;
  text-transform: uppercase;
}

/* Settings List (Faithful to Screenshot 2) */
.settings-list {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  margin-bottom: 2.5rem;
}

.settings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  letter-spacing: 0.22em;
  color: var(--text-primary);
  text-transform: uppercase;
  padding: 0.3rem 0;
}

.settings-label {
  color: var(--text-primary);
}

.settings-toggle-val {
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.2rem 0.6rem;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.settings-toggle-val:hover {
  border-color: var(--border-active);
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.slider-control {
  display: inline-flex;
  align-items: center;
  gap: 1.2rem;
  user-select: none;
}

.slider-arrow-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  padding: 0.2rem 0.5rem;
  cursor: pointer;
  transition: color 0.15s ease, transform 0.15s ease;
}

.slider-arrow-btn:hover {
  color: var(--text-primary);
  transform: scale(1.2);
}

.slider-value {
  min-width: 4.2rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-primary);
  letter-spacing: 0.15em;
}

.settings-footer-actions {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.8rem;
}

/* Content Details Styles (Projects, About, Stack, Contacts) */
.content-card-box {
  background: 
    linear-gradient(to right, rgba(255, 255, 255, 0.3) 1px, transparent 1px) 0 0 / 16px 1px no-repeat,
    linear-gradient(to bottom, rgba(255, 255, 255, 0.3) 1px, transparent 1px) 0 0 / 1px 16px no-repeat,
    linear-gradient(to left, rgba(255, 255, 255, 0.3) 1px, transparent 1px) 100% 0 / 16px 1px no-repeat,
    linear-gradient(to bottom, rgba(255, 255, 255, 0.3) 1px, transparent 1px) 100% 0 / 1px 16px no-repeat,
    linear-gradient(to right, rgba(255, 255, 255, 0.3) 1px, transparent 1px) 0 100% / 16px 1px no-repeat,
    linear-gradient(to top, rgba(255, 255, 255, 0.3) 1px, transparent 1px) 0 100% / 1px 16px no-repeat,
    linear-gradient(to left, rgba(255, 255, 255, 0.3) 1px, transparent 1px) 100% 100% / 16px 1px no-repeat,
    linear-gradient(to top, rgba(255, 255, 255, 0.3) 1px, transparent 1px) 100% 100% / 1px 16px no-repeat,
    rgba(8, 8, 12, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 1.6rem 1.8rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 0 transparent;
  transition: background-size 0.25s ease, box-shadow 0.25s ease;
}

.content-card-box:hover,
.content-card-box.active-3d {
  background: 
    linear-gradient(to right, rgba(255, 255, 255, 0.6) 1px, transparent 1px) 0 0 / 24px 1px no-repeat,
    linear-gradient(to bottom, rgba(255, 255, 255, 0.6) 1px, transparent 1px) 0 0 / 1px 24px no-repeat,
    linear-gradient(to left, rgba(255, 255, 255, 0.6) 1px, transparent 1px) 100% 0 / 24px 1px no-repeat,
    linear-gradient(to bottom, rgba(255, 255, 255, 0.6) 1px, transparent 1px) 100% 0 / 1px 24px no-repeat,
    linear-gradient(to right, rgba(255, 255, 255, 0.6) 1px, transparent 1px) 0 100% / 24px 1px no-repeat,
    linear-gradient(to top, rgba(255, 255, 255, 0.6) 1px, transparent 1px) 0 100% / 1px 24px no-repeat,
    linear-gradient(to left, rgba(255, 255, 255, 0.6) 1px, transparent 1px) 100% 100% / 24px 1px no-repeat,
    linear-gradient(to top, rgba(255, 255, 255, 0.6) 1px, transparent 1px) 100% 100% / 1px 24px no-repeat,
    rgba(8, 8, 12, 0.65);
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.06), inset 0 0 25px rgba(255, 255, 255, 0.03);
  animation: cornerPulse 2s ease-in-out infinite;
}

@keyframes cornerPulse {
  0%, 100% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
}

.card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}

.card-title {
  font-size: 1.1rem;
  letter-spacing: 0.24em;
  color: var(--text-primary);
  text-transform: uppercase;
}

.card-badge {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.35);
  padding: 0.2rem 0.5rem;
  background: rgba(74, 222, 128, 0.08);
}

.card-badge.concept {
  color: var(--text-secondary);
  border-color: var(--border-subtle);
  background: transparent;
}

.card-desc {
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
  margin-bottom: 1.1rem;
}

.card-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.3rem;
}

.spec-pill {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--border-subtle);
}

.project-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-active);
  background: rgba(255, 255, 255, 0.04);
  transition: all 0.2s ease;
  cursor: pointer;
}

.project-link-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.project-link-btn.btn-status {
  cursor: default;
  transform: none;
  box-shadow: none;
}

.project-link-btn.btn-status:hover {
  background: rgba(255, 255, 255, 0.04);
  transform: none;
  box-shadow: none;
}

/* Stack Grid */
.stack-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
  margin-bottom: 1.8rem;
  max-height: 48vh;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.stack-grid::-webkit-scrollbar {
  width: 3px;
}
.stack-grid::-webkit-scrollbar-thumb {
  background: var(--border-active);
}

.stack-category-title {
  font-size: 0.8rem;
  letter-spacing: 0.24em;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.stack-items {
  font-size: 0.85rem;
  line-height: 1.6;
  letter-spacing: 0.1em;
  color: var(--text-primary);
}

/* Contacts Links List */
.contacts-list {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-bottom: 2rem;
}

.contact-row-link {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 1.1rem;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  transition: all 0.2s ease;
}

.contact-row-link::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: #ffffff;
  opacity: 0;
  pointer-events: none;
}

.contact-row-link:hover {
  border-color: var(--border-active);
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(4px);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.1);
}

.contact-row-link:hover::after {
  opacity: 0.15;
  animation: scanLine 1.2s linear infinite;
}

@keyframes scanLine {
  0% {
    top: 0%;
  }
  100% {
    top: 100%;
  }
}

.contact-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
  letter-spacing: 0.12em;
}

/* Bottom Bar / Build Watermark (Matches Screenshot 1: СБОРКА 0.1.0-ALPHA) */
.bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  pointer-events: auto;
  width: 100%;
}

.build-watermark {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.audio-hint {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: var(--text-secondary);
  opacity: 0.7;
  transition: opacity 0.3s ease;
  animation: pulseHint 3s infinite;
}

@keyframes pulseHint {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.9; }
}

/* PS2 CRT Cathode Ray Tube & Phosphor Glow Overlay (Active) */
.crt-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 50;
  opacity: 1;
  background: 
    linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.40) 50%),
    linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.03));
  background-size: 100% 3px, 6px 100%;
  box-shadow: 
    inset 0 0 140px rgba(0, 0, 0, 0.90),
    inset 0 0 50px rgba(0, 0, 0, 0.95);
  animation: crtFlicker 0.14s infinite;
}

@keyframes crtFlicker {
  0% { opacity: 0.975; }
  50% { opacity: 1; }
  100% { opacity: 0.985; }
}

.crt-overlay::after {
  content: '';
  display: block;
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 140px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0));
  opacity: 0.7;
  pointer-events: none;
  animation: crtScanlineSweep 7s linear infinite;
}

@keyframes crtScanlineSweep {
  0% { transform: translateY(-140px); }
  100% { transform: translateY(100vh); }
}

/* Responsive adjustments (Tablets & Mobile) */
@media (max-width: 900px) {
  #ui-root {
    padding: max(1.4rem, env(safe-area-inset-top)) max(1.4rem, env(safe-area-inset-right)) max(1.4rem, env(safe-area-inset-bottom)) max(1.4rem, env(safe-area-inset-left));
    gap: 0.8rem;
  }

  .top-bar {
    align-items: center;
  }

  .brand-logo {
    font-size: 1.05rem;
    letter-spacing: 0.30em;
  }

  .sound-toggle-btn {
    font-size: 0.72rem;
    padding: 0.5rem 0.85rem;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    letter-spacing: 0.16em;
  }

  .center-viewport {
    align-items: flex-start;
    padding-top: 0.5rem;
  }

  .screen-panel {
    max-width: 100%;
    max-height: calc(100dvh - 145px);
    padding-bottom: 2rem;
  }

  .menu-list {
    gap: 1.3rem;
    padding: 1.2rem 0;
  }

  .menu-item-btn {
    font-size: 1.15rem;
    letter-spacing: 0.22em;
    padding: 0.75rem 0;
    min-height: 48px;
    width: 100%;
  }

  .section-header {
    font-size: 0.85rem;
    letter-spacing: 0.24em;
    margin-bottom: 1.4rem;
  }

  .content-card-box {
    padding: 1.35rem 1.35rem;
    margin-bottom: 1.2rem;
    cursor: pointer;
  }

  .card-title {
    font-size: 1.05rem;
  }

  .card-badge {
    font-size: 0.68rem;
    padding: 0.2rem 0.45rem;
  }

  .card-desc {
    font-size: 0.82rem;
    line-height: 1.55;
    margin-bottom: 1.0rem;
  }

  .project-link-btn {
    font-size: 0.82rem;
    letter-spacing: 0.16em;
    padding: 0.7rem 1rem;
    min-height: 44px;
    width: 100%;
    justify-content: center;
  }

  .btn-back {
    font-size: 0.95rem;
    min-height: 48px;
    padding: 0.8rem 0;
    width: 100%;
    margin-top: 0.5rem;
  }

  .contacts-list {
    gap: 1.0rem;
    margin-bottom: 1.5rem;
  }

  .contact-row-link {
    min-height: 52px;
    padding: 0.85rem 1.1rem;
    font-size: 0.88rem;
  }

  .bottom-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    padding-top: 0.4rem;
  }

  .build-watermark {
    font-size: 0.66rem;
    letter-spacing: 0.18em;
  }

  .crt-overlay::after {
    animation-duration: 11s;
    opacity: 0.35;
  }
}

/* Small Smart Phones (iPhone SE, Galaxy S, 320px - 480px) */
@media (max-width: 480px) {
  #ui-root {
    padding: max(1.0rem, env(safe-area-inset-top)) max(1.0rem, env(safe-area-inset-right)) max(1.0rem, env(safe-area-inset-bottom)) max(1.0rem, env(safe-area-inset-left));
    gap: 0.6rem;
  }

  .screen-panel {
    max-height: calc(100dvh - 125px);
  }

  .brand-logo {
    font-size: 0.95rem;
    letter-spacing: 0.22em;
  }

  .sound-toggle-btn {
    font-size: 0.66rem;
    padding: 0.4rem 0.65rem;
    min-height: 38px;
  }

  .menu-item-btn {
    font-size: 1.05rem;
    padding: 0.65rem 0;
  }

  .content-card-box {
    padding: 1.1rem 1.05rem;
    margin-bottom: 0.95rem;
  }

  .card-title {
    font-size: 0.98rem;
    letter-spacing: 0.18em;
  }

  .card-desc {
    font-size: 0.78rem;
    line-height: 1.5;
  }

  .project-link-btn {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    padding: 0.65rem 0.8rem;
  }

  .contact-row-link {
    padding: 0.75rem 0.9rem;
    font-size: 0.8rem;
  }

  .build-watermark {
    font-size: 0.60rem;
    letter-spacing: 0.15em;
  }
}
