/* Questions Index Page Styles */

/* Mobile Category Selector */
.mobile-category-selector {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
    border: none;
    position: relative;
    overflow: hidden;
}

.mobile-category-selector::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.1)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

.category-dropdown .form-select {
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 15px 20px;
    font-size: 1rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.95);
    color: #2c3e50;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
}

.category-dropdown .form-select:focus {
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
}

.subcategory-pills {
    margin-top: 20px;
}

.pill-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 10px 5px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.pill-container::-webkit-scrollbar {
    display: none;
}

.subcategory-pill {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #495057;
    padding: 12px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    border: 2px solid rgba(255, 255, 255, 0.8);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.subcategory-pill::before {
    content: '📚';
    font-size: 0.8rem;
    opacity: 0.7;
}

.subcategory-pill:hover {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1565c0;
    text-decoration: none;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(21, 101, 192, 0.3);
    border-color: rgba(21, 101, 192, 0.3);
}

.subcategory-pill.active {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    color: white;
    border-color: #1976d2;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
    transform: translateY(-2px);
}

.subcategory-pill.active::before {
    content: '✅';
    opacity: 1;
}

@media (max-width: 768px) {
    .mobile-category-selector {
        margin: 0 -15px 20px -15px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .pill-container {
        padding: 5px 15px;
        margin: 0 -15px;
    }
    
    .question-card {
        margin-bottom: 12px;
    }
    
    .question-card .card-body {
        padding: 15px;
    }
    
    .question-title {
        font-size: 1rem;
        line-height: 1.4;
    }
    
    .question-meta .badge {
        font-size: 0.75rem;
        margin-bottom: 3px;
    }
    
    .btn-outline-primary {
        font-size: 0.85rem;
        padding: 6px 12px;
    }
    
    .pdf-mobile-btn {
        border: none;
        background: none;
        color: #dc3545;
        font-size: 1.5rem;
        padding: 8px;
    }
}
.category-sidebar {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.8);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    z-index: 1;
    scroll-behavior: smooth;
    position: relative;
    backdrop-filter: blur(10px);
}

.category-sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(0,0,0,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
    border-radius: 16px;
}

.subcategory-item.active {
    scroll-margin-top: 100px;
    scroll-margin-bottom: 100px;
}

.category-sidebar h5 {
    color: #2c3e50;
    font-weight: 700;
    border-bottom: 3px solid linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    padding-bottom: 12px;
    margin-bottom: 20px;
    font-size: 1.2rem;
    position: relative;
    z-index: 1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-group {
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.category-link {
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 8px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(102, 126, 234, 0.1);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #495057;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.category-link::before {
    content: '📂';
    font-size: 1rem;
    margin-right: 10px;
    opacity: 0.8;
}

.category-link:hover {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    transform: translateX(8px) translateY(-2px);
    color: #1565c0;
    text-decoration: none;
    box-shadow: 0 8px 25px rgba(21, 101, 192, 0.2);
    border-color: rgba(21, 101, 192, 0.3);
}

.category-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    transform: translateX(5px) translateY(-2px);
    border-color: rgba(102, 126, 234, 0.5);
}

.category-link.active::before {
    content: '📁';
    opacity: 1;
}

.category-arrow {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-left: 10px;
    font-size: 0.9rem;
    opacity: 0.7;
}

.category-arrow.rotated {
    transform: rotate(90deg);
    opacity: 1;
}

.subcategories {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-left: 20px;
    margin-top: 5px;
    border-left: 3px solid rgba(102, 126, 234, 0.2);
    padding-left: 15px;
}

.subcategories.show {
    max-height: 1000px;
}

.subcategory-all {
    color: #ffffff;
    padding: 12px 20px;
    margin-bottom: 6px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
    font-style: italic;
    background: linear-gradient(135deg, #4fc3f7 0%, #29b6f6 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    text-decoration: none;
    position: relative;
    z-index: 1;
    box-shadow: 0 2px 8px rgba(79, 195, 247, 0.3);
}

.subcategory-all::before {
    content: '📄';
    margin-right: 8px;
    opacity: 0.6;
}

.subcategory-all:hover {
    color: #ffffff;
    background: linear-gradient(135deg, #03a9f4 0%, #0288d1 100%);
    text-decoration: none;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(3, 169, 244, 0.4);
}

.subcategory-item {
    color: #ffffff;
    padding: 12px 25px;
    margin-bottom: 6px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
    font-weight: 500;
    background: linear-gradient(135deg, #4fc3f7 0%, #29b6f6 100%) !important;
    border-radius: 8px;
    display: flex;
    align-items: center;
    text-decoration: none;
    border: 2px solid rgba(79, 195, 247, 0.3);
    position: relative;
    z-index: 1;
    box-shadow: 0 2px 8px rgba(79, 195, 247, 0.3);
}

.subcategory-item::before {
    content: '📋';
    margin-right: 8px;
    opacity: 0.7;
}

.subcategory-item:hover {
    color: #ffffff;
    background: linear-gradient(135deg, #03a9f4 0%, #0288d1 100%) !important;
    text-decoration: none;
    transform: translateX(8px);
    box-shadow: 0 6px 20px rgba(3, 169, 244, 0.4);
    border-color: rgba(3, 169, 244, 0.5);
}

.subcategory-item.active, .subcategory-all.active {
    color: #ffffff;
    font-weight: 600;
    background: linear-gradient(135deg, #0277bd 0%, #01579b 100%) !important;
    border-color: rgba(2, 119, 189, 0.6);
    box-shadow: 0 6px 20px rgba(2, 119, 189, 0.4);
    transform: translateX(5px);
}

.subcategory-item.active::before, .subcategory-all.active::before {
    content: '✅';
    opacity: 1;
}
.question-card {
    transition: transform 0.2s;
    margin-bottom: 15px;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.question-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.question-meta {
    font-size: 0.85rem;
    color: #6c757d;
}
.badge-category {
    background-color: #17a2b8;
    color: white;
}
.badge-subcategory {
    background-color: #6c757d;
    color: white;
}
.question-title {
    color: #343a40;
    text-decoration: none;
}
.question-title:hover {
    color: #007bff;
}

/* Question Show Page Styles */
.question-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #2c3e50;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
}
.back-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.back-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    color: white;
}
.question-content {
    font-size: 1rem;
    line-height: 1.7;
    color: #444;
}
.options-container {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid #e9ecef;
}
.option-item {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 15px;
    margin: 8px 0;
    transition: all 0.3s ease;
}
.option-item:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0,123,255,0.1);
}
.option-correct {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
    font-weight: 600;
}
.answer-section {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border-radius: 12px;
    padding: 25px;
    margin: 25px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.answer-title {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 15px;
}
.badge-custom {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-right: 8px;
}
.comment-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.comment-item {
    border-bottom: 1px solid #f1f3f4;
    padding: 20px;
    transition: background 0.3s ease;
}
.comment-item:hover {
    background: #f8f9fa;
}
.comment-item:last-child {
    border-bottom: none;
}
.comment-meta {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 8px;
}
.comment-form {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    padding: 25px;
    border-radius: 12px;
    margin-top: 20px;
}
.sidebar-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    overflow: hidden;
}
.sidebar-card .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 20px;
}
.list-group-item {
    border: none;
    border-bottom: 1px solid #f1f3f4;
    padding: 12px 20px;
    transition: all 0.3s ease;
}
.list-group-item:hover {
    background: #f8f9fa;
    transform: translateX(5px);
}