/* ===== Chunxiang-Inspired Course Schedule Styles v2 ===== */
/* Dark mode base for course page */
body.course-page {
    background: #020204;
    /* Deeper black for premium feel */
    color: #ffffff;
    min-height: 100vh;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    /* Ensure premium font stack */
}

body.course-page .container {
    max-width: 1080px;
}

body.course-page .header {
    text-align: center;
    padding: 80px 0 40px;
}

body.course-page .header h1 {
    color: #ffffff;
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    /* Fluid typography */
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
    /* Tighten for modern feel */
    text-shadow: 0 0 40px rgba(59, 130, 246, 0.3);
    /* Subtle glow */
}

body.course-page .subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.1rem;
}

body.course-page .header-badge {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
}

body.course-page .phase-section {
    padding: 32px 0 24px;
}

/* 简洁公告栏 - Premium */
.announcement-simple {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    padding: 12px 16px;
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(5px);
}

/* Announcement board (旧版保留) */
.announcement-board {
    margin: 8px 0 18px;
    padding: 10px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
}

.announcement-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.announcement-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}

.announcement-title i {
    color: rgba(245, 158, 11, 0.75);
}

.announcement-tag {
    font-size: 0.65rem;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

.announcement-list {
    display: grid;
    gap: 12px;
}

.announcement-item {
    display: flex;
    gap: 14px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(6, 8, 14, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.announcement-date {
    min-width: 56px;
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Orbitron', 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.announcement-item-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.86);
    margin-bottom: 0;
}

.announcement-item-desc {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.58);
    line-height: 1.5;
}

@media (max-width: 680px) {

    /* 移动端容器内边距 - 让内容不贴边 */
    body.course-page .container {
        padding: 0 16px;
    }

    /* 移动端页头优化 - 增加呼吸空间 */
    body.course-page .header {
        padding: 70px 0 24px;
        text-align: center;
    }

    body.course-page .header h1 {
        font-size: 1.5rem;
        line-height: 1.4;
        margin-bottom: 8px;
    }

    body.course-page .subtitle {
        font-size: 0.9rem;
        margin-bottom: 16px;
    }

    /* 简洁公告栏移动端样式 */
    .announcement-simple {
        margin-bottom: 20px;
    }

    body.course-page .phase-section {
        padding: 16px 0 18px;
    }

    .announcement-board {
        padding: 12px;
        margin: 8px 0 24px;
    }

    .announcement-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .announcement-item {
        flex-direction: column;
    }

    .announcement-date {
        min-width: 0;
    }
}

/* Glow effect background */
body.course-page .bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59, 130, 246, 0.25) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(168, 85, 247, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 50% 30% at 0% 80%, rgba(34, 197, 94, 0.12) 0%, transparent 50%);
    opacity: 1;
    filter: blur(0);
    pointer-events: none;
    z-index: -1;
}

/* Ticket Grid - 3 columns */
.ticket-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding: 12px 0 24px;
}

@media (max-width: 1100px) {
    .ticket-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 680px) {
    .ticket-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* Phase Header */
.phase-header {
    grid-column: 1 / -1;
    margin: 16px 0 12px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.phase-header:first-child {
    margin-top: 6px;
}

.phase-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Premium Neon Phase Badge */
.phase-badge {
    font-size: 0.7rem;
    font-family: 'JetBrains Mono', monospace;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
    padding: 6px 12px;
    border-radius: 99px;
    /* Pill shape */
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
    /* Subtle glow */
    backdrop-filter: blur(4px);
}

/* Mobile Phase Header - 垂直布局更协调 */
@media (max-width: 680px) {
    .phase-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin: 24px 0 16px;
    }

    .phase-badge {
        font-size: 0.75rem;
        padding: 6px 16px;
    }

    .phase-title {
        font-size: 1.25rem;
    }
}

/* ===== Ticket Card Redesign (Premium Glassmorphism) ===== */
.ticket {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    /* Softer corners */
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow:
        0 4px 24px -1px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.08) inset;
    /* Inner subtle border */
    background: rgba(18, 18, 26, 0.6);
    /* Semi-transparent */
    backdrop-filter: blur(12px);
    /* Glass effect */
}

