:root {
    /* Dark theme colors */
    --bg-primary: #0a0a0a;      /* Main background */
    --bg-secondary: #141414;    /* Card/section background */
    --bg-tertiary: #1c1c1c;     /* Hover states, highlights */
    
    /* Accent colors */
    --accent-red: #dc3545;
    --accent-blue: #0d6efd;
    --accent-yellow: #ffc107;
    
    /* Text colors */
    --text-primary: #ffffff;     /* Main text */
    --text-secondary: #b3b3b3;   /* Secondary text */
    --text-muted: #808080;       /* Muted text */
    
    /* Border colors */
    --border-primary: #2a2a2a;   /* Main borders */
    --border-secondary: #333333; /* Secondary borders */
    --accent-blue-dark: #0b5ed7;
    --transition-fast: 0.1s ease;
    --transition-medium: 0.2s ease;

    --shadow : #bbbdcf;
    --accent: #22d3ee;

}

.logo{
    padding-top: 10px;
    width: 200px;
    height: auto;
    border-radius: 10%;
}

@import url('https://fonts.googleapis.com/css2?family=Google+Sans+Code:ital,wght@0,300..800;1,300..800&display=swap');

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-family: "Google Sans Code", monospace;


}

.rules-container {
    max-width: 7000px;
    margin: 48px auto;
    background: var(--bg-tertiary);
    border-radius: 18px;
    padding: 36px 30px 22px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 2px solid var(--bg-secondary);
}

.rules-header {
    text-align: center;
    margin-bottom: 2em;
}

.subtitle {
    color: var(--text-primary);
    font-size: 1.05rem;
    margin-top: 8px;
    font-weight: 500;
}

.rules-list {
    counter-reset: rule-num;
    padding-left: 0;
    margin: 0 0 30px 0;
    width: 100%;
}

.rules-list li {
    list-style: none;
    background: var(--bg-secondary);
    padding: 16px 24px 16px 120px;
    margin-bottom: 16px;
    border-radius: 8px;
    font-size: 1.11rem;
    color: var(--text);
    position: relative;
    border-left: 5px solid var(--border-primary);
    transition: background .2s;
}

.rules-list li::before {
    counter-increment: rule-num;
    content: "Rule " counter(rule-num) ":";
    font-weight: bold;
    color: var(--accent);
    position: absolute;
    left: 30px;
    top: 16px;
    font-size: 1.08rem;
}

.rules-list li:last-child {
    margin-bottom: 0;
}

footer {
    margin-top: 15px;
    text-align: center;
    color: var(--text-primary);
    font-size: 0.93rem;
}

footer a {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px dotted var(--accent);
    transition: border .18s;
}

footer a:hover {
    border-bottom: 1px solid var(--border-primary);
}

.question-nav {
    display: flex;
    justify-content: center;
    gap: 1em;
    margin-top: 2em;
}

