/* Glassmorphic Card base */
.glass-card {
  background: var(--surface);
  border-radius: var(--border-radius-lg);
  border: 2px solid var(--glass-border);
  box-shadow: var(--card-shadow);
  padding: 2.5rem;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), background var(--transition-normal), border var(--transition-normal);
  position: relative;
}

/* Corner HUD markers for gamification */
.glass-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  width: 14px;
  height: 14px;
  border-top: 3px solid var(--accent);
  border-left: 3px solid var(--accent);
  border-top-left-radius: var(--border-radius-sm);
  pointer-events: none;
  transition: border-color var(--transition-normal);
}

.glass-card::after {
  content: '';
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  border-bottom: 3px solid var(--accent);
  border-right: 3px solid var(--accent);
  border-bottom-right-radius: var(--border-radius-sm);
  pointer-events: none;
  transition: border-color var(--transition-normal);
}

[data-theme="dark"] .glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* Home Hub Grid */
.home-hub {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1rem;
}

@media (min-width: 640px) {
  .home-hub {
    grid-template-columns: repeat(2, 1fr);
  }
}

.test-card {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 2rem;
  position: relative;
  text-decoration: none;
  color: inherit;
}

.test-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.25);
}

[data-theme="dark"] .test-card:hover {
  box-shadow: 0 12px 40px rgba(129, 140, 248, 0.15);
  border-color: rgba(129, 140, 248, 0.25);
}

.test-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.test-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--border-radius-md);
  background: rgba(99, 102, 241, 0.08);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-normal), color var(--transition-normal);
}

.test-card:hover .test-card-icon {
  background: var(--accent);
  color: var(--accent-contrast);
}

.test-card-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.test-card-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.test-card-description {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.test-card-pb {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.02);
  padding: 0.5rem 0.75rem;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--glass-border);
}

[data-theme="dark"] .test-card-pb {
  background: rgba(255, 255, 255, 0.02);
}

.test-card-pb-value {
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-mono);
}

/* Common Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  cursor: pointer;
  border: 1px solid transparent;
  min-height: 44px;
  user-select: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
  box-shadow: 0 4px 14px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-secondary {
  background: transparent;
  border-color: var(--glass-border);
  color: var(--text);
}

.btn-secondary:hover {
  background: rgba(0, 0, 0, 0.02);
  border-color: var(--text-muted);
}

[data-theme="dark"] .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.04);
}

.btn-danger {
  background: var(--danger);
  color: white;
  box-shadow: 0 4px 14px var(--danger-glow);
}

.btn-danger:hover {
  background: #dc2626;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Custom Styled Select (Duration/Round count) */
.custom-select-container {
  position: relative;
  display: inline-block;
  min-width: 140px;
}

