.hidden {
    display: none !important;
}

.collapsible-header {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    padding: 5px 0;
}

.collapsible-header::after {
    content: '▼';
    font-size: 0.7rem;
    transition: transform 0.3s;
    opacity: 0.5;
}

.collapsible-header.collapsed::after {
    transform: rotate(-90deg);
}

.collapsible-content {
    transition: max-height 0.3s ease-out;
    overflow: hidden;
}

.collapsible-content.collapsed {
    max-height: 0 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

:root {
    --bg-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --card-bg: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-color: #e94560;
    --accent-hover: #ff2e63;
    --success-color: #4cc9f0;
    --error-color: #f72585;
    --font-family: 'Outfit', sans-serif;
    --border-radius: 16px;
    --transition-speed: 0.3s;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background: var(--bg-gradient);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

.app-cont.admin-card {
    width: 100%;
    max-width: 800px;
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    margin-bottom: 20px;
}

.version-info {
    position: absolute;
    bottom: 12px;
    right: 20px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.25);
    letter-spacing: 1px;
    pointer-events: none;
}

.app-container {
    width: 100%;
    max-width: 600px;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 3rem 2rem 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    text-align: center;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 98vh;
    /* Allow scrolling within container if it exceeds viewport */
}

.screen {
    width: 100%;
    position: relative;
    transition: opacity var(--transition-speed) ease, transform var(--transition-speed) ease;
}

.screen.hidden {
    display: none;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.95);
}

.screen.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 1;
    transform: scale(1);
    animation: fadeIn 0.5s ease-out forwards;
    min-height: auto;
    /* Allow growth */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.app-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 15px rgba(233, 69, 96, 0.3));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

h1,
h2 {
    color: white;
    margin-bottom: 2rem;
    font-weight: 800;
}

h1 {
    font-size: 2.8rem;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    letter-spacing: -1px;
}

#auth-title {
    font-size: 2.5rem;
    margin-top: 0.5rem;
    margin-bottom: 2rem;
    background: linear-gradient(to bottom, #fff, #ccc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
}

.subtitle {
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-size: 1.2rem;
    text-align: center;
}

input[type="text"] {
    width: 100%;
    padding: 1rem;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
    color: white;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    outline: none;
    transition: var(--transition-speed);
    /* prevent flex blowout */
    min-width: 0;
}

#gen-source {
    width: 100% !important;
    padding: 1rem !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    color: white !important;
    font-size: 1.1rem !important;
    margin-bottom: 0 !important;
    border-radius: 8px !important;
}

input[type="text"]:focus {
    border-color: var(--accent-color);
}

/* Report & About */
.btn.text.small {
    font-size: 0.85rem;
    padding: 5px 10px;
}

.report-item {
    background: rgba(30, 30, 50, 0.95);
    /* Solid dark background */
    backdrop-filter: blur(10px);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    border: 1px solid rgba(233, 69, 96, 0.3);
    cursor: pointer;
    transition: all 0.2s;
}

.report-item:hover {
    background: rgba(40, 40, 60, 0.95);
    border-color: var(--accent-color);
    transform: translateX(5px);
}

.report-item .q-text {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.report-item .meta {
    font-size: 0.8rem;
    opacity: 0.7;
    color: var(--text-secondary);
}

#dev-email-container:hover {
    text-decoration: underline;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-speed);
    width: 100%;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn.primary {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.4);
}

.btn.primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233, 69, 96, 0.6);
}

.btn.secondary {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: var(--text-secondary);
}

.btn.secondary:hover {
    border-color: white;
    color: white;
}

/* Quiz UI */
.quiz-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.timer-container {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.timer-outer {
    position: relative;
    width: 60px;
    height: 60px;
}

.timer-outer svg {
    transform: rotate(-90deg);
}

.timer-circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 4;
}

.timer-circle {
    fill: none;
    stroke: var(--accent-color);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 163;
    /* 2 * PI * 26 */
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear;
}

.timer-text,
#timer-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 700;
    font-size: 1.2rem;
    color: white;
}

.score-display {
    font-size: 1.2rem;
    font-weight: 600;
}

#question-text {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 2rem;
    line-height: 1.4;
}

.options-container {
    width: 100%;
    display: grid;
    gap: 1rem;
}

.option-btn {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}

.option-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.option-btn.correct {
    background: var(--success-color);
    border-color: var(--success-color);
    box-shadow: 0 0 15px rgba(76, 201, 240, 0.4);
}