.ticket:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow:
        0 20px 48px -12px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(255, 255, 255, 0.15) inset;
    /* Brighter border on hover */
    background: rgba(18, 18, 26, 0.8);
}

/* Ticket Main Content */
.ticket-main {
    position: relative;
    padding: 80px 20px 24px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
}

/* BIGGER Sawtooth torn paper effect - Matches Body BG */
.ticket-main::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 16px;
    background: linear-gradient(135deg, transparent 50%, #020204 50%) 0 0 / 16px 16px,
        linear-gradient(-135deg, transparent 50%, #020204 50%) 0 0 / 16px 16px;
    background-position: left bottom;
}

/* Phase Color Schemes with gradient - Transparent for Glassmorphism */
.phase-1 .ticket-main {
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.15) 0%, rgba(30, 64, 175, 0.3) 100%);
}

.phase-2 .ticket-main {
    background: linear-gradient(145deg, rgba(168, 85, 247, 0.15) 0%, rgba(107, 33, 168, 0.3) 100%);
}

.phase-3 .ticket-main {
    background: linear-gradient(145deg, rgba(249, 115, 22, 0.15) 0%, rgba(194, 65, 12, 0.3) 100%);
}

.phase-4 .ticket-main {
    background: linear-gradient(145deg, rgba(34, 197, 94, 0.15) 0%, rgba(21, 128, 61, 0.3) 100%);
}

/* RIBBON Day Badge - corner ribbon style */
.ticket-day {
    position: absolute;
    top: 16px;
    left: -40px;
    width: 140px;
    text-align: center;
    transform: rotate(-45deg);
    font-family: 'Orbitron', 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    font-weight: 800;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 8px 0;
    letter-spacing: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 20;
}

/* Topic Icon/Illustration Placeholder */
.ticket-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%);
    font-size: 4rem;
    opacity: 0.15;
    pointer-events: none;
}

/* Illustration Image at top of card */
.ticket-illustration {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 180px;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
}

.ticket-illustration::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to top, var(--ticket-bg, #3b82f6), transparent);
}

.phase-1 .ticket-main {
    --ticket-bg: #1e40af;
}

.phase-2 .ticket-main {
    --ticket-bg: #6b21a8;
}

.phase-3 .ticket-main {
    --ticket-bg: #c2410c;
}

.phase-4 .ticket-main {
    --ticket-bg: #15803d;
}

/* Card with illustration needs more padding at top */
.ticket-main.has-illustration {
    padding-top: 140px;
    min-height: 280px;
}

/* Faint Watermark */
.ticket-main::before {
    content: attr(data-code);
    position: absolute;
    top: 20px;
    right: 20px;
    font-family: 'Orbitron', monospace;
    font-size: 0.6rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.2);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.ticket-tag-row {
    position: absolute;
    top: 16px;
    right: 16px;
    margin: 0;
    z-index: 20;
}

.ticket-tag {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 14px;
    border-radius: 6px;
    background: #ea580c;
    /* Orange 600 */
    color: #ffffff;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.ticket-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 6px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
}

.ticket-desc {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    position: relative;
    z-index: 2;
}

/* Ticket Footer with Buttons - Matching Card Color */
.ticket-stub {
    position: relative;
    padding: 18px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.ticket-stub-multi {
    flex-wrap: wrap;
    justify-content: flex-start;
}

/* Sawtooth top edge for stub */
.ticket-stub::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 12px;
    background: linear-gradient(135deg, transparent 50%, currentColor 50%) 0 0 / 12px 12px,
        linear-gradient(-135deg, transparent 50%, currentColor 50%) 0 0 / 12px 12px;
    background-position: left top;
    color: inherit;
}

/* Phase-specific stub colors - Glassy */
.phase-1 .ticket-stub {
    background: linear-gradient(145deg, rgba(37, 99, 235, 0.2) 0%, rgba(30, 64, 175, 0.4) 100%);
}