.custom-select {
  width: 100%;
  padding: 0.6rem 2.5rem 0.6rem 1rem;
  border-radius: var(--border-radius-pill);
  border: 1px solid var(--glass-border);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

[data-theme="dark"] .custom-select {
  background: var(--surface);
}

.custom-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.custom-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.custom-select-arrow {
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  pointer-events: none;
  fill: var(--text-muted);
  transition: fill var(--transition-fast);
}

.custom-select:focus + .custom-select-arrow {
  fill: var(--accent);
}

/* SVG Timer Ring */
.timer-container {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timer-svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.timer-bg-circle {
  fill: none;
  stroke: var(--glass-border);
  stroke-width: 8;
}

.timer-progress-circle {
  fill: none;
  stroke: var(--accent);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.1s linear;
}

.timer-text {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

/* Results Card styling */
.results-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: cardFadeIn 0.4s ease forwards;
}

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pb-badge {
  background: var(--success-glow);
  color: var(--success);
  border: 1px solid var(--success);
  padding: 0.4rem 1rem;
  border-radius: var(--border-radius-pill);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  animation: pulseBadge 2s infinite;
}

@keyframes pulseBadge {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  70% { transform: scale(1.03); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.results-title {
  font-size: 1rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.results-primary {
  font-size: 3.5rem;
  font-weight: 800;
  font-family: var(--font-sans);
  color: var(--text);
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.results-primary span {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 0.25rem;
}

.results-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  width: 100%;
  margin-bottom: 2rem;
}

.result-stat-box {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid var(--glass-border);
  padding: 1rem;
  border-radius: var(--border-radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 1 calc(50% - 0.625rem);
  box-sizing: border-box;
}

@media (min-width: 480px) {
  .result-stat-box {
    flex: 0 1 calc(33.333% - 0.85rem);
  }
}

[data-theme="dark"] .result-stat-box {
  background: rgba(255, 255, 255, 0.01);
}

.result-stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.result-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text);
}

.results-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* History Sparkline */
.sparkline-container {
  width: 100%;
  height: 80px;
  margin: 1rem 0 2rem;
  border-radius: var(--border-radius-md);
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.01);
  border: 1px dashed var(--glass-border);
}

[data-theme="dark"] .sparkline-container {
  background: rgba(255, 255, 255, 0.01);
}

.sparkline-path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sparkline-fill {
  fill: url(#sparkline-gradient);
  stroke: none;
}

.sparkline-dot {
  fill: var(--accent-contrast);
  stroke: var(--accent);
  stroke-width: 2;
}

/* Standard Table styling */
.history-table-container {
  width: 100%;
  overflow-x: auto;
  margin-top: 1.5rem;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--glass-border);
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.history-table th {
  background: rgba(0, 0, 0, 0.02);
  padding: 0.75rem 1rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--glass-border);
}

[data-theme="dark"] .history-table th {
  background: rgba(255, 255, 255, 0.02);
}

.history-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--glass-border);
  font-family: var(--font-mono);
}

.history-table tr:last-child td {
  border-bottom: none;
}

/* Achievements / Gamified Badges */
.gamer-achievements-title {
  font-size: 1.25rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.gamer-achievements-title::before {
  content: '//';
  color: var(--accent);
  font-weight: 800;
}

.gamer-achievements-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .gamer-achievements-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.25rem 1rem;
  border-radius: var(--border-radius-md);
  border: 1px dashed var(--glass-border);
  transition: all var(--transition-normal);
  background: rgba(0, 0, 0, 0.01);
  position: relative;
}

.badge-icon {
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
  transition: transform var(--transition-fast);
}

.badge-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.badge-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Unlocked State */
.badge-unlocked {
  background: var(--surface);
  border: 2px solid var(--accent);
  box-shadow: 0 4px 12px var(--accent-glow);
}

[data-theme="dark"] .badge-unlocked {
  background: rgba(168, 85, 247, 0.05);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.15);
}

.badge-unlocked:hover {
  transform: translateY(-2px);
}

.badge-unlocked:hover .badge-icon {
  transform: scale(1.15) rotate(5deg);
}

/* Locked State */
.badge-locked {
  opacity: 0.4;
  filter: grayscale(100%);
}

.badge-locked::after {
  content: '🔒';
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 0.75rem;
}

/* ==========================================
   Custom Dropdown Component Styles (frosted glass)
   ========================================== */
.custom-dropdown {
  position: relative;
  display: inline-block;
  user-select: none;
  z-index: 100;
}

.custom-dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 1.25rem;
  border-radius: var(--border-radius-pill);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  outline: none;
  min-width: 140px;
}

.custom-dropdown-trigger:hover:not(:disabled) {
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
  background: var(--surface);
}

.custom-dropdown-trigger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.custom-dropdown-arrow {
  width: 16px;
  height: 16px;
  fill: currentColor;
  transition: transform var(--transition-fast);
}

.custom-dropdown-trigger.open .custom-dropdown-arrow {
  transform: rotate(180deg);
}

.custom-dropdown-options {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 100%;
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-md);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--transition-fast) ease, transform var(--transition-fast) ease, visibility var(--transition-fast);
  z-index: 110;
  overflow: hidden;
  padding: 0.25rem 0;
}

[data-theme="dark"] .custom-dropdown-options {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
}

.custom-dropdown-options.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.custom-dropdown-option {
  padding: 0.6rem 1.25rem;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}

.custom-dropdown-option:hover {
  background: rgba(99, 102, 241, 0.08);
  color: var(--accent);
}

[data-theme="dark"] .custom-dropdown-option:hover {
  background: rgba(168, 85, 247, 0.1);
  color: var(--accent);
}

.custom-dropdown-option.selected {
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 700;
}

/* ==========================================
   Clicking, Typing & Reaction Methods Section Styles
   ========================================== */
.clicking-methods-section,
.typing-methods-section,
.reaction-methods-section {
  text-align: left;
}

.clicking-methods-section .section-title,
.typing-methods-section .section-title,
.reaction-methods-section .section-title {
  font-size: 1.75rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
  text-align: center;
}

