/* public/css/period.css */
    /* ====== GLOBAL STYLES ====== */
    :root {
      --primary-color: #007bff;
      --secondary-color: #6c757d;
      --success-color: #28a745;
      --info-color: #17a2b8;
      --warning-color: #ffc107;
      --danger-color: #dc3545;
      --light-color: #f8f9fa;
      --dark-color: #343a40;
      --border-color: #e9ecef;
      --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
      --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.08);
      --shadow-lg: 0 6px 25px rgba(0, 0, 0, 0.1);
      --border-radius: 8px;
      --transition: all 0.2s ease;
    }
    
    body { 
        background-color: #f8fafc !important; /* Soft light background */
        font-family: 'Montserrat', sans-serif; 
        color: #2c3e50; 
        line-height: 1.6;
        padding-bottom: 2rem;
    }
    
    /* ====== NAVIGATION BREADCRUMBS ====== */
    .nav-breadcrumbs {
        background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
        padding: 1rem 1.5rem;
        border-radius: var(--border-radius);
        margin-bottom: 1.5rem;
        box-shadow: var(--shadow-sm);
        border-left: 4px solid var(--primary-color);
    }
    
    .nav-breadcrumbs a {
        text-decoration: none;
        font-weight: 600;
        color: var(--secondary-color);
        transition: var(--transition);
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 4px 8px;
        border-radius: 4px;
    }
    
    .nav-breadcrumbs a:hover {
        background-color: var(--light-color);
        color: var(--primary-color);
        transform: translateY(-1px);
    }
    
    .nav-breadcrumbs .separator {
        color: #adb5bd;
        margin: 0 8px;
        font-weight: 300;
    }
    
    .nav-breadcrumbs .current-page {
        color: var(--primary-color);
        font-weight: 700;
        padding: 4px 12px;
        background-color: rgba(0, 123, 255, 0.1);
        border-radius: 4px;
    }
    
    /* ====== PERIOD HEADER ====== */
    .period-header { 
        background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
        color: white;
        padding: 2.5rem;
        border-radius: var(--border-radius);
        margin-bottom: 2rem;
        box-shadow: var(--shadow-lg);
        position: relative;
        overflow: hidden;
    }
    
    .period-header::before {
        content: '';
        position: absolute;
        top: -50%;
        right: -50%;
        width: 100%;
        height: 200%;
        background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
        background-size: 20px 20px;
        opacity: 0.3;
        transform: rotate(15deg);
    }
    
    .period-header h1 { 
        font-size: 2.8rem; 
        font-weight: 800;
        margin-bottom: 0.5rem;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        position: relative;
        z-index: 1;
    }
    
    .period-header .lead {
        font-size: 1.25rem;
        opacity: 0.9;
        font-weight: 400;
        position: relative;
        z-index: 1;
    }
    
    .period-header .badge {
        background-color: rgba(255, 255, 255, 0.2);
        color: white;
        padding: 8px 16px;
        border-radius: 20px;
        font-weight: 500;
        position: relative;
        z-index: 1;
        border: 1px solid rgba(255, 255, 255, 0.3);
    }

    /* ====== PERIOD DOWNLOAD BANNER ====== */
    .download-banner {
        background: linear-gradient(135deg, #fff8e1 0%, #ffeaa7 100%);
        border: 2px solid var(--warning-color);
        border-radius: var(--border-radius);
        padding: 1.25rem;
        margin-bottom: 2rem;
        box-shadow: var(--shadow-md);
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .download-banner-content {
        flex: 1;
        min-width: 300px;
    }
    
    .download-banner h4 {
        color: #856404;
        font-weight: 700;
        margin-bottom: 0.5rem;
    }
    
    .download-banner p {
        color: #856404;
        opacity: 0.8;
        margin: 0;
    }
    
    .download-banner .btn {
        background: linear-gradient(135deg, var(--warning-color) 0%, #e0a800 100%);
        border: none;
        color: #212529;
        font-weight: 600;
        padding: 10px 24px;
        border-radius: 6px;
        transition: var(--transition);
        box-shadow: 0 3px 8px rgba(255, 193, 7, 0.2);
        white-space: nowrap;
    }
    
    .download-banner .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(255, 193, 7, 0.3);
    }

    /* ====== QUESTIONS SECTION ====== */
    .questions-section-title {
        color: var(--dark-color);
        font-weight: 800;
        margin-bottom: 1.5rem;
        padding-bottom: 0.75rem;
        border-bottom: 3px solid var(--primary-color);
        position: relative;
    }
    
    .questions-section-title::after {
        content: '';
        position: absolute;
        bottom: -3px;
        left: 0;
        width: 100px;
        height: 3px;
        background: linear-gradient(90deg, var(--primary-color), transparent);
    }

    /* ====== QUESTION CARD ====== */
    .question-card {
        border: none;
        border-radius: var(--border-radius);
        margin-bottom: 1.5rem;
        background-color: #ffffff;
        box-shadow: var(--shadow-md);
        transition: var(--transition);
        overflow: hidden;
    }

    .question-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-lg);
    }

    .question-card .card-header {
        background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
        border-bottom: 2px solid var(--border-color);
        padding: 1.5rem;
        position: relative;
    }
    
    .question-card .card-header::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        width: 80px;
        height: 2px;
        background: var(--primary-color);
    }

    .question-number {
        font-size: 1.4rem;
        font-weight: 800;
        color: var(--primary-color);
        margin-right: 15px;
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }
    
    .question-number::before {
        content: 'Q';
        background: var(--primary-color);
        color: white;
        width: 28px;
        height: 28px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.9rem;
        font-weight: 700;
    }

    /* ====== TOPICS ====== */
    .view-topics-btn {
        background: transparent;
        border: 2px solid var(--secondary-color);
        color: var(--secondary-color);
        font-weight: 600;
        border-radius: 20px;
        padding: 6px 16px;
        transition: var(--transition);
    }
    
    .view-topics-btn:hover {
        background: var(--secondary-color);
        color: white;
        transform: translateY(-1px);
    }
    
    .topics-container {
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius);
        padding: 1rem;
        background-color: #f8f9fa;
        display: none;
        margin-top: 1rem;
        animation: slideDown 0.3s ease;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .topics-container.show {
        display: block !important;
    }

    .topic-badge {
        background: linear-gradient(135deg, var(--info-color) 0%, #138496 100%);
        color: white;
        padding: 8px 16px;
        border-radius: 20px;
        font-size: 0.85rem;
        margin-right: 8px;
        margin-bottom: 8px;
        display: inline-block;
        font-weight: 500;
        box-shadow: 0 2px 4px rgba(23, 162, 184, 0.2);
        transition: var(--transition);
    }
    
    .topic-badge:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(23, 162, 184, 0.3);
    }

    /* ====== QUESTION TEXT ====== */
    .question-text {
        font-size: 1.1rem;
        line-height: 1.7;
        color: var(--dark-color);
        padding: 1.5rem;
        background-color: #f8fafc;
        border-radius: 6px;
        margin-bottom: 1rem;
        border-left: 4px solid var(--info-color);
    }

    /* ====== BUTTONS BAR ====== */
    .buttons-bar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        margin-top: 1.5rem;
        padding: 1.25rem;
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        border-radius: var(--border-radius);
        border: 1px solid var(--border-color);
    }
    
    .buttons-left, .buttons-right {
        display: flex;
        gap: 10px;
        align-items: center;
        flex-wrap: wrap;
    }
    
    /* Base button styles */
    .buttons-bar .btn {
        padding: 10px 20px;
        font-size: 0.95rem;
        font-weight: 600;
        border-radius: 6px;
        transition: var(--transition);
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        border: 2px solid transparent;
        min-width: 140px;
        justify-content: center;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    }
    
    .buttons-bar .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    }
    
    /* Left side buttons */
    .buttons-left .show-answer-btn {
        background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
        color: white;
        border-color: var(--primary-color);
    }
    
    .buttons-left .show-answer-btn.btn-danger {
        background: linear-gradient(135deg, var(--danger-color) 0%, #c82333 100%);
        border-color: var(--danger-color);
    }
    
    .buttons-left a.btn-success {
        background: linear-gradient(135deg, var(--success-color) 0%, #218838 100%);
        color: white;
        border-color: var(--success-color);
    }
    
    /* Right side button */
    .buttons-right .add-comment-btn {
        background: linear-gradient(135deg, #6c757d 0%, #545b62 100%);
        color: white;
        border-color: var(--secondary-color);
    }
    
    /* ====== ANSWER SECTION ====== */
    .answer-content {
        margin-top: 1.5rem;
        padding: 1.75rem;
        background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
        border-radius: var(--border-radius);
        border-left: 5px solid var(--success-color);
        box-shadow: var(--shadow-sm);
        animation: fadeIn 0.3s ease;
    }

    .custom-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #fff;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-left: 6px solid #28a745;
    z-index: 9999;
    min-width: 300px;
    animation: slideIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.toast-icon {
    font-size: 24px;
    color: #28a745;
}

.toast-title {
    display: block;
    font-weight: 700;
    color: #333;
}

.toast-body {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.toast-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #ccc;
    cursor: pointer;
    margin-left: auto;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    width: 100%;
    background: #e9ecef;
}

.toast-progress::after {
    content: '';
    position: absolute;
    left: 0;
    height: 100%;
    width: 100%;
    background: #28a745;
    animation: progress 4s linear forwards;
}

.profile-avatar {
    width: 45px; 
    height: 45px; 
    border-radius: 50%; 
    object-fit: cover; 
    border: 1px solid #dee2e6;
    background-color: #f8f9fa; /* Shows if image fails to load */
}
.avatar-placeholder {
    width: 45px; 
    height: 45px; 
    border-radius: 50%; 
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes progress {
    100% { width: 0; }
}
    
    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    @media print {
    /* Hide the answer area if it doesn't have the 'printable' class */
    .answer-content:not(.is-printable) {
        display: none !important;
    }
}
    /* 1. Define the vibration movement */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    50% { transform: translateX(10px); }
    75% { transform: translateX(-10px); }
}

/* 2. The class that gets toggled by JS */
.apply-shake {
    animation: shake 0.4s ease-in-out !important;
    border: 2px solid #dc3545 !important; /* Forces a red border */
    background-color: #fff8f8 !important; /* Slight red tint */
}
    .answer-section h5 {
        color: var(--dark-color);
        font-weight: 700;
        margin-bottom: 1rem;
        font-size: 1.3rem;
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .answer-section h5::before {
        content: '';
        width: 8px;
        height: 8px;
        background: var(--success-color);
        border-radius: 50%;
    }
    
    .answer-section .answer-text,
    .answer-section .workings-text {
        background-color: white;
        padding: 1.5rem;
        border-radius: 6px;
        border: 1px solid var(--border-color);
        margin-bottom: 1.5rem;
        box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
    }

    /* ====== COMMENT SECTION - OPTIMIZED FOR MOBILE ====== */
.comment-section {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    animation: slideUp 0.3s ease;
}

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

.comment-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 1.5rem;
}

.profile-img-container {
    flex-shrink: 0;
}

.comment-header img,
.profile-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--brand-gold, #DAA520);
    background-color: #f8f9fa;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.comment-input-container {
    flex: 1;
    min-width: 0; /* Prevents flex item from overflowing */
}

.comment-input {
    width: 100%;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    padding: 12px 16px;
    font-size: 1rem;
    resize: vertical;
    min-height: 100px;
    transition: var(--transition);
    font-family: inherit;
    background: white;
}

.comment-input:focus {
    outline: none;
    border-color: var(--brand-gold, #DAA520);
    box-shadow: 0 0 0 4px rgba(218, 165, 32, 0.15);
}

.comment-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 1rem;
}

.comment-buttons .btn {
    padding: 10px 24px;
    font-weight: 600;
    border-radius: 30px;
    min-width: 120px;
    border: 2px solid transparent;
    transition: var(--transition);
}

.comment-buttons .btn-primary {
    background: var(--brand-gold, #DAA520);
    color: var(--brand-black, #1a1a1a);
    border-color: var(--brand-gold, #DAA520);
}

.comment-buttons .btn-primary:hover {
    background: var(--brand-gold-light, #F0B800);
    border-color: var(--brand-gold-light, #F0B800);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(218, 165, 32, 0.3);
}

.comment-buttons .btn-outline-secondary {
    background: transparent;
    border: 2px solid var(--brand-gray, #6c757d);
    color: var(--brand-gray, #6c757d);
}

.comment-buttons .btn-outline-secondary:hover {
    background: var(--brand-gray, #6c757d);
    color: white;
    transform: translateY(-2px);
}


    /* ====== SIDEBAR (STICKY) ====== */
    .sidebar-column {
        position: sticky;
        top: 80px;
        height: fit-content;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        padding-right: 15px;
    }
    
    .sidebar-column::-webkit-scrollbar {
        width: 6px;
    }
    
    .sidebar-column::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 3px;
    }
    
    .sidebar-column::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 3px;
    }
    
    .sidebar-card {
        border: none;
        border-radius: var(--border-radius);
        box-shadow: var(--shadow-lg);
        background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
        overflow: hidden;
        margin-bottom: 1.5rem;
    }
    
    .sidebar-card .card-header {
        background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
        color: white;
        padding: 1.25rem;
        font-weight: 700;
        font-size: 1.2rem;
        border-bottom: none;
    }
    
    .sidebar-card .list-group-item {
        border: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        padding: 1rem 1.25rem;
        transition: var(--transition);
        background: transparent;
    }
    
    .sidebar-card .list-group-item:last-child {
        border-bottom: none;
    }
    
    .sidebar-card .list-group-item:hover {
        background-color: rgba(0, 123, 255, 0.05);
        padding-left: 1.5rem;
    }
    
    .sidebar-card .list-group-item a {
        color: var(--dark-color);
        text-decoration: none;
        font-weight: 500;
        transition: var(--transition);
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .sidebar-card .list-group-item a::before {
        content: '📄';
        font-size: 0.9rem;
    }
    
    .sidebar-card .list-group-item a:hover {
        color: var(--primary-color);
        text-decoration: none;
    }
    
    .sidebar-card .list-group-item.active {
        background-color: rgba(0, 123, 255, 0.1);
        border-left: 4px solid var(--primary-color);
    }
    
    .sidebar-card .list-group-item.active a {
        color: var(--primary-color);
        font-weight: 600;
    }

    /* ====== FLOATING BUTTON ====== */
    .btn-floating-scroll {
        background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
        border: none;
        color: white;
        border-radius: 50px;
        padding: 14px 24px;
        font-weight: 600;
        box-shadow: 0 4px 20px rgba(0, 123, 255, 0.3);
        transition: var(--transition);
        display: flex;
        align-items: center;
        gap: 8px;
        z-index: 1000;
    }
    
    .btn-floating-scroll:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 25px rgba(0, 123, 255, 0.4);
        color: white;
    }

    /* Container for the whole discussion */
[id^="comments-list-"] {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

/* Main Comment Styling */
.border-start.border-3 {
    transition: all 0.3s ease;
    border-color: #dee2e6 !important; /* Default border color */
}

/* Highlight Admin/Staff Comments */
.border-start.border-primary {
    border-color: #0d6efd !important; /* Blue border for Staff */
    background-color: #f0f7ff !important;
}

/* Reply Container (The nested part) */
[id^="replies-"] {
    margin-left: 1.5rem;
    border-left: 2px solid #e9ecef;
    padding-left: 10px;
}

/* Badge and Typography tweaks */
.extra-small {
    font-size: 0.75rem;
}

.reply-trigger {
    font-size: 0.8rem;
    color: #6c757d;
    padding: 0;
    transition: color 0.2s;
}

.reply-trigger:hover {
    color: #0d6efd;
    text-decoration: underline !important;
}

/* Avatar styling */
.rounded-circle.me-2 {
    object-fit: cover;
    border: 1px solid #dee2e6;
}

/* Staff Badge Styling */
.badge.bg-primary {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Shake Animation for empty comments */
.apply-shake {
    animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
    border-color: #dc3545 !important;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}



    /* ====== RESPONSIVE ====== */
    @media (max-width: 768px) {
        .period-header {
            padding: 1.75rem;
        }
        
        .period-header h1 {
            font-size: 2rem;
        }
        
        .download-banner {
            flex-direction: column;
            text-align: center;
        }
        
        .download-banner-content {
            min-width: auto;
        }
        
        .buttons-bar {
            flex-direction: column;
            gap: 12px;
        }
        
        .buttons-left, .buttons-right {
            width: 100%;
            justify-content: center;
        }
        
        .sidebar-column {
            position: static;
            max-height: none;
            margin-top: 2rem;
        }
        
        .nav-breadcrumbs {
            padding: 0.75rem 1rem;
        }
        /* 1. The Container - Width must be 100% so it has an area to scroll within */
.buttons-bar {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    align-items: center !important;
    
    width: 100% !important; /* Keep this 100% or it won't scroll */
    margin: 10px 0 !important;
    
    overflow-x: auto !important;
    overflow-y: hidden !important; 
    -webkit-overflow-scrolling: touch !important; 
    
    gap: 8px !important; /* Smaller gap for mobile */
    padding: 10px 0 !important;
}

/* 2. The Groups - Fix the width issue here */
.buttons-left, 
.buttons-right {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    flex-shrink: 0 !important;
    width: auto !important; /* Ensure the wrapper doesn't stretch */
    gap: 8px !important;
}

/* 3. The Buttons - THE FIX IS HERE */
.btn {
    width: auto !important;       /* Shrink to text */
    min-width: unset !important;  /* Remove any Bootstrap minimums */
    max-width: unset !important; 
    flex: 0 0 auto !important;    /* DO NOT GROW, DO NOT SHRINK */
    
    /* OVAL SHAPE: Vertical (6px) | Horizontal (18px) */
    padding: 6px 18px !important; 
    border-radius: 30px !important;
    
    white-space: nowrap !important; 
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
}

/* Specific icon fix to keep it tight */
.btn i {
    margin-left: 0 !important;
}

/* Hide scrollbar */
.buttons-bar::-webkit-scrollbar { display: none; }
.buttons-bar { scrollbar-width: none; }

 /* ====== BRAND COLORS ====== */
    :root {
        --brand-black: #1a1a1a;
        --brand-dark: #2c2c2c;
        --brand-gold: #DAA520;
        --brand-gold-light: #F0B800;
        --brand-gold-soft: #FFD966;
        --brand-gold-pale: #FFF3CD;
        --brand-gray: #6c757d;
        --brand-success: #28a745;
        --brand-info: #17a2b8;
    }
    
    /* ====== FIX BUTTON SPACING ====== */
    .buttons-bar {
        margin: 0;
        padding: 1.25rem 1rem;  /* Added left/right padding */
        border-radius: 0;
        width: 100%;
        background: #f5f5f5;
        border-top: 1px solid #e0e0e0;
        border-bottom: 1px solid #e0e0e0;
    }
    
    /* Ensure buttons have proper spacing from edges */
    .buttons-left {
        margin-left: 0.5rem;  /* Small margin from left edge */
    }
    
    .buttons-right {
        margin-right: 0.5rem;  /* Small margin from right edge */
    }
    
    /* ====== QUESTION TEXT - GOLD LEFT BORDER ====== */
    .question-text {
        margin: 0;
        padding: 1.5rem 1rem;
        border-left: 6px solid var(--brand-gold);
        border-radius: 0;
        background: white;
        width: 100%;
        font-size: 1.1rem;
        line-height: 1.7;
    }
    
    /* ====== ANSWER SECTION - BLACK BORDER, WHITE BACKGROUND ====== */
    .answer-content {
        margin: 0;
        padding: 0.5rem;
        border-left: 6px solid var(--brand-black);  /* Changed to black */
        border-radius: 0;
        width: 100%;
        background: white;  /* Pure white background */
        position: relative;
        box-shadow: inset 0 0 0 1px rgba(0,0,0,0.02);  /* Subtle definition */
    }
    
    /* Remove the gold gradient line */
    .answer-content::before {
        display: none;
    }
    
    /* Answer headings in black (or keep gold for accent) */
    .answer-content h6 {
        color: var(--brand-black) !important;
        font-weight: 700;
        font-size: 1.1rem;
    }
    
    .answer-content h6 i {
        color: var(--brand-gold);  /* Keep icons gold for subtle accent */
    }
    
    /* Workings section with black left border */
    .answer-content .workings-text {
        border-left: 3px solid var(--brand-black);
        padding-left: 1rem;
        margin-top: 1rem;
        background: white;
        padding: 1rem;
        border-radius: 0 4px 4px 0;
    }
    
    /* Answer text styling */
    .answer-content .answer-text {
        color: var(--brand-dark);
        line-height: 1.7;
    }
    
    /* Offline badge - keep subtle */
    .answer-content .text-muted {
        color: var(--brand-gray) !important;
        font-size: 0.75rem;
    }
    
    /* ====== BUTTONS - COLORFUL FOR VARIETY ====== */
    
    /* Show Answer button - GOLD (primary action) */
    .buttons-left .show-answer-btn {
        background: var(--brand-gold);
        color: var(--brand-black);
        border: 2px solid var(--brand-gold);
        font-weight: 700;
        min-width: 120px;
        box-shadow: 0 2px 8px rgba(218,165,32,0.2);
    }
    
    .buttons-left .show-answer-btn:hover {
        background: var(--brand-gold-light);
        border-color: var(--brand-gold-light);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(218,165,32,0.3);
    }
    
    /* When answer is showing - BLACK (state change) */
    .buttons-left .show-answer-btn.btn-dark {
        background: var(--brand-black);
        color: white;
        border: 2px solid var(--brand-black);
    }
    
    .buttons-left .show-answer-btn.btn-dark:hover {
        background: var(--brand-dark);
        border-color: var(--brand-dark);
    }
    
    /* PDF button - SUCCESS GREEN */
    .buttons-left a.btn-success {
        background: var(--brand-success);
        color: white;
        border: 2px solid var(--brand-success);
        font-weight: 600;
        box-shadow: 0 2px 8px rgba(40, 167, 69, 0.2);
    }
    
    .buttons-left a.btn-success:hover {
        background: #218838;
        border-color: #218838;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    }
    
    /* Comment button - INFO BLUE */
    .buttons-right .add-comment-btn {
        background: var(--brand-info);
        color: white;
        border: 2px solid var(--brand-info);
        font-weight: 600;
        box-shadow: 0 2px 8px rgba(23, 162, 184, 0.2);
    }
    
    .buttons-right .add-comment-btn:hover {
        background: #138496;
        border-color: #138496;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
    }
    
    /* ====== CARD HEADER - CLEAN WHITE WITH BLACK BOTTOM ====== */
    .question-card .card-header {
        padding: 1.5rem 1rem;
        border-radius: 0;
        background: white;
        border-bottom: 3px solid var(--brand-black);  /* Changed to black */
        position: relative;
    }
    
    /* Question number - keep gold for contrast */
    .question-number {
        color: var(--brand-gold);
        font-size: 1.6rem;
        font-weight: 800;
    }
    
    .question-number::before {
        background: var(--brand-gold);
        color: white;
    }
    
    /* View topics button - black outline (matches header) */
    .view-topics-btn {
        border: 2px solid var(--brand-black);
        color: var(--brand-black);
        background: transparent;
        font-weight: 600;
    }
    
    .view-topics-btn:hover {
        background: var(--brand-black);
        color: white;
    }
    
    /* Topics badges - keep gold for pop */
    .topic-badge {
        background: linear-gradient(135deg, var(--brand-gold) 0%, var(--brand-gold-light) 100%);
        color: var(--brand-black);
        font-weight: 600;
    }
    
    /* ====== TOPICS CONTAINER ====== */
    .topics-container {
        margin-left: -1rem;
        margin-right: -1rem;
        width: calc(100% + 2rem);
        border-radius: 0;
        padding: 1rem;
        background: white;
        border-top: 2px solid var(--brand-black);
        border-bottom: 2px solid var(--brand-gold-soft);
    }
    
    /* ====== BREADCRUMBS ====== */
    .nav-breadcrumbs {
        background: white;
        border-left: 4px solid var(--brand-gold);  /* Keep gold for brand pop */
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    }
    
    /* ====== PERIOD HEADER - KEEP GOLD ACCENTS ====== */
    .period-header {
        background: linear-gradient(135deg, var(--brand-black) 0%, #000000 100%);
        border-bottom: 4px solid var(--brand-gold);
    }
    
    /* ====== DOWNLOAD BANNER ====== */
    .download-banner {
        background: linear-gradient(135deg, #fffaf0 0%, #fff3cd 100%);
        border: 2px solid var(--brand-gold);
    }
    
    .download-banner .btn {
        background: var(--brand-gold);
        color: var(--brand-black);
    }
    
    /* ====== SIDEBAR ====== */
    .sidebar-card .card-header {
        background: linear-gradient(135deg, var(--brand-black) 0%, var(--brand-dark) 100%);
        border-bottom: 3px solid var(--brand-gold);
    }
    
    .sidebar-card .list-group-item.active {
        background: #fffaf0;
        border-left: 4px solid var(--brand-gold);
    }
    
    /* ====== FLOATING BUTTON ====== */
    .btn-floating-scroll {
        background: var(--brand-gold);
        color: var(--brand-black);
        border: 2px solid var(--brand-gold);
    }
    
    /* ====== CUSTOM TOAST ====== */
    .custom-toast {
        border-left: 6px solid var(--brand-gold);
    }
    
    /* ====== BUTTON GROUP LAYOUT - FIXED SPACING ====== */
    .buttons-left, 
    .buttons-right {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 10px !important;
    }
    
    .btn {
        padding: 8px 16px !important;
        border-radius: 30px !important;
        font-size: 14px !important;
        white-space: nowrap !important;
        transition: all 0.2s ease !important;
    }
    
    /* Add left margin to first button for spacing from edge */
    .buttons-left .btn:first-child {
        margin-left: 0.25rem;
    }
    
    /* Add right margin to last button for spacing from edge */
    .buttons-right .btn:last-child {
        margin-right: 0.25rem;
    }
    
    /* Hide scrollbar but keep functionality */
    .buttons-bar::-webkit-scrollbar { display: none; }
    .buttons-bar { scrollbar-width: none; }
.comment-section {
        padding: 1.25rem;
        margin-left: -15px;
        margin-right: -15px;
        width: calc(100% + 30px);
        border-radius: 0;
    }
    
    .comment-header {
        gap: 12px;
    }
    
    .comment-header img,
    .profile-avatar {
        width: 38px;
        height: 38px;
        border-width: 2px;
    }
    
    .comment-input {
        padding: 12px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 90px;
        border-radius: 10px;
    }
    
    .comment-buttons {
        gap: 10px;
    }
    
    .comment-buttons .btn {
        padding: 10px 20px;
        min-width: 100px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .comment-section {
        padding: 1rem;
    }
    
    .comment-header {
        gap: 10px;
    }
    
    .comment-header img,
    .profile-avatar {
        width: 32px;
        height: 32px;
    }
    
    .comment-input {
        padding: 10px 14px;
        min-height: 80px;
        font-size: 15px;
        border-radius: 8px;
    }
    
    /* Stack buttons vertically on very small screens */
    .comment-buttons {
        flex-direction: column-reverse;
        gap: 8px;
    }
    
    .comment-buttons .btn {
        width: 100%;
        padding: 12px;
        min-width: auto;
    }
}

/* Optional: For extremely small screens, hide profile image */
@media (max-width: 360px) {
    .profile-img-container {
        display: none;
    }
    
    .comment-header {
        margin-top: 0;
    }
}