.phase-1 .ticket-stub::before {
    color: #2563eb;
    display: none;
    /* Hide sawtooth between main and stub for cleaner glass look */
}

.phase-2 .ticket-stub {
    background: linear-gradient(145deg, rgba(147, 51, 234, 0.2) 0%, rgba(107, 33, 168, 0.4) 100%);
}

.phase-2 .ticket-stub::before {
    color: #9333ea;
    display: none;
}

.phase-3 .ticket-stub {
    background: linear-gradient(145deg, rgba(234, 88, 12, 0.2) 0%, rgba(194, 65, 12, 0.4) 100%);
}

.phase-3 .ticket-stub::before {
    color: #ea580c;
    display: none;
}

.phase-4 .ticket-stub {
    background: linear-gradient(145deg, rgba(22, 163, 74, 0.2) 0%, rgba(21, 128, 61, 0.4) 100%);
}

.phase-4 .ticket-stub::before {
    color: #16a34a;
    display: none;
}

/* Premium Buttons */
.stub-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    /* Larger touch target */
    border-radius: 99px;
    /* Pill shape */
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid transparent;
    /* Prepare for border transition */
    text-decoration: none;
    letter-spacing: 0.5px;
}

.stub-btn.btn-docs {
    background: rgba(0, 0, 0, 0.3);
    color: rgba(255, 255, 255, 0.9);
}

.stub-btn.btn-docs:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: translateY(-2px);
}

.stub-btn.btn-faq {
    background: #3b82f6;
    color: #ffffff;
}

.stub-btn.btn-faq:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

.stub-btn.btn-video {
    background: #22c55e;
    color: #ffffff;
}

.stub-btn.btn-video:hover {
    background: #16a34a;
    transform: translateY(-2px);
}

.stub-btn.is-disabled {
    opacity: 0.45;
    pointer-events: none;
    filter: grayscale(0.4);
}

.stub-btn i {
    font-size: 0.9rem;
}

/* Tear Animation */
.ticket.is-torn {
    opacity: 0.4;
    pointer-events: none;
    filter: saturate(0.3);
}

.ticket.is-torn .ticket-stub {
    transform: translateY(30px) rotate(8deg);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.6, 0, 0.2, 1);
}

.ticket.is-torn::after {
    content: "✓ DONE";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-12deg);
    font-family: 'Orbitron', monospace;
    font-size: 1.8rem;
    font-weight: 900;
    color: #22c55e;
    background: rgba(0, 0, 0, 0.9);
    padding: 16px 32px;
    border-radius: 12px;
    border: 4px solid #22c55e;
    z-index: 10;
    animation: stampIn 0.4s cubic-bezier(0.2, 0.8, 0.2, 1.2) forwards;
    box-shadow: 0 8px 32px rgba(34, 197, 94, 0.4);
}

@keyframes stampIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(2.5) rotate(-12deg);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotate(-12deg);
    }
}

/* Video modal */
body.modal-open {
    overflow: hidden;
}

.video-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 2000;
}

.video-modal.is-open {
    display: flex;
}

.video-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.7);
    backdrop-filter: blur(6px);
}

.video-modal-dialog {
    position: relative;
    width: min(960px, 92vw);
    background: #0b0b12;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    padding: 16px;
    z-index: 1;
}

.video-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.video-modal-title {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
}

.video-modal-close {
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.video-modal-close:hover {
    background: rgba(255, 255, 255, 0.16);
}

.video-embed {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    border-radius: 12px;
    overflow: hidden;
    background: #000000;
}

.video-embed iframe,
.video-embed video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-speed {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.video-speed.is-hidden {
    display: none;
}

.speed-btn {
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.9);
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.speed-btn:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.12);
}

.speed-btn.is-active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
}

.video-fallback {
    display: inline-flex;
    margin-top: 12px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}

.video-fallback:hover {
    color: #ffffff;
}

@media (max-width: 680px) {
    .video-modal {
        padding: 16px;
    }

    .video-modal-dialog {
        padding: 12px;
    }
}