.clicking-methods-section .section-subtitle,
.typing-methods-section .section-subtitle,
.reaction-methods-section .section-subtitle {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 2rem;
  letter-spacing: 0.1em;
}

.methods-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.method-card {
  display: flex;
  flex-direction: column;
}

.method-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.method-title::before {
  content: '//';
  font-weight: 800;
  color: var(--accent);
}

.method-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text);
  opacity: 0.95;
  margin-bottom: 0.5rem;
}

.video-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 1.25rem;
}

.video-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  overflow: hidden;
  transition: transform var(--transition-fast) ease, border-color var(--transition-fast) ease, box-shadow var(--transition-fast) ease;
}

.video-card:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: var(--accent);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.video-thumbnail-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

.video-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal) ease;
  display: block;
}

.video-card:hover .video-thumbnail {
  transform: scale(1.05);
}

.video-play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
  transition: opacity var(--transition-fast) ease, background var(--transition-fast) ease;
}

.video-card:hover .video-play-overlay {
  opacity: 1;
  background: rgba(0, 0, 0, 0.2);
}

.video-play-overlay svg {
  width: 44px;
  height: 44px;
  fill: var(--accent-contrast);
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
  transition: transform var(--transition-fast) ease, fill var(--transition-fast) ease;
}

.video-card:hover .video-play-overlay svg {
  transform: scale(1.15);
  fill: var(--accent);
}

.video-caption {
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  border-top: 1px solid var(--glass-border);
  flex-grow: 1;
  transition: color var(--transition-fast) ease;
}

.video-card:hover .video-caption {
  color: var(--accent);
}

.method-separator {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-border) 20%, var(--glass-border) 80%, transparent);
  margin: 1.5rem 0;
}

@media (max-width: 640px) {
  .clicking-methods-section,
  .typing-methods-section,
  .reaction-methods-section {
    padding: 1.5rem;
  }
  .video-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* ==========================================
   Network Status Toast (Cybernetic HUD Toast)
   ========================================== */
.network-status-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000; /* Ensure it floats above the header navbar (z-index: 1000) */
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1.5rem;
  border-radius: var(--border-radius-md);
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 2px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  transform: translateY(150%);
  opacity: 0;
  transition: transform var(--transition-normal), opacity var(--transition-normal);
  pointer-events: auto;
}

.network-status-toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Corner HUD markers for network toast */
.network-status-toast::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  width: 10px;
  height: 10px;
  border-top: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
  border-top-left-radius: var(--border-radius-sm);
  pointer-events: none;
}

.network-status-toast::after {
  content: '';
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-bottom: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
  border-bottom-right-radius: var(--border-radius-sm);
  pointer-events: none;
}

.network-status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--success);
  box-shadow: 0 0 8px var(--success-glow);
  transition: background var(--transition-normal), box-shadow var(--transition-normal);
}

.network-status-toast.offline .network-status-indicator {
  background: var(--warning);
  box-shadow: 0 0 8px rgba(234, 88, 12, 0.45);
}

.network-status-content {
  display: flex;
  flex-direction: column;
}

.network-status-text {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.network-status-subtext {
  color: var(--text-muted);
  font-size: 0.72rem;
  margin-top: 0.15rem;
}

@media (max-width: 640px) {
  .network-status-toast {
    bottom: 16px;
    left: 16px;
    right: 16px;
    justify-content: center;
  }
}

/* ==========================================
   Video Player Modal Overlay
   ========================================== */
.video-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.video-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 12, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.video-modal-content {
  position: relative;
  width: 100%;
  max-width: 800px;
  background: var(--surface);
  border-radius: var(--border-radius-lg);
  border: 2px solid var(--glass-border);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  padding: 1.5rem;
  z-index: 10;
  animation: modalScaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalScaleIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.video-modal-close {
  position: absolute;
  top: -16px;
  right: -16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-contrast);
  border: 2px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px var(--accent-glow);
  transition: transform var(--transition-fast), background-color var(--transition-fast);
  z-index: 20;
}

.video-modal-close:hover {
  transform: scale(1.1) rotate(90deg);
  background: var(--accent-hover);
}

.video-modal-close svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.video-modal-player-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.video-modal-player-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.video-modal-info {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.video-modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
}

/* Ensure Side Ad Gutters stay active/visible above backdrop */
.ad-gutter {
  z-index: 3100;
}