.question-nav .btn {
    background-color: #007bff;        /* Bootstrap primary color */
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 0.75em 2em;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.question-nav .btn:disabled {
    background-color: #bfbfbf;
    color: #f6f6f6;
    cursor: not-allowed;
    box-shadow: none;
}

.question-nav .btn:hover:not(:disabled) {
    background-color: #0056b3;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.fade-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    pointer-events: none;
    background: #181a1b; /* or match your bg */
    opacity: 0;
    z-index: 99999;
    transition: opacity 0.4s cubic-bezier(.4,0,.2,1);
}

.fade-overlay.active {
    opacity: 1;
    pointer-events: all;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* Navigation */
nav {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
    padding: 1rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.nav-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
}

.branding {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-name {
    font-size: 1.75rem;
    font-weight: bold;
    color: var(--accent-red);
    letter-spacing: -0.5px;
}

.event-name {
    font-size: 1rem;
    color: var(--text-secondary);
    padding-left: 1rem;
    border-left: 2px solid var(--border-secondary);
}

nav .nav-links a {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

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

/* Main Content */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Cards and Containers */
.question-card, .auth-container, .admin-section, .profile-section {
    background: var(--bg-secondary);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-primary);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Forms */
input, textarea, select {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-secondary);
    color: var(--text-primary);
    padding: 0.75rem;
    border-radius: 4px;
    width: 100%;
    margin-top: 0.5rem;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25);
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--accent-blue);
    color: white;
}

.btn-primary:hover {
    background: #0b5ed7;
}

.btn-delete {
    background: var(--accent-red);
    color: white;
}

.btn-delete:hover {
    background: #bb2d3b;
}

.btn-unlock {
    background: var(--accent-yellow);
    color: black;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 25px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 180px;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(255, 193, 7, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-unlock:hover {
    background: #ffca2c;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255, 193, 7, 0.3);
}

.btn-unlock:disabled {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.8;
    transform: none;
    box-shadow: none;
    border: 1px solid var(--border-secondary);
}

.btn-unlock:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Hints Section */
.hints {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-primary);
}

.locked-hint {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    margin: 0.75rem 0;
    border: 1px solid var(--border-secondary);
}

.hint {
    color: var(--text-secondary);
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 4px;
    margin: 0.5rem 0;
}

.hint-cost {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hint-cost span {
    color: var(--accent-yellow);
    font-weight: 600;
    font-size: 1.1rem;
    white-space: nowrap;
}

/* Leaderboard */
.leaderboard {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
}

.leaderboard table {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard th {
    background: var(--bg-tertiary);
    padding: 1rem;
    text-align: left;
}

.leaderboard td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-primary);
}

.current-user {
    background: rgba(220, 53, 69, 0.1);
}

/* Flash Messages */
.flash {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid var(--accent-red);
    color: var(--text-primary);
}

/* Admin Dashboard */
.admin-nav {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.admin-nav .btn {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-secondary);
}

.admin-nav .btn:hover {
    background: var(--bg-primary);
}

/* Points Display */
.points {
    background: var(--accent-red);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 500;
}

/* Update the hamburger menu styles */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 12px;
    background: none;
    border: none;
    position: absolute;
    right: 1rem;
    top: 1rem;
    z-index: 1001;
    width: 48px;
    height: 48px;
    justify-content: center;
    align-items: center;
}

.nav-toggle span {
    display: block;
    width: 30px;
    height: 3px;
    background-color: var(--text-primary);
    transition: transform 0.4s ease, opacity 0.3s ease;
    border-radius: 3px;
    position: absolute;
}

/* Position the spans */
.nav-toggle span:nth-child(1) {
    transform: translateY(-8px);
}

.nav-toggle span:nth-child(3) {
    transform: translateY(8px);
}

/* Update mobile navigation styles */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-wrapper {
        position: static;
        padding: 1rem;
        padding-right: 4rem;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg-primary);
        padding: 5rem 2rem 2rem;
        z-index: 1000;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 1.5rem;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.4s ease, visibility 0.4s ease;
    }

    .nav-links.active {
        display: flex;
        opacity: 1;
        visibility: visible;
    }

    .nav-links a {
        font-size: 1.25rem;
        padding: 1rem;
        width: 100%;
        text-align: center;
        border-radius: 8px;
        transition: all 0.3s ease;
        transform: translateY(20px);
        opacity: 0;
    }

    .nav-links.active a {
        transform: translateY(0);
        opacity: 1;
        transition: transform 0.4s ease, opacity 0.4s ease;
    }

    /* Add transition delays for each link */
    .nav-links a:nth-child(1) { transition-delay: 0.1s; }
    .nav-links a:nth-child(2) { transition-delay: 0.2s; }
    .nav-links a:nth-child(3) { transition-delay: 0.3s; }
    .nav-links a:nth-child(4) { transition-delay: 0.4s; }
    .nav-links a:nth-child(5) { transition-delay: 0.5s; }

    .nav-links a:hover {
        background: var(--bg-tertiary);
        transform: translateY(-2px);
    }

    /* Updated hamburger animation */
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
        transform: scale(0);
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg);
    }

    /* Prevent body scroll when menu is open */
    body.menu-open {
        overflow: hidden;
    }

    /* Admin Navigation */
    .admin-nav {
        flex-direction: column;
        gap: 0.75rem;
    }

    .admin-nav .btn {
        width: 100%;
        text-align: center;
    }

    /* Forms */
    .auth-container {
        padding: 1rem;
    }

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

    .hint-form {
        flex-direction: column;
    }

    .hint-inputs {
        flex-direction: column;
        gap: 0.5rem;
    }

    /* User Management */
    .user-item {
        padding: 1rem;
    }

    .user-header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .user-status {
        justify-content: center;
    }

    .user-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    /* Question Added Success Page */
    .success-container {
        padding: 1.5rem;
        margin: 1rem;
    }

    .action-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .action-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    /* Tables */
    .logs-table, .leaderboard-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .logs-filters {
        flex-direction: column;
        gap: 0.75rem;
    }

    .filter-input {
        width: 100%;
    }

    /* Settings Page */
    .settings-form .form-group {
        margin-bottom: 1.5rem;
    }

    .hint-cost-input {
        width: 100% !important;
    }
}

