:root {
    --bg: #0b1021;
    --panel: #0f172a;
    --panel-2: #111a31;
    --text: #e5e7ef;
    --muted: #93a4c4;
    --accent: #4ade80;
    --accent-strong: #22c55e;
    --outline: rgba(255, 255, 255, 0.08);
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: 12px;
    top: 12px;
    background: #f8fafc;
    color: #0b1021;
    padding: 10px 14px;
    border-radius: 10px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 50;
}

.skip-link:not(:focus):not(:focus-visible) {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
    box-shadow: none;
    transform: none;
}

.skip-link:focus,
.skip-link:focus-visible {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

body {
    margin: 0;
    padding: 32px 20px 48px;
    font-family: 'Space Grotesk', 'Inter', system-ui, -apple-system, sans-serif;
    background: radial-gradient(100% 120% at 10% 10%, rgba(74, 222, 128, 0.07), rgba(37, 99, 235, 0)) , radial-gradient(90% 90% at 80% 0%, rgba(59, 130, 246, 0.08), rgba(8, 47, 73, 0)), linear-gradient(135deg, #090c1b 0%, #0b1021 55%, #0d1329 100%);
    color: var(--text);
}

.bg-video {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.18;
    mix-blend-mode: screen;
}

.bg-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.8) blur(1px);
}

.page-shell {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.hero {
    background: linear-gradient(120deg, rgba(74, 222, 128, 0.08), rgba(59, 130, 246, 0.08) 60%, rgba(14, 165, 233, 0.05));
    border: 1px solid var(--outline);
    border-radius: calc(var(--radius) + 6px);
    padding: 28px 28px;
    box-shadow: var(--shadow);
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.hero-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.a11y-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
    color: #f1f5f9;
    font-weight: 800;
    font-size: 13px;
    text-decoration: none;
    transition: border-color 0.2s, transform 0.15s ease, background 0.2s;
    position: absolute;
    top: 14px;
    right: 14px;
}

.a11y-switch:hover {
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.12);
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    color: var(--muted);
    font-size: 12px;
    margin: 0 0 8px;
}

h1, h2 {
    margin: 0 0 6px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

h1 {
    font-size: 30px;
    line-height: 1.2;
}

h2 {
    font-size: 22px;
    line-height: 1.2;
}

.lede {
    margin: 6px 0 0;
    font-size: 15px;
    color: var(--muted);
    max-width: 640px;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--outline);
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
    box-shadow: var(--shadow);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--muted);
    display: inline-block;
    flex-shrink: 0;
}

.dot.live {
    background: #ef4444;
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.18);
    animation: pulse 1.8s infinite;
}

.dot.tiny {
    width: 8px;
    height: 8px;
}

.dot.live.tiny {
    background: #f87171;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.14);
    opacity: 0.9;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.2); }
    70% { box-shadow: 0 0 0 18px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.2); }
}

.panel {
    background: var(--panel);
    border: 1px solid var(--outline);
    border-radius: var(--radius);
    padding: 18px 20px 14px;
    box-shadow: var(--shadow);
}

.panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    gap: 10px;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.current-time-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.current-time-text {
    font-weight: 800;
    font-size: 18px;
    color: #f8fbff;
}

.time-hint {
    color: var(--muted);
    font-size: 13px;
}

.tz-selectors {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

#search-input {
    width: 100%;
    padding: 14px 14px;
    font-size: 15px;
    border-radius: 12px;
    border: 1px solid var(--outline);
    background: var(--panel-2);
    color: var(--text);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#search-input:focus {
    border-color: rgba(74, 222, 128, 0.35);
    box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.18);
}

.day-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-btn {
    padding: 10px 12px;
    font-size: 14px;
    border-radius: 12px;
    border: 1px solid var(--outline);
    background: var(--panel-2);
    color: var(--text);
    cursor: pointer;
    transition: transform 0.15s ease, background 0.2s, border-color 0.2s;
}

.filter-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(148, 163, 184, 0.35);
}

.filter-btn.active {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.18), rgba(34, 197, 94, 0.2));
    border-color: rgba(74, 222, 128, 0.5);
    color: #e9ffee;
}

.upcoming-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.skeleton {
    position: relative;
    overflow: hidden;
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--outline);
    border-radius: 14px;
    padding: 14px;
}

.skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.07), transparent);
    transform: translateX(-100%);
    animation: shimmer 1.6s infinite;
}

.skeleton-line {
    height: 12px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    margin: 8px 0;
}

.skeleton-line.short {
    width: 40%;
}

.skeleton-line.medium {
    width: 65%;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

.meeting {
    position: relative;
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--outline);
    border-radius: 14px;
    padding: 14px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    transition: transform 0.15s ease, border-color 0.2s, box-shadow 0.2s;
}