/* ===== AI Hotspot Timeline Styles ===== */
.phase-badge-hot {
    background: linear-gradient(135deg, #ff6b35 0%, #f72585 100%);
    color: #fff;
    animation: pulse-hot 2s ease-in-out infinite;
}

@keyframes pulse-hot {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

.hotspot-timeline {
    position: relative;
    padding-left: 24px;
    margin-top: 24px;
}

.phase-hotspot .phase-header {
    flex-wrap: wrap;
    align-items: flex-start;
}

.phase-hotspot .phase-subtitle {
    flex-basis: 100%;
    margin-top: -6px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.2px;
}

/* Timeline vertical line */
.hotspot-timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, rgba(247, 37, 133, 0.6) 0%, rgba(255, 107, 53, 0.3) 100%);
    border-radius: 1px;
}

.hotspot-item {
    position: relative;
    margin-bottom: 28px;
    scroll-margin-top: 20px;
    width: min(920px, 100%);
}

/* Timeline dot */
.hotspot-item::before {
    content: '';
    position: absolute;
    left: -22px;
    top: 16px;
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #ff6b35 0%, #f72585 100%);
    border-radius: 50%;
    border: 2px solid rgba(12, 12, 18, 0.9);
    z-index: 1;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hotspot-item:hover::before {
    transform: scale(1.3);
    box-shadow: 0 0 12px rgba(247, 37, 133, 0.5);
}

.hotspot-date {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    margin-bottom: 8px;
    font-family: 'JetBrains Mono', monospace;
}

/* Hotspot Glassmorphism Update */
.hotspot-content {
    display: grid;
    grid-template-columns: minmax(200px, 34%) 1fr;
    gap: 16px;
    align-items: center;
    background: rgba(18, 18, 26, 0.6);
    /* Semi-transparent */
    backdrop-filter: blur(12px);
    /* Glass effect */
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 16px;
    overflow: hidden;
    box-shadow:
        0 16px 34px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.hotspot-content:hover {
    background: rgba(18, 18, 26, 0.8);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-4px);
    box-shadow:
        0 22px 44px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.hotspot-item:nth-child(odd) .hotspot-content {
    border-color: rgba(247, 37, 133, 0.25);
}

.hotspot-item:nth-child(even) .hotspot-content {
    border-color: rgba(59, 130, 246, 0.25);
}

.hotspot-item:nth-child(odd) .hotspot-content:hover {
    border-color: rgba(247, 37, 133, 0.45);
}

.hotspot-item:nth-child(even) .hotspot-content:hover {
    border-color: rgba(59, 130, 246, 0.45);
}

.hotspot-illustration {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    grid-row: 1 / 4;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

.hotspot-illustration::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.65) 100%);
}

.hotspot-content .hotspot-title,
.hotspot-content .hotspot-actions {
    padding: 0;
}

.hotspot-content .hotspot-title {
    margin: 0 0 10px;
}

.hotspot-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 0 12px;
}

.hotspot-chip {
    font-size: 0.7rem;
    font-family: 'JetBrains Mono', monospace;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.75);
    letter-spacing: 0.4px;
}

.hotspot-item:nth-child(odd) .hotspot-chip {
    background: rgba(247, 37, 133, 0.18);
    border-color: rgba(247, 37, 133, 0.4);
    color: rgba(255, 222, 236, 0.95);
}

.hotspot-item:nth-child(even) .hotspot-chip {
    background: rgba(59, 130, 246, 0.18);
    border-color: rgba(59, 130, 246, 0.4);
    color: rgba(219, 235, 255, 0.95);
}

.hotspot-content .hotspot-actions {
    padding-bottom: 0;
}

.hotspot-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 12px;
}

.hotspot-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.hotspot-title,
.hotspot-meta,
.hotspot-actions {
    grid-column: 2;
}