/* Add styles for smaller screens */
@media (max-width: 480px) {
    .branding {
        flex-direction: column;
        gap: 0.5rem;
    }

    .event-name {
        padding-left: 0;
        border-left: none;
        border-top: 2px solid var(--border-secondary);
        padding-top: 0.5rem;
    }

    .success-icon {
        font-size: 48px;
    }

    .success-container h2 {
        font-size: 1.5rem;
    }

    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    /* Make tables more readable on mobile */
    .logs-table td, 
    .logs-table th,
    .leaderboard-table td,
    .leaderboard-table th {
        padding: 0.5rem;
        font-size: 0.875rem;
    }

    /* Adjust form elements */
    input, textarea, select {
        padding: 0.625rem;
        font-size: 0.9rem;
    }

    /* Make flash messages more compact */
    .flash {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
        font-size: 0.9rem;
    }
}

/* Add print media query for better printing */
@media print {
    .nav-wrapper,
    .admin-nav,
    .btn,
    .action-buttons {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .success-container,
    .auth-container,
    .admin-section {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .success-icon {
        color: #333;
    }
}

/* Add these styles to your existing CSS */

.admin-link {
    background: #dc3545;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

.status-badge.active {
    background: #28a745;
    color: white;
}

.status-badge.inactive {
    background: #dc3545;
    color: white;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.question-points {
    background: var(--bg-tertiary);
    color: var(--accent-yellow);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.question-points i {
    color: var(--accent-yellow);
    font-size: 0.8rem;
}

.hint-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.hint-form input {
    flex: 1;
}

/* Add to your existing CSS */
.hint-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.hint-cost {
    color: #6c757d;
    font-size: 0.875rem;
}

/* Add to your existing CSS */
.form-group .hint-inputs {
    display: flex;
    gap: 1rem;
}

.form-group .hint-cost-input {
    width: 100px;
}

/* Add to your existing CSS */
.user-item {
    background: var(--bg-secondary);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.user-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.user-status {
    display: flex;
    gap: 0.5rem;
}

.status-badge.admin {
    background: var(--accent-red);
    color: var(--text-primary);
}

.points-badge {
    background: #17a2b8;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.progress-section {
    margin: 1rem 0;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 4px;
}

.progress-section ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-warning {
    background: #ffc107;
    color: #000;
}

.form-group.checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group.checkbox input {
    width: auto;
}

/* Add to your existing CSS */
.logs-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.filter-input {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 200px;
}

.logs-table {
    width: 100%;
    border-collapse: collapse;
}

.logs-table th,
.logs-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.logs-table th {
    background: #f8f9fa;
    font-weight: bold;
}

.log-entry td.positive {
    color: #28a745;
}

.log-entry td.negative {
    color: #dc3545;
}

/* Add to your existing CSS */
.settings-form .form-group {
    margin-bottom: 2rem;
}

.setting-description {
    color: #6c757d;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.settings-form .checkbox {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.settings-form .checkbox label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Add to your existing CSS */
.user-logs {
    margin-top: 1.5rem;
}

.user-logs-table {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 0.5rem;
}

.user-logs-table table {
    width: 100%;
    border-collapse: collapse;
}

.user-logs-table th,
.user-logs-table td {
    padding: 0.5rem;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 0.875rem;
}

.user-logs-table th {
    background: #f8f9fa;
    position: sticky;
    top: 0;
}

.user-logs-table td.positive {
    color: #28a745;
}

.user-logs-table td.negative {
    color: #dc3545;
}

/* Add to your existing CSS */
.hint-edit-form {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0;
}

.hint-content {
    display: flex;
    gap: 0.5rem;
    flex: 1;
}

.hint-content input[type="text"] {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.hint-content input[type="number"] {
    width: 80px;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.hint-actions {
    display: flex;
    gap: 0.5rem;
}

.hint-item {
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 0.5rem;
    margin: 0.5rem 0;
    background: #f8f9fa;
}

.hint-item:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-secondary);
}

/* Add to your existing CSS */
.branding {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
}

.event-name {
    font-size: 1rem;
    color: #aaa;
    padding-left: 1rem;
    border-left: 2px solid #555;
}

/* Profile Styles */
.profile-container {
    max-width: 800px;
    margin: 0 auto;
}

.profile-header {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.profile-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.profile-info h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.profile-badges {
    display: flex;
    gap: 1rem;
}

.badge {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.875rem;
}

.badge.admin {
    background: var(--accent-red);
    color: var(--text-primary);
}

.badge.points {
    background: var(--accent-blue);
    color: var(--text-primary);
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-primary);
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.profile-sections {
    display: grid;
    gap: 2rem;
}

.profile-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    padding: 1.5rem;
}

.profile-section h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.solved-list, .activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.solved-item, .activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 4px;
}

.question-points, .activity-points {
    font-weight: 500;
}

.activity-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.activity-time {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.activity-points.positive {
    color: #2ecc71;
}

.activity-points.negative {
    color: var(--accent-red);
}

.empty-state {
    color: var(--text-muted);
    text-align: center;
    padding: 2rem;
    font-style: italic;
}

@media (max-width: 768px) {
    .profile-info {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .profile-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.joined-time {
    font-size: 1.1rem;  /* Slightly smaller than other stats */
    line-height: 1.2;   /* Better line height for two lines */
    white-space: nowrap; /* Prevent awkward wrapping */
}

@media (max-width: 768px) {
    .joined-time {
        font-size: 1rem;
    }
}

/* Error Pages */
.error-container {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.error-content {
    text-align: center;
    max-width: 600px;
    padding: 3rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-primary);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.error-code {
    font-size: 6rem;
    font-weight: 700;
    color: var(--accent-red);
    line-height: 1;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.error-divider {
    width: 60px;
    height: 4px;
    background: var(--border-primary);
    margin: 1.5rem auto;
    border-radius: 2px;
}

.error-title {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.error-message {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.error-actions .btn {
    min-width: 150px;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
}

.btn-secondary:hover {
    background: var(--border-primary);
}

@media (max-width: 768px) {
    .error-code {
        font-size: 4rem;
    }
    
    .error-title {
        font-size: 1.5rem;
    }
    
    .error-actions {
        flex-direction: column;
    }
    
    .error-actions .btn {
        width: 100%;
    }
}

/* Modern submit button */
.submit-btn {
    position: relative;
    min-width: 120px;
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    background: var(--accent-blue);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    transform: translateZ(0);
}

/* Loading state optimizations */
.submit-btn:disabled {
    background-color: var(--accent-blue-dark);
    cursor: not-allowed;
    opacity: 0.8;
    transform: none;
    pointer-events: none;
}

.submit-btn .fa-spinner {
    display: inline-block;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

/* Optimized ripple effect */
.submit-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: translate(-50%, -50%) scale(1);
    transform-origin: center;
}

.submit-btn:active::after {
    animation: ripple 0.6s ease-out;
}

/* Toast notifications with performance optimizations */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    transform: translateZ(0);
    will-change: transform;
}

.toast {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 12px 24px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: auto;
}

.toast.fade-out {
    opacity: 0;
    transform: translateX(100%);
}

/* Optimized animations */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes ripple {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0.5;
    }
    100% {
        transform: translate(-50%, -50%) scale(20);
        opacity: 0;
    }
}

/* Optimize paint operations for hover states */
@media (hover: hover) {
    .submit-btn:hover {
        background-color: var(--accent-blue-dark);
        transform: translateY(-2px);
    }
}

/* Reduce motion if user prefers */
@media (prefers-reduced-motion: reduce) {
    .submit-btn,
    .toast {
        transition: none;
    }
    
    .submit-btn:hover {
        transform: none;
    }
    
    .fa-spinner {
        animation: none;
    }
}/* Print styles */
@media print {
    .submit-btn,
    .toast-container {
        display: none;
    }
}

/* Answer input styling to match */
.answer-section {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.answer-section input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.answer-section input:focus {
    border-color: #2196F3;
    outline: none;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.answer-section input:disabled {
    background-color: #f5f5f5;
    border-color: #ddd;
    color: #666;
}

/* Page Headers */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-primary);
}

.page-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Leaderboard Table */
.leaderboard-container {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard-table th,
.leaderboard-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-primary);
}

.leaderboard-table th {
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.leaderboard-table tr:hover {
    background: var(--bg-tertiary);
}

.leaderboard-table tr.current-user {
    background: rgba(220, 53, 69, 0.1);
}

/* Danger Zone Styles */
.danger-zone {
    margin-top: 3rem;
    border: 1px solid var(--accent-red);
    border-radius: 8px;
    padding: 1.5rem;
}

.danger-zone h3 {
    color: var(--accent-red);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.danger-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem;
    background: rgba(220, 53, 69, 0.1);
    border-radius: 6px;
}

.danger-info {
    flex: 1;
}

.danger-info h4 {
    color: var(--accent-red);
    margin-bottom: 0.5rem;
}

.danger-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.btn-danger {
    background: var(--accent-red);
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    white-space: nowrap;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-danger i {
    font-size: 1rem;
}

/* Responsive styles for danger zone */
@media (max-width: 768px) {
    .danger-action {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .danger-info {
        margin-bottom: 1rem;
    }

    .btn-danger {
        width: 100%;
        justify-content: center;
    }
}

/* Toast notification styles */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.toast {
    background: var(--bg-secondary);  /* Dark background */
    color: var(--text-primary);       /* Light text */
    padding: 12px 24px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slideIn 0.3s ease, fadeOut 0.3s ease 4.7s;
    max-width: 300px;
    border: 1px solid var(--border-primary);
}

.toast.success {
    border-left: 4px solid #28a745;
}

.toast.error {
    border-left: 4px solid #dc3545;
}

.toast i {
    font-size: 18px;
}

.toast.success i {
    color: #28a745;
}

.toast.error i {
    color: #dc3545;
}

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

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

/* Use hardware acceleration for animations */
.animated-element {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
    will-change: transform, opacity;
}

/* Use CSS containment for better performance */
.question-card {
    contain: content;
    contain-intrinsic-size: 0 500px;
}

/* Optimize transitions */
.submit-btn {
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Points Summary Styles */
.points-summary {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.points-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: 6px;
    border: 1px solid var(--border-primary);
}

.points-item.total {
    background: var(--bg-tertiary);
    border-color: var(--border-secondary);
    font-weight: 600;
}

.points-label {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.points-value {
    font-size: 1.1rem;
    font-weight: 600;
}

.points-item.positive .points-value {
    color: var(--success-color);
}

.points-item.negative .points-value {
    color: var(--error-color);
}

/* Hints List Styles */
.hints-list {
    display: grid;
    gap: 0.75rem;
}

.hint-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border-radius: 6px;
    border: 1px solid var(--border-primary);
}

.hint-info {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.hint-points {
    font-weight: 600;
    font-size: 0.95rem;
}

/* Update existing styles */
.solved-item, .activity-item {
    border: 1px solid var(--border-primary);
}

.positive {
    color: var(--success-color);
}

.negative {
    color: var(--error-color);
} 