.meeting:hover {
    transform: translateY(-2px);
    border-color: rgba(74, 222, 128, 0.35);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.meeting-details {
    flex: 1;
    min-width: 0;
}

.fade-in {
    opacity: 0;
    transform: translateY(8px);
    animation: fadeUp 0.6s ease-out forwards;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.platform-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #0b1021;
    background: rgba(255, 255, 255, 0.6);
    opacity: 0.6;
}

.platform-zoom {
    background: linear-gradient(135deg, #c7d2fe, #60a5fa);
    opacity: 0.65;
}

.platform-discord {
    background: linear-gradient(135deg, #c7d2fe, #a78bfa);
    opacity: 0.65;
}

.platform-meet {
    background: linear-gradient(135deg, #bbf7d0, #34d399);
    opacity: 0.65;
}

.platform-link {
    background: linear-gradient(135deg, #e5e7eb, #cbd5e1);
    opacity: 0.55;
}

  .meeting-name {
      font-weight: 700;
      font-size: 16px;
      margin-bottom: 4px;
      color: #f7f9ff;
  }

  .platform-row {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      margin: 4px 0;
  }

  .meeting-time {
      color: var(--muted);
      font-size: 14px;
  }

  .meeting-meta {
      color: var(--muted);
      font-size: 13px;
  }

  .meeting-info {
      position: relative;
      display: inline-flex;
      align-items: center;
      margin-top: 0;
      z-index: 2;
  }

  .info-button {
      width: 22px;
      height: 22px;
      border-radius: 50%;
      border: 1px solid var(--outline);
      background: rgba(255, 255, 255, 0.06);
      color: #e2e8f0;
      font-weight: 800;
      font-size: 11px;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      transition: transform 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  }

  .info-button:hover,
  .info-button:focus-visible {
      transform: translateY(-1px);
      border-color: rgba(74, 222, 128, 0.6);
      background: rgba(74, 222, 128, 0.14);
      box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
      outline: none;
  }

  .info-bubble {
      position: absolute;
      top: 30px;
      left: 0;
      background: rgba(15, 23, 42, 0.95);
      color: #f8fafc;
      border: 1px solid rgba(226, 232, 240, 0.16);
      border-radius: 14px;
      box-shadow: 0 18px 42px rgba(0, 0, 0, 0.45);
      padding: 12px 14px;
      min-width: 240px;
      max-width: 340px;
      font-size: 12px;
      line-height: 1.5;
      z-index: 20;
  }

  .info-bubble::before {
      content: '';
      position: absolute;
      top: -8px;
      left: 16px;
      border-width: 0 8px 8px 8px;
      border-style: solid;
      border-color: transparent transparent rgba(15, 23, 42, 0.95) transparent;
      filter: drop-shadow(0 -1px 1px rgba(0, 0, 0, 0.3));
  }

  .meeting-info:not(.open) .info-bubble {
      display: none;
  }

  .meeting-countdown {
      color: var(--muted);
      font-size: 13px;
      margin-top: 4px;
      display: inline-flex;
    align-items: center;
    gap: 6px;
}

.join-button {
    white-space: nowrap;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #082f15;
    padding: 10px 12px;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    border: none;
    box-shadow: 0 10px 25px rgba(34, 197, 94, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.join-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 30px rgba(34, 197, 94, 0.45);
}

.accordion {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

details.day-block {
    border: 1px solid var(--outline);
    border-radius: 14px;
    overflow: hidden;
    background: var(--panel-2);
    transition: border-color 0.2s, box-shadow 0.2s;
}

details.day-block[open] {
    border-color: rgba(74, 222, 128, 0.4);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}

.day-summary {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    list-style: none;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
}

summary::-webkit-details-marker {
    display: none;
}

.day-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.badge {
    color: #0b1021;
    background: rgba(74, 222, 128, 0.85);
    border-radius: 50px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
}

.chevron {
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg);
    transition: transform 0.2s;
}

details[open] .chevron {
    transform: rotate(-135deg);
}

.day-body {
    padding: 12px 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(255, 255, 255, 0.02);
}

.empty-state {
    padding: 14px;
    color: var(--muted);
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 14px;
}

.admin-card {
    background: var(--panel-2);
    border: 1px solid var(--outline);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: var(--shadow);
}

.card-heading h3 {
    margin: 0 0 4px;
    font-size: 18px;
}

.card-note {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.collapsible-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.collapsible-body {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-day-filters {
    margin-bottom: 8px;
}

.day-view {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.day-view-block {
    border: 1px solid var(--outline);
    border-radius: var(--radius);
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
}

.day-view-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.day-view-head h4 {
    margin: 0;
    font-size: 16px;
}

.day-view-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.day-slot {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    border: 1px solid var(--outline);
    border-radius: 12px;
    padding: 10px 12px;
    background: #0c1427;
    flex-wrap: wrap;
}

.day-slot-time {
    font-weight: 800;
    font-size: 16px;
    color: #e9ffee;
    min-width: 72px;
}

.day-slot-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 200px;
}

.day-slot-name {
    font-weight: 800;
}

.day-slot-url {
    color: #9acbff;
    word-break: break-all;
    font-size: 13px;
}

.day-slot-schedule {
    color: var(--muted);
    font-size: 13px;
}

.day-slot-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.edit-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-form label,
.select-label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-weight: 600;
    color: #e3e7f3;
    font-size: 14px;
}

.admin-form input,
.admin-form select,
.select-label select {
    width: 100%;
    padding: 12px 12px;
    font-size: 14px;
    border-radius: 12px;
    border: 1px solid var(--outline);
    background: #0c1427;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.admin-form input:focus,
.admin-form select:focus,
.select-label select:focus {
    border-color: rgba(74, 222, 128, 0.35);
    box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.18);
}

.schedule-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
}

.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.schedule-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.schedule-row select,
.schedule-row input {
    flex: 1;
    min-width: 140px;
}

.remove-slot {
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fecdd3;
    background: rgba(239, 68, 68, 0.08);
    border-radius: 10px;
    padding: 10px 10px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.remove-slot:hover {
    border-color: rgba(239, 68, 68, 0.6);
    background: rgba(239, 68, 68, 0.12);
}

.primary-btn {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #082f15;
    padding: 12px 14px;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 800;
    font-size: 14px;
    border: none;
    cursor: pointer;
    box-shadow: 0 12px 26px rgba(34, 197, 94, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 30px rgba(34, 197, 94, 0.45);
}

.danger-btn {
    border: 1px solid rgba(239, 68, 68, 0.45);
    background: rgba(239, 68, 68, 0.12);
    color: #fecdd3;
    border-radius: 12px;
    padding: 10px 12px;
    cursor: pointer;
    font-weight: 800;
    font-size: 14px;
    transition: border-color 0.2s, background 0.2s, transform 0.15s ease;
}

.danger-btn:hover {
    border-color: rgba(239, 68, 68, 0.7);
    background: rgba(239, 68, 68, 0.16);
    transform: translateY(-1px);
}

.ghost-btn {
    border: 1px solid var(--outline);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    border-radius: 12px;
    padding: 10px 12px;
    cursor: pointer;
    font-weight: 700;
    transition: border-color 0.2s, background 0.2s, transform 0.15s ease;
}

.ghost-btn:hover {
    border-color: rgba(148, 163, 184, 0.35);
    transform: translateY(-1px);
}

.ghost-btn.small {
    padding: 8px 10px;
    font-size: 13px;
}

.ghost-btn.tiny {
    padding: 6px 8px;
    font-size: 12px;
    opacity: 0.85;
}

.status-text {
    min-height: 18px;
    font-size: 13px;
    color: var(--muted);
}

.status-text.ok {
    color: #86efac;
}

.status-text.error {
    color: #fca5a5;
}

.hidden {
    display: none !important;
}

.admin-locked {
    border: 1px dashed rgba(148, 163, 184, 0.4);
    border-radius: var(--radius);
    padding: 14px;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.refresh-indicator {
    position: relative;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: conic-gradient(from -90deg, rgba(74, 222, 128, 0.45) var(--refresh-progress, 0%), rgba(255, 255, 255, 0.04) var(--refresh-progress, 0%));
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
    flex-shrink: 0;
    opacity: 0.28;
    overflow: hidden;
    -webkit-mask-image: radial-gradient(circle, #000 99%, transparent 100%);
    mask-image: radial-gradient(circle, #000 99%, transparent 100%);
}

.refresh-indicator::after {
    content: "";
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.95);
}

.lock-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.lock-form input {
    flex: 1;
    min-width: 220px;
}

.admin-content {
    margin-top: 12px;
}

a:focus-visible,
button:focus-visible,
.filter-btn:focus-visible,
.join-button:focus-visible,
.ghost-btn:focus-visible,
.primary-btn:focus-visible,
.danger-btn:focus-visible,
.remove-slot:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
    box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.2);
}

@media (max-width: 640px) {
    body {
        padding: 18px 14px 32px;
    }

    .hero {
        padding: 22px 18px;
    }

    .meeting {
        flex-direction: column;
        align-items: flex-start;
    }

    .join-button {
        width: 100%;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bg-video video {
        display: none;
    }

    .dot.live,
    .skeleton::after,
    .fade-in {
        animation: none !important;
    }

    .fade-in {
        opacity: 1;
        transform: none;
    }
}