.option-btn.wrong {
    background: var(--error-color);
    border-color: var(--error-color);
    animation: shake 0.4s;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* Highscore */
.highscore-list-container {
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 1rem;
    margin: 1.5rem 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.highscore-list-container h3 {
    margin-bottom: 1rem;
    text-align: center;
    color: var(--accent-color);
}

.highscore-list {
    list-style: none;
    text-align: left;
}

.highscore-list li {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 15px;
    padding: 0.6rem 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    text-align: left;
}

#highscore-list li:last-child {
    border-bottom: none;
}

#highscore-list li:nth-child(1) {
    color: #ffd700;
    font-weight: bold;
}

#highscore-list li:nth-child(2) {
    color: #c0c0c0;
    font-weight: bold;
}

#highscore-list li:nth-child(3) {
    color: #cd7f32;
    font-weight: bold;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Auth & Forms */
.auth-footer {
    margin-top: 2rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 700;
    margin-left: 5px;
    transition: color 0.2s, text-decoration 0.2s;
    border-bottom: 1px solid transparent;
}

.auth-footer a:hover {
    color: #fff;
    border-bottom-color: #fff;
}

.toggle-text {
    margin-top: 2rem;
    margin-bottom: 2rem;
    /* Added space below */
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.toggle-text a {
    color: #1a1a2e;
    /* Dark text for contrast */
    text-decoration: none;
    font-weight: 700;
    margin-left: 8px;
    padding: 8px 18px;
    border-radius: 25px;
    background: #ffffff;
    /* Bright white background */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}

#show-register {
    color: #1a1a2e;
    font-weight: 800;
    background: #ffffff;
    padding: 10px 20px;
    border-radius: 30px;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.toggle-text a:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233, 69, 96, 0.5);
}

#show-register:hover {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 0 25px rgba(233, 69, 96, 0.8);
    transform: translateY(-2px) scale(1.05);
}

.btn-back-abs {
    position: absolute;
    top: 10px;
    left: 20px;
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 5px 12px !important;
    font-size: 0.8rem !important;
    border-radius: 8px !important;
}

input[type="text"],
input[type="password"],
input[type="email"],
select,
textarea {
    width: 100% !important;
    padding: 0.8rem 1rem !important;
    border-radius: 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    background: rgba(0, 0, 0, 0.5) !important;
    color: white !important;
    font-size: 1rem !important;
    margin-bottom: 1rem !important;
    outline: none !important;
    transition: all 0.3s !important;
    box-sizing: border-box !important;
}

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
    padding-right: 3rem !important;
    /* Space for arrow */
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent-color) !important;
    background: rgba(0, 0, 0, 0.7) !important;
}

/* Chrome autofill fix */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: white !important;
    -webkit-box-shadow: 0 0 0px 1000px #1a1a2e inset !important;
    box-shadow: 0 0 0px 1000px #1a1a2e inset !important;
}

.btn.text {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 0.5rem;
    box-shadow: none;
    margin-top: 1rem;
}

.btn.text:hover {
    color: var(--error-color);
    text-decoration: underline;
}

/* Profile Card */
.profile-card {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    padding-bottom: 2rem;
    /* Ensure space at bottom */
    margin: 1rem 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 0.3rem;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-color);
}

.history-list {
    list-style: none;
}

.history-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    font-size: 0.95rem;
}

.highscore-list li span:last-child {
    margin-left: auto;
    font-weight: 500;
    opacity: 0.8;
}

.history-list li:last-child {
    border-bottom: none;
}

/* Language Switcher */
.lang-switcher {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 12px;
    z-index: 100;
}

.flag-btn {
    background: transparent !important;
    border: 2px solid rgba(255, 255, 255, 0.2) !important;
    cursor: pointer !important;
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    transition: all 0.3s ease !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.flag-btn img {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    filter: grayscale(0.8);
    transition: filter 0.3s, transform 0.3s;
}

/* Specific fix for Norway flag (round icon needs scaling) */
#lang-no img {
    transform: scale(1.45);
}

.flag-btn:hover {
    border-color: rgba(255, 255, 255, 0.8) !important;
    transform: scale(1.1);
}

.flag-btn.active {
    border-color: var(--accent-color) !important;
    box-shadow: 0 0 15px var(--accent-color);
}

.flag-btn.active img,
.flag-btn:hover img {
    filter: grayscale(0);
}


/* Admin Panel */
.admin-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    /* Fix hidden buttons on small screens */
}

.admin-tabs .btn {
    flex: 1;
    opacity: 0.6;
}

.admin-tabs .btn.active {
    opacity: 1;
    border-bottom: 3px solid var(--accent-color);
}

.admin-card {
    width: 100%;
    max-width: 800px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-top: 20px;
}

.version-info {
    position: fixed;
    bottom: 10px;
    right: 15px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
    pointer-events: none;
    z-index: 1000;
}