@media (max-width: 860px) {
    .hotspot-content {
        grid-template-columns: 1fr;
    }

    .hotspot-illustration {
        grid-row: auto;
        aspect-ratio: 16 / 9;
    }

    .hotspot-title,
    .hotspot-meta,
    .hotspot-actions {
        grid-column: 1;
    }
}

.hotspot-actions .stub-btn {
    font-size: 0.8rem;
    padding: 6px 12px;
}

/* Left sidebar hotspot section special styling */
.outline-section-hotspot {
    background: transparent;
    border: none;
    margin-top: 32px;
    /* Extra separation */
}

.outline-section-hotspot .outline-phase-title {
    background: linear-gradient(to right, #ff6b35, #f72585);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    opacity: 0.9;
}

.outline-section-hotspot .outline-phase-title i {
    color: #f72585 !important;
}

.outline-section-hotspot:hover {
    border-color: transparent;
}

/* Footer styling for course page */

/* Footer styling for course page */
body.course-page div[style*="text-align: center"] p {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
}

/* ===== Premium Sidebar Redesign ===== */
.course-outline {
    position: fixed;
    top: 0;
    left: 0;
    width: 270px;
    /* More compact, focused width */
    height: 100vh;
    height: 100dvh;
    /* Glassmorphism Background */
    background: rgba(8, 8, 12, 0.85);
    /* Slightly darker/more opaque for premium depth */
    backdrop-filter: blur(32px) saturate(180%);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.35s ease;
    scrollbar-width: none;
    box-shadow: 10px 0 40px rgba(0, 0, 0, 0.4);
    /* Deeper shadow */
}

.course-outline::-webkit-scrollbar {
    display: none;
}

.course-outline.collapsed {
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
}



/* Outline Content Container - More top space since header is gone */
/* Outline Content Container - Balanced Top Space */
.outline-content {
    padding: 40px 12px 30px;
    /* Normalized top space */
    display: flex;
    flex-direction: column;
    gap: 24px;
    /* More breathable gap between sections */
}

/* Collapsible Phase Sections */
/* Clean Section Design (No Box) */
.outline-section {
    display: flex;
    flex-direction: column;
    background: transparent;
    /* Remove box background */
    border: none;
    /* Remove box border */
    margin: 0 0 16px 0;
    /* Vertical spacing only */
    padding: 0 16px;
    /* Horizontal padding */
}

.outline-section:first-of-type {
    margin-top: 24px;
}

.outline-section:last-of-type {
    margin-bottom: 40px;
}

.outline-section:hover {
    border-color: transparent;
}

/* Clean Phase Title */
/* Bold Phase Title */
/* Phase Title - Modern App Header Style */
.outline-phase-title {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: rgba(255, 255, 255, 0.35);
    /* Dimmer inactive for better hierarchy */
    font-size: 0.75rem;
    /* Smaller but bolder */
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.outline-phase-title:hover {
    color: rgba(255, 255, 255, 0.9);
}

.outline-section:not(.collapsed) .outline-phase-title {
    color: rgba(255, 255, 255, 0.8);
}

.outline-section:not(.collapsed) .outline-phase-title i {
    color: #3b82f6;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
    transform: rotate(0deg);
}

.outline-section.collapsed .outline-phase-title i {
    transform: rotate(-90deg);
}

.outline-section.collapsed .outline-days {
    display: none;
}

.outline-section.collapsed .outline-cards {
    display: none;
}

.outline-days {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-left: 12px;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    margin-left: 8px;
    margin-top: 4px;
}

/* Vertical Continuity Guide */
.outline-cards {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 0 8px 18px;
    margin-left: 20px;
    border-left: 1px solid rgba(255, 255, 255, 0.04);
    /* Thin guide line */
    position: relative;
    list-style: none;
}

.outline-card {
    position: relative;
    background: transparent;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.25s ease;
    opacity: 0.6;
    margin-left: -1px;
    /* Overlap the border slightly */
    text-decoration: none;
    display: block;
}

.outline-card:hover {
    opacity: 1;
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.02);
}

/* Bullet Point Logic */
.outline-card-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.88rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
}

