:root {
    --primary-color: #ff9900;
    --secondary-color: #232f3e;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --border-color: #dee2e6;
    --success-color: #28a745;
    --danger-color: #dc3545;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background-color: var(--secondary-color);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-links a {
    color: white;
    text-decoration: none;
    margin-left: 2rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Announcement Banner */
.announcement-banner {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-bottom: 3px solid #f59e0b;
    padding: 0.75rem 0;
    position: relative;
}

.announcement-banner.type-discount {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border-bottom-color: #22c55e;
}

.announcement-banner.type-warning {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-bottom-color: #ef4444;
}

.announcement-banner.type-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-bottom-color: #3b82f6;
}

.announcement-banner .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.announcement-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.announcement-new-badge {
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

.announcement-title {
    font-weight: 700;
    color: #1f2937;
    font-size: 0.95rem;
}

.announcement-message {
    color: #374151;
    font-size: 0.9rem;
}

.announcement-link {
    color: #2563eb;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    padding: 0.25rem 0.75rem;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 4px;
    transition: all 0.3s;
}

.announcement-link:hover {
    background: rgba(37, 99, 235, 0.2);
}

.announcement-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0 0.5rem;
    line-height: 1;
    transition: color 0.3s;
}

.announcement-close:hover {
    color: #1f2937;
}

@media (max-width: 768px) {
    .announcement-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .announcement-banner .container {
        align-items: flex-start;
    }

    .announcement-close {
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
    }
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--secondary-color) 0%, #3a4a5e 100%);
    color: white;
    border-radius: 8px;
    margin: 2rem 0;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 24px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    box-shadow: none;
    outline: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.btn-primary::before {
    display: none;
}

.btn-primary:hover:not(:disabled) {
    background-color: #e88b00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.3);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0) scale(0.95);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
    border: 2px solid var(--secondary-color);
}

.btn-secondary:hover:not(:disabled) {
    background-color: #1a252f;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(35, 47, 62, 0.3);
}

.btn-secondary:active:not(:disabled) {
    transform: translateY(0) scale(0.95);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.btn:disabled,
.btn-primary:disabled,
.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    transform: none;
}

.btn .arrow {
    font-weight: 300;
    font-size: 1.4em;
    line-height: 0.8;
    margin: 0 0.3rem;
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover:not(:disabled) {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.2);
}

.btn-outline:active:not(:disabled) {
    transform: translateY(0) scale(0.95);
}

.btn-correct {
    background-color: #5cb85c !important;
    color: white !important;
    opacity: 1 !important;
}

.btn-incorrect {
    background-color: #f0ad4e !important;
    color: white !important;
    opacity: 1 !important;
}

/* Features Section */
.features, .pricing {
    padding: 4rem 0;
}

.features h2, .pricing h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--secondary-color);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 2rem;
    background-color: var(--light-bg);
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.feature-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Pricing Section */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.pricing-card {
    padding: 2rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
}