.user-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.user-table th,
.user-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-actions {
    display: flex;
    gap: 10px;
}

.btn-small {
    padding: 5px 10px;
    font-size: 0.8rem;
}

/* Mascot Styles */
.mascot-container {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 1rem;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

#mascot-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
}

.speech-bubble {
    position: absolute;
    top: -40px;
    right: -40px;
    background: white;
    color: #1a1a2e;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border-bottom-left-radius: 4px;
    /* Tail */
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 10;
    opacity: 1;
    transform: scale(1) translateY(0);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    white-space: nowrap;
}

.speech-bubble.hidden {
    opacity: 0;
    transform: scale(0.8) translateY(10px);
    pointer-events: none;
}

.speech-bubble.correct {
    background: var(--success-color);
    color: #1a1a2e;
}

.speech-bubble.wrong {
    background: var(--error-color);
    color: white;
}

/* Animations for mascot states */
.mascot-bounce {
    animation: bounce 0.5s;
}

.mascot-shake {
    animation: shakeHead 0.5s;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

@keyframes shakeHead {

    0%,
    100% {
        transform: rotate(0);
    }

    25% {
        transform: rotate(-10deg);
    }

    75% {
        transform: rotate(10deg);
    }
}

/* Quiz Filters */
.quiz-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.filter-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.filter-group label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 5px;
    font-weight: 700;
}

.filter-group select {
    background: #1a1a2e;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 10px;
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}

.filter-group select:focus {
    border-color: var(--accent-color);
}

/* Multiplayer Join & Premium UI */
.join-action-box {
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#join-code-input {
    font-size: 1.5rem !important;
    padding: 15px !important;
    border-radius: 12px !important;
    background: rgba(0, 0, 0, 0.6) !important;
    border: 2px solid rgba(255, 255, 255, 0.1) !important;
    transition: all 0.3s ease !important;
    text-transform: uppercase;
    color: var(--accent-color) !important;
}

#join-code-input:focus {
    border-color: var(--accent-color) !important;
    box-shadow: 0 0 20px rgba(233, 69, 96, 0.3);
    background: rgba(0, 0, 0, 0.8) !important;
}

.lobby-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 20px;
}

#host-qr-container {
    background: white;
    padding: 10px;
    border-radius: 10px;
    display: inline-block;
    margin: 15px 0;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.status-bar {
    padding: 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    margin: 10px 0;
    font-size: 0.9rem;
}

@keyframes slideUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Modal Styles (Missing previously) */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #1a1a2e;
    /* Fallback */
    background: linear-gradient(135deg, #232342 0%, #161629 100%);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal:not(.hidden) .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: 1.5rem;
}

.modal-close:hover {
    color: white;
}

/* Robust Absolute Centering */
.abs-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 400px;
}

/* Global Back Button (Matches .flag-btn style) */
#global-back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 100;
    cursor: pointer;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    font-size: 1.2rem;
    /* Adjusted for icon */
}

#global-back-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.4);
}


.btn-back-any {
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 5px 12px;
    font-size: 0.8rem;
    border-radius: 8px;
    display: block !important;
    margin: 20px auto;
    color: white !important;
    cursor: pointer;
    z-index: 1000;
    position: relative;
    width: fit-content;
}

/* Special Quiz Card Styles */
.special-card {
    background: linear-gradient(135deg, #2e003e, #000000);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.special-card:not(.collapsed) {
    border-color: rgba(255, 215, 0, 0.8);
    box-shadow: 0 0 20px rgba(106, 17, 203, 0.4);
}

.special-header {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
}

.special-header:hover {
    background: rgba(255, 255, 255, 0.1);
}

.special-content {
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideDown 0.3s ease-out;
}

.special-item {
    display: flex;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.special-item:last-child {
    margin-bottom: 0;
}

.special-item:not(.locked):hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
    border-color: rgba(255, 215, 0, 0.3);
}

.special-icon-container {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    margin-right: 15px;
}

.special-info {
    flex: 1;
}

.btn-special-play {
    background: linear-gradient(90deg, #ffd700, #ffaa00);
    color: #000;
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.8rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.special-item:hover .btn-special-play {
    transform: scale(1.05);
}

.expand-icon {
    font-size: 0.8rem;
    opacity: 0.7;
}

.special-card:not(.collapsed) .expand-icon {
    transform: rotate(180deg);
}

.special-content.hidden {
    display: none;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Highscore Rankings */
.top-three:nth-child(1) { color: #FFD700 !important; font-weight: bold; }
.top-three:nth-child(2) { color: #C0C0C0 !important; font-weight: bold; }
.top-three:nth-child(3) { color: #CD7F32 !important; font-weight: bold; }
.top-three span { font-weight: bold; }