.outline-card-title::before {
    content: '';
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    margin-left: -22px;
    /* Pull into the vertical line area */
    transition: all 0.3s ease;
}

.outline-card:hover .outline-card-title::before {
    background: #3b82f6;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.8);
    transform: scale(1.2);
}

/* Make outline-card links look proper */
a.outline-card {
    text-decoration: none;
    display: block;
}

/* Scroll offset for anchor navigation */
.ticket[id] {
    scroll-margin-top: 20px;
}

.outline-card-meta {
    display: block;
    font-size: 0.65rem;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 4px;
}

/* Title styling without numbers */
.outline-card-title {
    display: block;
    font-size: 0.9rem;
    /* Slightly larger for readability */
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    transition: color 0.2s ease;
}

.outline-card:hover .outline-card-title {
    color: #ffffff;
}

.outline-days:empty {
    display: none;
    padding-left: 0;
    margin-left: 0;
    border-left: none;
}

.outline-days li a {
    display: block;
    padding: 6px 10px;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 400;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.outline-days li a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
    padding-left: 14px;
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    position: fixed;
    top: 16px;
    left: 16px;
    width: 44px;
    height: 44px;
    background: rgba(20, 20, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.sidebar-toggle:hover {
    background: rgba(59, 130, 246, 0.3);
    border-color: #3b82f6;
    color: #ffffff;
    transform: scale(1.05);
}

/* Mobile Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

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

/* Main Content Wrapper - Offset for sidebar */
.course-main-wrapper {
    margin-left: 280px;
    min-height: 100vh;
    transition: margin-left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.course-main-wrapper.sidebar-collapsed {
    margin-left: 0;
}

/* ===== Responsive Styles ===== */
/* Mobile: sidebar hidden by default, toggle always visible */
@media (max-width: 900px) {
    .course-outline {
        transform: translateX(-100%);
        opacity: 0;
        width: 300px;
        max-width: 85vw;
        touch-action: pan-y;
        /* Allow vertical scrolling in sidebar */
    }

    .course-outline.mobile-open {
        transform: translateX(0);
        opacity: 1;
    }

    .sidebar-toggle {
        opacity: 1;
        pointer-events: auto;
    }

    .course-main-wrapper {
        margin-left: 0 !important;
    }

    /* When sidebar is open, prevent body scrolling */
    body.sidebar-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
    }
}

/* Desktop: sidebar visible, toggle positioned next to sidebar */
@media (min-width: 901px) {
    .sidebar-toggle {
        opacity: 1;
        pointer-events: auto;
        left: 292px;
        transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1), all 0.25s ease;
    }

    .sidebar-toggle.sidebar-hidden {
        left: 16px;
    }

    .sidebar-overlay {
        display: none;
    }
}

/* ===== Auth UI ===== */

.auth-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 220;
}

.auth-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

.auth-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(3px);
}

.auth-modal-dialog {
    position: relative;
    width: min(420px, 90vw);
    border-radius: 16px;
    background: #111118;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
    padding: 20px;
    z-index: 1;
}

.auth-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.auth-modal-title {
    font-size: 1.1rem;
    font-weight: 700;
}

.auth-modal-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.6rem;
    cursor: pointer;
}

.auth-modal-body label {
    display: block;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 6px;
}

.auth-modal-body input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(5, 5, 8, 0.85);
    color: #ffffff;
    margin-bottom: 12px;
}

.auth-modal-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.auth-submit {
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    background: #2563eb;
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
}

.auth-helper {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 10px;
}

.auth-error {
    font-size: 0.85rem;
    color: #fca5a5;
    min-height: 20px;
}

.stub-btn.is-locked {
    position: relative;
    opacity: 0.7;
}

.stub-btn.is-locked::after {
    content: '🔒';
    margin-left: 6px;
    font-size: 0.85em;
}

.course-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.footer-admin-link {
    font-size: 0.85rem;
    color: rgba(147, 197, 253, 0.9);
    text-decoration: none;
}

.footer-admin-link:hover {
    color: #bfdbfe;
}

.is-hidden {
    display: none !important;
}