
/* ------------------------------------------------------------------
   New Enhancements: Visual Hierarchy, Navigation, Feedback
   ------------------------------------------------------------------ */

/* 1. Back To Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    background: #ff6b7d;
}

/* 2. TOC Sidebar (Desktop) */
@media (min-width: 1200px) {
    main {
        display: grid;
        grid-template-columns: 1fr 250px; /* Content + TOC */
        gap: 2rem;
        max-width: 1400px;
        margin: 0 auto;
        position: relative;
    }

    /* Reset sections to fit in grid */
    .content-section {
        grid-column: 1 / 2;
        /* padding: 4rem 2rem;  Reduce padding slightly */
    }
    
    /* Hero spans full width */
    .hero {
        grid-column: 1 / -1;
    }

    .toc-sidebar {
        grid-column: 2 / 3;
        position: sticky;
        top: 100px;
        height: fit-content;
        max-height: 80vh;
        overflow-y: auto;
        padding: 1.5rem;
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(10px);
        border-radius: var(--border-radius);
        border-left: 2px solid rgba(255, 255, 255, 0.1);
    }

    .toc-sidebar h3 {
        font-size: 1.1rem;
        color: var(--accent-gold);
        margin-bottom: 1rem;
    }

    .toc-list {
        list-style: none;
    }

    .toc-link {
        display: block;
        color: var(--text-gray);
        text-decoration: none;
        padding: 0.5rem 0;
        font-size: 0.9rem;
        transition: color 0.2s;
        border-left: 2px solid transparent;
        padding-left: 1rem;
        margin-left: -1.5rem; /* Align border with container edge */
    }

    .toc-link:hover, .toc-link.active {
        color: var(--text-light);
        border-left-color: var(--accent-color);
    }
    
    .toc-link.active {
        font-weight: 600;
        color: var(--accent-gold);
    }
}

/* Fallback for smaller screens: Main takes full width */
@media (max-width: 1199px) {
    .toc-sidebar {
        display: none;
    }
}

/* 3. Feedback Widget */
.feedback-section {
    margin-top: 3rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--border-radius);
    text-align: center;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

.feedback-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.feedback-btn {
    padding: 0.5rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: var(--text-light);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feedback-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-light);
}

.feedback-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

/* 4. Strategy Scenario Card (Visual Context) */
.scenario-card {
    background: #252a41; /* Darker card bg */
    border: 1px solid #3e4466;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin: 2rem 0;
}

.scenario-header {
    background: #1f2335;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #3e4466;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.scenario-badge {
    background: var(--accent-gold);
    color: #000;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    text-transform: uppercase;
}

.scenario-body {
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .scenario-body {
        grid-template-columns: 1fr;
    }
}

.scenario-visual {
    background: rgba(0,0,0,0.2);
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    justify-content: center;
}

.hand-preview {
    display: flex;
    gap: 0.5rem;
}

.mini-card {
    width: 30px;
    height: 45px;
    background: white;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #333;
    font-size: 0.8rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.mini-card.red { color: #e94560; }

.scenario-text h4 {
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.decision-point {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(40, 167, 69, 0.1);
    border-left: 3px solid #28a745;
    border-radius: 4px;
}