.pricing-card.featured {
    border-color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.pricing-card h3 {
    color: var(--secondary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.price {
    font-size: 2.5rem;
    color: var(--primary-color);
    font-weight: bold;
    margin: 1rem 0;
}

.pricing-card ul {
    list-style: none;
    margin: 2rem 0;
}

.pricing-card li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

/* Quiz Page */
.quiz-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.question-card {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    position: relative; /* Enable absolute positioning for children */
}

.question-number {
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 1rem;
}

.question-text {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.question-image {
    margin: 1.5rem 0;
    text-align: center;
}

.question-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.question-image img:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.option {
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    transform-origin: center;
}

.option:hover {
    border-color: var(--primary-color);
    background-color: var(--light-bg);
    transform: scale(1.02);
}

.option:active {
    transform: scale(0.98);
}

.option.selected {
    border-color: var(--primary-color);
    background-color: #fff8e1;
    transform: scale(1.02);
}

.option.correct {
    border-color: var(--success-color);
    background-color: #d4edda;
    animation: correctPulse 0.5s ease;
}

.option.incorrect {
    border-color: var(--danger-color);
    background-color: #f8d7da;
    animation: shake 0.4s ease;
}

@keyframes correctPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.explanation {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: var(--light-bg);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    display: none;
}

.explanation.show {
    display: block;
}

.quiz-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

/* Premium Upgrade Prompt */
.premium-upgrade-prompt {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #fff3cd 0%, #ffe8a1 100%);
    border: 2px solid #ffc107;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.2);
    animation: slideIn 0.5s ease-out;
}

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

.upgrade-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.upgrade-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.upgrade-text {
    flex: 1;
    min-width: 250px;
}

.upgrade-text strong {
    display: block;
    font-size: 1.1rem;
    color: #856404;
    margin-bottom: 0.3rem;
}

.upgrade-text p {
    margin: 0;
    color: #856404;
    font-size: 0.95rem;
}

.btn-premium {
    background: linear-gradient(135deg, var(--primary-color) 0%, #f6b93b 100%);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.3);
    transition: all 0.3s ease;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 153, 0, 0.4);
}

/* User Status Badge */
.badge {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    text-align: center;
    line-height: 1.4;
    min-width: 85px;
}

.badge-status {
    white-space: nowrap;
    display: inline-block;
}

.badge small {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0.9;
    margin-top: 0.1rem;
    letter-spacing: 0.3px;
}

.badge-free {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.badge-premium {
    background: linear-gradient(135deg, var(--primary-color) 0%, #f6b93b 100%);
    color: white;
    box-shadow: 0 2px 12px rgba(255, 153, 0, 0.3);
}

.badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Premium Gate */
.premium-gate {
    text-align: center;
    padding: 4rem 2rem;
    background-color: var(--light-bg);
    border-radius: 16px;
    margin: 2rem 0;
}

.premium-gate h2 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.premium-gate p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Auth Forms */
.auth-container {
    max-width: 400px;
    margin: 3rem auto;
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Footer */
footer {
    background-color: var(--secondary-color);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

/* Certifications Section */
.certifications {
    margin: 4rem 0;
}

.section-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.cert-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 480px;
}

.cert-card.available {
    border: none;
    box-shadow: 0 0 0 2px var(--primary-color), 0 4px 15px rgba(0,0,0,0.1);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.cert-card.coming-soon {
    opacity: 0.9;
    border: 2px solid #e0e0e0;
}

.cert-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.cert-card.coming-soon:hover {
    transform: none;
}

.cert-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary-color);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.cert-card.coming-soon .cert-badge {
    background: #95a5a6;
}

.cert-level {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    width: fit-content;
    flex-shrink: 0;
}

.cert-level.foundational {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
    color: white;
}

.cert-level.associate {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.cert-level.professional {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.cert-level.specialty {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
}

.cert-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
    flex-shrink: 0;
    min-height: 4rem;
    display: flex;
    align-items: flex-start;
}

.cert-code {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.cert-card p {
    color: #333;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex-shrink: 0;
    min-height: 3rem;
}

.cert-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1.5rem 0;
    padding: 1rem;
    background: #e9ecef;
    border-radius: 8px;
    flex-shrink: 0;
    border: 1px solid #dee2e6;
    min-height: 100px;
}

.cert-stats span {
    font-size: 0.9rem;
    color: #555;
    height: 1.5rem;
    display: flex;
    align-items: center;
}

.cert-actions {
    display: flex;
    gap: 1rem;
    margin-top: auto;
    padding-top: 1.5rem;
}

.cert-actions .btn {
    flex: 1;
    text-align: center;
    padding: 0.8rem;
}

.cert-actions.single-button .btn-primary {
    flex: 1;
}

.cert-actions button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Certification Levels Section */
.certification-levels {
    margin: 4rem 0;
    padding: 3rem 0;
    background: var(--light-bg);
}

.levels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.level-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.level-card:hover {
    transform: translateY(-5px);
}

.level-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.level-icon.foundational {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
}

.level-icon.associate {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.level-icon.professional {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.level-icon.specialty {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.level-card h3 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.level-card p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.level-example {
    display: block;
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-top: 1rem;
}

/* ============================================
   JSON Code Block Styles
   ============================================ */

.option-content {
    width: 100%;
}

.json-code-block {
    margin: 0;
    padding: 1rem;
    background: #282c34;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2);
}

.json-code {
    display: block;
    color: #abb2bf;
    white-space: pre;
    margin: 0;
    padding: 0;
}

/* JSON Syntax Highlighting Colors (inspired by VS Code Dark+ theme) */
.json-key {
    color: #61afef; /* Light blue for keys */
    font-weight: 500;
}

.json-string {
    color: #98c379; /* Green for string values */
}

.json-number {
    color: #d19a66; /* Orange for numbers */
}

.json-boolean {
    color: #c678dd; /* Purple for booleans */
    font-weight: 600;
}

.json-null {
    color: #e06c75; /* Red for null */
    font-style: italic;
}

/* Option styling adjustments for JSON content */
.option .json-code-block {
    margin-top: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option:hover .json-code-block {
    box-shadow: 0 0 0 2px var(--primary-color), inset 0 2px 8px rgba(0, 0, 0, 0.2);
}

.option.selected .json-code-block {
    box-shadow: 0 0 0 3px var(--primary-color), inset 0 2px 8px rgba(0, 0, 0, 0.2);
}

.option.correct .json-code-block {
    box-shadow: 0 0 0 3px var(--success-color), inset 0 2px 8px rgba(0, 0, 0, 0.2);
}

.option.incorrect .json-code-block {
    box-shadow: 0 0 0 3px var(--danger-color), inset 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Mobile responsive for JSON blocks */
@media (max-width: 768px) {
    .json-code-block {
        font-size: 0.75rem;
        padding: 0.75rem;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .nav-links a {
        margin-left: 1rem;
    }

    .cert-grid {
        grid-template-columns: 1fr;
    }

    .cert-card {
        min-height: auto;
    }

    .levels-grid {
        grid-template-columns: 1fr;
    }

    .cert-actions {
        flex-direction: column;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading State Styles */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 60px 20px;
    text-align: center;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    margin-top: 20px;
    font-size: 16px;
    color: #666;
    font-weight: 500;
}

/* User Menu Dropdown Styles */
.user-menu-container {
    position: relative;
    display: inline-block;
}

.user-profile-button {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 12px 4px 4px;
    border-radius: 20px;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.1);
}

.user-profile-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
}

.user-avatar-initials {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    border: 2px solid #fff;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
    color: white;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-arrow {
    color: white;
    transition: transform 0.3s ease;
}

.user-profile-button:hover .dropdown-arrow {
    transform: translateY(2px);
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    min-width: 240px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

.user-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 16px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, #3a4a5e 100%);
    color: white;
}

.dropdown-user-info strong {
    display: block;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.dropdown-email {
    display: block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 4px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #2d3748 !important;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.dropdown-item svg {
    flex-shrink: 0;
    color: #666;
    transition: color 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f7fafc;
    color: #1a202c !important;
}

.dropdown-item:hover svg {
    color: #1a202c;
}

.dropdown-logout {
    color: #dc3545 !important;
}

.dropdown-logout:hover {
    background-color: #f7fafc;
    color: #c82333 !important;
}

.dropdown-logout svg {
    color: #dc3545 !important;
}

.dropdown-logout:hover svg {
    color: #c82333 !important;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .user-name {
        display: none;
    }

    .user-profile-button {
        padding: 4px;
    }

    .dropdown-arrow {
        display: none;
    }

    .user-dropdown-menu {
        min-width: 200px;
    }
}

/* ============================================
   Settings Modal Styles
   ============================================ */

/* Settings Modal Container */
.settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.settings-modal.show {
    display: flex;
}

/* Modal Overlay */
.settings-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Modal Content */
.settings-modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    z-index: 1;
}

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

/* Modal Header */
.settings-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 2px solid var(--border-color);
    flex-shrink: 0;
}

.settings-modal-header h2 {
    margin: 0;
    color: var(--secondary-color);
    font-size: 1.5rem;
}

.settings-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-close-btn:hover {
    background: #f0f0f0;
    color: #333;
}

/* Modal Body */
.settings-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    display: flex;
}

/* Settings Tabs */
.settings-tabs {
    flex-shrink: 0;
    width: 200px;
    background: #f8f9fa;
    padding: 1.5rem 0;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.settings-tab {
    background: none;
    border: none;
    padding: 0.75rem 1.5rem;
    text-align: left;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.settings-tab svg {
    flex-shrink: 0;
}

.settings-tab:hover {
    background: rgba(255, 153, 0, 0.1);
    color: var(--primary-color);
}

.settings-tab.active {
    background: white;
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

/* Tab Content */
.settings-tab-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.settings-tab-panel {
    display: none;
}

.settings-tab-panel.active {
    display: block;
}

/* Settings Sections */
.settings-section {
    margin-bottom: 2.5rem;
}

.settings-section:last-child {
    margin-bottom: 0;
}

.settings-section h3 {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.settings-section h4 {
    font-size: 1rem;
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
}

.section-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* Profile Info Card */
.profile-info-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.profile-avatar-section {
    flex-shrink: 0;
}

.current-avatar-wrapper {
    position: relative;
}

.current-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.current-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-initials {
    color: white;
    font-size: 2rem;
    font-weight: bold;
}

.change-avatar-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--primary-color);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.change-avatar-btn:hover {
    background: #e88b00;
    transform: scale(1.1);
}

.profile-details {
    flex: 1;
}

.profile-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #dee2e6;
}

.profile-detail-row:last-child {
    border-bottom: none;
}

.profile-detail-row label {
    font-weight: 600;
    color: #666;
    font-size: 0.9rem;
}

.profile-detail-row span {
    color: var(--secondary-color);
    font-weight: 500;
}

/* Avatar Change Section */
.avatar-change-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.avatar-options {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.avatar-option-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.avatar-option-group label {
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.preset-avatars {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 0.75rem;
}

.preset-avatar-option {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.2s ease;
}

.preset-avatar-option img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preset-avatar-option:hover {
    border-color: var(--primary-color);
    transform: scale(1.1);
}

.preset-avatar-option.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.2);
}

.avatar-option-divider {
    text-align: center;
    position: relative;
    padding: 1rem 0;
}

.avatar-option-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
}

.avatar-option-divider span {
    position: relative;
    background: #f8f9fa;
    padding: 0 1rem;
    color: #666;
    font-size: 0.9rem;
}

.custom-avatar-input-group {
    display: flex;
    gap: 0.75rem;
}

.custom-avatar-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
}

.custom-avatar-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.custom-avatar-preview {
    margin-top: 0.75rem;
    text-align: center;
}

.custom-avatar-preview img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
}

.error-text {
    color: var(--danger-color);
    font-size: 0.85rem;
}

.avatar-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* Exam List Styles */
.exam-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.exam-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.exam-card.owned {
    border-color: var(--success-color);
    background: linear-gradient(135deg, #f0fff4 0%, #e6f9ed 100%);
}

.exam-card.available:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.1);
}

.exam-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.exam-card-header h4 {
    margin: 0 0 0.5rem 0;
    color: var(--secondary-color);
    font-size: 1.1rem;
}

.exam-code-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--primary-color);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 12px;
    letter-spacing: 0.5px;
}

.owned-badge {
    background: var(--success-color);
    color: white;
    padding: 0.4rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.price-badge {
    background: linear-gradient(135deg, var(--primary-color) 0%, #f6b93b 100%);
    color: white;
    padding: 0.4rem 0.75rem;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: bold;
}

.exam-card-details {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.exam-card-actions {
    display: flex;
    gap: 0.75rem;
}

.exam-card-actions .btn {
    flex: 1;
    text-align: center;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
}

.empty-state p {
    margin-bottom: 0.5rem;
}

.empty-state-hint {
    font-size: 0.9rem;
    color: #999;
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.85rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Exam Progress List */
.exam-progress-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.progress-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
}

.progress-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.progress-card-header h4 {
    margin: 0;
    color: var(--secondary-color);
    font-size: 1rem;
}

.progress-percent {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--primary-color);
}

.progress-bar-container {
    width: 100%;
    height: 10px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, #f6b93b 100%);
    transition: width 0.5s ease;
    border-radius: 10px;
}

.progress-stats {
    font-size: 0.85rem;
    color: #666;
}

/* Modal Footer */
.settings-modal-footer {
    border-top: 2px solid var(--border-color);
    padding: 1rem 2rem;
    background: #f8f9fa;
    flex-shrink: 0;
    text-align: center;
}

.settings-footer-text {
    margin: 0 0 0.5rem 0;
    font-size: 0.85rem;
    color: #666;
}

.settings-footer-links {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    align-items: center;
}

.settings-footer-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s ease;
}

.settings-footer-link:hover {
    color: #e88b00;
    text-decoration: underline;
}

.footer-separator {
    color: #ccc;
}

/* Danger Button */
.btn-danger {
    background-color: var(--danger-color);
    color: white;
    border: 2px solid transparent;
}

.btn-danger:hover {
    background-color: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
    z-index: 10001;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-success {
    border-left: 4px solid var(--success-color);
}

.notification-warning {
    border-left: 4px solid #ffc107;
}

.notification-info {
    border-left: 4px solid #17a2b8;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    padding: 0;
    margin-left: auto;
}

.notification-close:hover {
    color: #333;
}

/* Responsive Settings Modal */
@media (max-width: 768px) {
    .settings-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .settings-modal-body {
        flex-direction: column;
    }

    .settings-tabs {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 0.5rem 0;
    }

    .settings-tab {
        flex-direction: column;
        text-align: center;
        padding: 0.5rem 1rem;
        gap: 0.25rem;
        font-size: 0.8rem;
        border-left: none;
        border-bottom: 3px solid transparent;
        white-space: nowrap;
    }

    .settings-tab.active {
        border-left: none;
        border-bottom-color: var(--primary-color);
    }

    .settings-tab svg {
        width: 20px;
        height: 20px;
    }

    .settings-tab-content {
        padding: 1.5rem 1rem;
    }

    .profile-info-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .exam-card-actions {
        flex-direction: column;
    }

    .preset-avatars {
        grid-template-columns: repeat(4, 1fr);
    }

    .custom-avatar-input-group {
        flex-direction: column;
    }

    .notification {
        min-width: auto;
        right: 10px;
        left: 10px;
    }
}

/* ==========================================
   QUESTION REPORTING SYSTEM
   ========================================== */

/* Report Issue Button - Three-dot menu */
.report-issue-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background-color: transparent;
    border: none;
    color: #6c757d;
    padding: 0.25rem 0.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.3;
    transition: opacity 0.3s ease, color 0.3s ease;
    line-height: 1;
    font-weight: bold;
}

/* Show the menu when hovering over the question card */
.question-card:hover .report-issue-btn {
    opacity: 0.6;
}

/* Full opacity when hovering directly over the button */
.report-issue-btn:hover {
    opacity: 1;
    color: #dc3545;
}

/* Modal Overlay */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal Content */
.modal-content {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Modal Header */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--danger-color);
}

/* Modal Body */
.modal-body {
    padding: 1.5rem;
}

.modal-question-info {
    background-color: var(--light-bg);
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-color);
}

.question-preview {
    display: block;
    margin-top: 0.5rem;
    color: #666;
    font-size: 0.9rem;
    font-style: italic;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.char-counter {
    display: block;
    text-align: right;
    color: #999;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Modal Footer */
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--secondary-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    min-width: 300px;
    max-width: 500px;
    text-align: center;
    transition: bottom 0.3s ease;
}

.toast.show {
    bottom: 30px;
}

.toast-success {
    background-color: var(--success-color);
}

.toast-error {
    background-color: var(--danger-color);
}

.toast-info {
    background-color: #17a2b8;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .modal-header {
        padding: 1rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-header h2 {
        font-size: 1.25rem;
    }

    .modal-footer {
        flex-direction: column;
    }

    .modal-footer .btn {
        width: 100%;
    }

    .toast {
        min-width: 250px;
        max-width: 90%;
    }
}
