/* Game Style CSS */

/* Font declarations */
@font-face {
    font-family: 'Frutiger';
    src: url(../fonts/FrutigerLTArabic-55Roman.ttf) format('opentype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

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

body, button, input, select, textarea, div:not(.icon) {
    font-family: 'Bangers', sans-serif;
}

html[dir="rtl"] body,
html[dir="rtl"] button,
html[dir="rtl"] input,
html[dir="rtl"] select,
html[dir="rtl"] textarea,
html[dir="rtl"] div:not(.icon) {
    font-family: 'Frutiger', sans-serif;
}

/* Ensure Font Awesome icons use the correct font */
.fas, .fab, .far, .fa,
.fa-solid, .fa-brands, .fa-regular,
.icon i {
    font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Brands', 'FontAwesome' !important;
}

.language-btn {
    font-family: 'Bangers';
}

body {
    background: linear-gradient(135deg, #000000, #2d0608, #000000);
    font-family: 'Montserrat', sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Logo background */
.logo-background {
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px); /* Added 5px space on the right side */
    height: 100%;
    background-image: url('../images/logo-burgerizzr.png');
    background-repeat: no-repeat;
    background-position: center top;
    background-size: contain;
    z-index: 0;
    pointer-events: none;
}

/* Decorative gaming elements */
.pixel-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(205, 18, 34, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(205, 18, 34, 0.1) 1px, transparent 1px);
    background-size: 60px 60px; /* Increased grid size for better performance */
    z-index: 1;
    opacity: 0.7; /* Reduced opacity */
    transition: opacity 0.3s ease;
}

/* Reduce visual complexity during gameplay */
.game-active .pixel-grid {
    opacity: 0.3; /* Further reduce opacity during gameplay */
}

/* Additional optimizations for low-end devices */
.reduced-animations .pixel-grid {
    opacity: 0.2; /* Even lower opacity for low-end devices */
    background-size: 120px 120px; /* Much larger grid size for better performance */
}

.reduced-animations .game-icons {
    display: none; /* Hide all floating icons on low-end devices */
}

/* Session messages */
.session-error {
    display: flex;
    align-items: center;
    background-color: rgba(220, 38, 38, 0.15);
    border: 2px solid rgba(220, 38, 38, 0.5);
    color: #ef4444;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.25rem;
    text-align: left;
    font-weight: 500;
    font-size: 0.9rem;
    box-shadow: 0 4px 6px -1px rgba(220, 38, 38, 0.2), 0 2px 4px -1px rgba(220, 38, 38, 0.1);
    animation: errorAppear 0.3s ease-out forwards;
    position: relative;
    overflow: hidden;
}

.session-error::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: #dc2626;
}

.session-error .error-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    margin-right: 0.75rem;
    font-size: 1.25rem;
    color: #dc2626;
}

.session-error .error-message {
    flex: 1;
    line-height: 1.4;
    color: #EACD9D;
    font-weight: 600;
    text-align: center;
}

@keyframes errorAppear {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Validation summary */
.validation-summary {
    display: flex;
    align-items: center;
    background-color: rgba(220, 38, 38, 0.15);
    border: 2px solid rgba(220, 38, 38, 0.5);
    color: #ef4444;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.25rem;
    text-align: left;
    font-weight: 500;
    font-size: 0.9rem;
    box-shadow: 0 4px 6px -1px rgba(220, 38, 38, 0.2), 0 2px 4px -1px rgba(220, 38, 38, 0.1);
    animation: errorAppear 0.3s ease-out forwards;
    position: relative;
    overflow: hidden;
}

.validation-summary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: #dc2626;
}

.reduced-animations .icon {
    animation: none; /* Disable animations for any visible icons */
}

/* Simplify transitions for low-end devices */
.reduced-animations * {
    transition-duration: 0.2s !important; /* Shorter transitions */
    animation-duration: 0.5s !important; /* Shorter animations */
}

.game-icons {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    /* Only show game icons when not playing the game */
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Hide game icons during active gameplay to improve performance */
.game-active .game-icons {
    opacity: 0;
}

.icon {
    position: absolute;
    font-size: 24px;
    color: rgba(205, 18, 34, 0.3);
    /* Use will-change to optimize for animation */
    will-change: transform;
    /* Reduce animation complexity and duration */
    animation: float 8s infinite ease-in-out;
    /* Use transform3d to enable hardware acceleration */
    transform: translate3d(0, 0, 0);
}

/* Reduce number of animated icons from 15 to 8 */
.icon:nth-child(1) { top: 2%; left: 2%; animation-delay: 0s; }
.icon:nth-child(2) { top: 2%; right: 2%; animation-delay: 1s; }
.icon:nth-child(3) { top: 85%; left: 2%; animation-delay: 2s; }
.icon:nth-child(4) { top: 92%; right: 2%; animation-delay: 3s; }
.icon:nth-child(5) { top: 30%; left: 1%; animation-delay: 4s; }
.icon:nth-child(6) { top: 30%; right: 1%; animation-delay: 0.5s; }
.icon:nth-child(7) { bottom: 30%; left: 1%; animation-delay: 1.5s; }
.icon:nth-child(8) { bottom: 30%; right: 1%; animation-delay: 2.5s; }
/* Hide remaining icons to improve performance */
.icon:nth-child(n+9) {
    display: none;
}

@keyframes float {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(0, -15px, 0); }
}

.card-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 420px;
    perspective: 1000px;
    margin-top: 8rem; /* Add margin to move the card lower */
}

.card {
    background: linear-gradient(145deg, #0a0a0a, #1a0a0c);
    border-radius: 20px;
    border: 3px solid #cd1222;
    box-shadow:
        0 0 30px rgba(205, 18, 34, 0.6),
        0 10px 30px rgba(0, 0, 0, 0.8),
        inset 0 0 15px rgba(205, 18, 34, 0.3);
    padding: 35px 30px;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

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

.card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(205, 18, 34, 0.3) 0%, transparent 70%);
    transform: rotate(30deg);
    z-index: -1;
}

.logo {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
}

.logo-icon {
    display: inline-block;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #cd1222, #8a0c1a);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 15px;
    box-shadow: 0 0 20px rgba(205, 18, 34, 0.7);
    border: 2px solid #EACD9D;
}

.logo-icon i {
    font-size: 40px;
    color: #EACD9D;
    text-shadow: 0 0 10px rgba(192, 134, 78, 0.7);
}

.logo h1 {
    font-family: 'Bangers', sans-serif;
    font-size: 28px;
    letter-spacing: 2px;
    color: #fff;
    text-shadow: 0 0 10px rgba(205, 18, 34, 0.8);
    margin-bottom: 5px;
}

html[dir="rtl"] .logo h1 {
    font-family: 'Frutiger', sans-serif;
}

.logo p {
    color: #aaa;
    font-size: 14px;
    letter-spacing: 1px;
}

.form-group {
    /*margin-bottom: 25px;*/
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #EACD9D;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #cd1222;
    font-size: 18px;
}

input[type="text"] {
    width: 100%;
    background: rgba(20, 10, 12, 0.8);
    border: 2px solid #444;
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s ease;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

input[type="tel"],
input[type="text"],
input[type="email"],
select {
    width: 100%;
    padding: 16px 16px 16px 50px;
    background: rgba(20, 10, 12, 0.8);
    border: 2px solid #444;
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s ease;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
    text-overflow: ellipsis;
    overflow: visible;
}

/* Special handling for email input to ensure text remains visible */
input[type="email"] {
    direction: ltr; /* Force LTR for emails even in RTL mode */
    text-align: left;
    overflow-x: auto; /* Allow horizontal scrolling */
    white-space: nowrap; /* Prevent wrapping */
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23cd1222' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
}

input:focus, select:focus {
    outline: none;
    border-color: #cd1222;
    box-shadow:
        inset 0 0 10px rgba(205, 18, 34, 0.5),
        0 0 15px rgba(205, 18, 34, 0.4);
}

input::placeholder {
    color: #666;
}

.terms {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
    gap: 1rem;
}

input[type="checkbox"] {
    margin-right: 12px;
    margin-top: 5px;
    appearance: none;
    width: 38px;
    height: 25px;
    border: 2px solid #cd1222;
    border-radius: 5px;
    background: rgba(20, 10, 12, 0.8);
    cursor: pointer;
    position: relative;
}

input[type="checkbox"]:checked {
    background: #cd1222;
}

input[type="checkbox"]:checked::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 900 !important;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
}

.terms {
    align-items: center;
}

.terms label {
    color: #ccc;
    font-size: 14px;
    line-height: 1.5;
}

.terms a {
    color: #EACD9D;
    text-decoration: none;
    transition: color 0.3s;
}

.terms a:hover {
    color: #cd1222;
    text-decoration: underline;
}

#complete-btn, #register-btn, #verify-btn, #continue-btn {
    background: #ce0e2d;
    color: #fff;
}

.btn {
    background: linear-gradient(135deg, #EACD9D, #CA8342);
    color: #8a0c1a;
    border: none;
    border-radius: 12px;
    padding: 18px;
    width: 100%;
    font-family: 'Frutiger', 'Bangers', cursive;
    font-size: 24px;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow:
        0 5px 15px rgba(205, 18, 34, 0.4),
        0 0 10px rgba(192, 134, 78, 0.5),
        inset 0 0 10px rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
}

.btn:disabled {
    background: linear-gradient(135deg, #444, #666)!important;
    color: #999;
    cursor: not-allowed;
    box-shadow: none;
}

.btn:not(:disabled):hover {
    background: linear-gradient(135deg, #EACD9D, #CA8342);
    transform: translateY(-3px);
    box-shadow:
        0 8px 20px rgba(205, 18, 34, 0.6),
        0 0 15px rgba(192, 134, 78, 0.7),
        inset 0 0 15px rgba(255, 255, 255, 0.4);
}

.btn:not(:disabled):active {
    transform: translateY(1px);
}

.btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(30deg);
    transition: all 0.6s ease;
}

.btn:hover::before {
    transform: rotate(30deg) translate(20%, 20%);
}

.validation-message {
    color: #EACD9D;
    font-size: 13px;
    margin-top: 8px;
    margin-bottom: 1rem;
    min-height: 20px;
    font-weight: 600;
    text-align: center;
}

/* Turnstile widget centering */
#cf-turnstile-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    min-height: 65px;
}

/* Corner accents */
.corner {
    position: absolute;
    width: 30px;
    height: 30px;
}

.corner-tl {
    top: 15px;
    left: 15px;
    border-top: 3px solid #EACD9D;
    border-left: 3px solid #EACD9D;
}

.corner-tr {
    top: 15px;
    right: 15px;
    border-top: 3px solid #EACD9D;
    border-right: 3px solid #EACD9D;
}

.corner-bl {
    bottom: 15px;
    left: 15px;
    border-bottom: 3px solid #EACD9D;
    border-left: 3px solid #EACD9D;
}

.corner-br {
    bottom: 15px;
    right: 15px;
    border-bottom: 3px solid #EACD9D;
    border-right: 3px solid #EACD9D;
}

/* OTP container */
.otp-container {
    gap: 20px;
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

html[dir="rtl"] .otp-container {
    flex-direction: row-reverse;
}

.otp-input {
    width: 60px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    border: 2px solid #444;
    border-radius: 10px;
    background: rgba(20, 10, 12, 0.8);
    color: #fff;
    transition: all 0.3s ease;
    padding: 0!important;
}

.otp-input:focus {
    border-color: #cd1222;
    box-shadow: 0 0 10px rgba(205, 18, 34, 0.6);
    outline: none;
}

.resend-otp {
    text-align: center;
    margin-top: 15px;
    color: #ccc;
    font-size: 14px;
}

.resend-otp a {
    color: #EACD9D;
    text-decoration: none;
    cursor: pointer;
}

.resend-otp a:hover {
    text-decoration: underline;
}

/* Step indicator */
.step-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
}

.step {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #444;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.step.active {
    background-color: #EACD9D;
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(192, 134, 78, 0.7);
}

/* Step content */
.step-content {
    display: none;
}

.step-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

/* Success screen */
.success-screen {
    text-align: center;
    padding: 20px;
}

.success-icon {
    font-size: 80px;
    color: #4CAF50;
    margin: 20px 0;
    text-shadow: 0 0 20px rgba(76, 175, 80, 0.5);
}

.success-screen h2 {
    color: #EACD9D;
    font-family: 'Frutiger', 'Bangers', cursive;
    font-size: 36px;
    letter-spacing: 2px;
    margin-bottom: 15px;
}

.success-screen p {
    color: #ccc;
    font-size: 18px;
    margin-bottom: 30px;
}

/* Gender selector */
.gender-selector {
    display: flex;
    gap: 15px;
    margin-top: 5px;
}

.gender-option {
    flex: 1;
    text-align: center;
}

.gender-radio {
    display: none;
}

.gender-label {
    display: block;
    padding: 15px 10px;
    background: rgba(20, 10, 12, 0.8);
    border: 2px solid #444;
    border-radius: 12px;
    color: #aaa;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gender-radio:checked + .gender-label {
    background: rgba(205, 18, 34, 0.3);
    border-color: #EACD9D;
    color: #EACD9D;
    box-shadow: 0 0 10px rgba(192, 134, 78, 0.3);
}

/* Date Picker */
html[dir="rtl"] .date-picker {
    direction: ltr;
}

.date-picker {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

.date-select {
    flex: 1;
    padding: 16px 15px;
    background: rgba(20, 10, 12, 0.8);
    border: 2px solid #444;
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s ease;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23cd1222' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
    cursor: pointer;
}

/* Language Switcher */
.language-switcher {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}

.language-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #cd1222, #8a0c1a);
    border: 2px solid #EACD9D;
    color: #EACD9D;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 15px rgba(205, 18, 34, 0.6);
    transition: all 0.3s ease;
    text-decoration: none;
}

.language-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(192, 134, 78, 0.7);
}

html[dir="rtl"] .language-switcher {
    right: auto;
    left: 20px;
}

/* Loading container */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    flex: 1;
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 0.25rem solid rgba(234, 205, 157, 1);
    border-radius: 50%;
    border-top-color: #cd1222;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    margin-top: 1rem;
    color: #e2e8f0;
    font-size: 0.875rem;
}

/* Responsive design */
@media (max-width: 420px) {
    .card {
        padding: 25px 20px;
    }

    .logo h1 {
        font-size: 28px;
    }

    .btn {
        font-size: 20px;
        padding: 16px;
    }

    .otp-input {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .gender-label {
        padding: 12px 8px;
        font-size: 14px;
    }

    .date-select {
        padding: 14px 12px;
        font-size: 14px;
    }

    .date-picker {
        flex-direction: column;
        gap: 8px;
    }

    .language-switcher {
        top: 10px;
        right: 10px;
    }

    html[dir="rtl"] .language-switcher {
        right: auto;
        left: 10px;
    }
}

.hidden {
    display: none;
}

/* Game2 specific styles */

/* Main container for game2 */
.main-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 420px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-top: 5rem;
}

/* Content area styling */
.content-area {
    background: linear-gradient(145deg, #0a0a0a, #1a0a0c);
    border-radius: 20px;
    border: 3px solid #cd1222;
    box-shadow:
        0 0 30px rgba(205, 18, 34, 0.6),
        0 10px 30px rgba(0, 0, 0, 0.8),
        inset 0 0 15px rgba(205, 18, 34, 0.3);
    padding: 35px 30px;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
    margin-bottom: 70px;
}

.content-area::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(205, 18, 34, 0.3) 0%, transparent 70%);
    transform: rotate(30deg);
    z-index: -1;
}

/* Tab Navigation */
.tab-navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: linear-gradient(145deg, #0a0a0a, #1a0a0c);
    border-top: 3px solid #cd1222;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.5);
}

.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #aaa;
    text-decoration: none;
    font-size: 12px;
    padding: 10px 0;
    transition: all 0.3s ease;
    position: relative;
}

.tab-item i {
    font-size: 24px;
    margin-bottom: 5px;
}

.tab-item.active {
    color: #EACD9D;
}

.tab-item.active i {
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.7);
}

/* Middle tab (Add a Code) */
.tab-item.middle {
    transform: translateY(-20px);
    background: linear-gradient(135deg, #cd1222, #8a0c1a);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    border: 3px solid #EACD9D;
    box-shadow: 0 0 15px rgba(205, 18, 34, 0.6);
    margin: 0 10px;
    flex: 0 0 auto;
}

.tab-item.middle i {
    margin-bottom: 0;
    font-size: 28px;
    color: #EACD9D;
}

.tab-item.middle.active {
    transform: translateY(-25px) scale(1.1);
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.7);
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

.section-title {
    color: #EACD9D;
    font-size: 24px;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.5);
    letter-spacing: 5px;
}

.section-description {
    color: #ccc;
    font-size: 16px;
    margin-bottom: 30px;
    text-align: center;
    line-height: 1.6;
}

/* Game specific styles */
#canvas {
    position: absolute;
    margin: 30px auto;
    transform: translate(-50%,-50%);
    overflow: visible;
    height: 300px;
    width: 300px;
    color: #cd1222; /* Red color for lockpick */
    display: none;
    cursor: pointer;
}

.game-canvas {
    border-radius: 15px;
    position: relative !important;
    z-index: 100;
    transform: none !important;
    margin: 0 !important;
}

.game-container {
    position: relative;
    height: 600px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(145deg, #0a0a0a, #1a0a0c);
    border-radius: 8px;
    border: 1px solid #cd1222;
    box-shadow: inset 0 0 15px rgba(205, 18, 34, 0.3), 0 5px 15px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    margin-top: 20px;
    margin-bottom: 20px;
    position: relative;
}

.game-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        45deg,
        rgba(205, 18, 34, 0.05),
        rgba(205, 18, 34, 0.05) 10px,
        transparent 10px,
        transparent 20px
    );
    pointer-events: none;
}

.streak-counter {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(145deg, #1a0a0c, #0a0a0a);
    color: #EACD9D;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 20px;
    z-index: 10;
    display: none;
    border: 2px solid #cd1222;
    box-shadow: 0 0 15px rgba(205, 18, 34, 0.5),
                0 4px 8px rgba(0, 0, 0, 0.6),
                inset 0 0 10px rgba(205, 18, 34, 0.2);
    text-shadow: 0 0 8px rgba(234, 205, 157, 0.8);
    transition: all 0.3s ease;
    animation: pulse-glow 2s infinite alternate;
}

/* Pulse glow animation for streak counter */
@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 15px rgba(205, 18, 34, 0.5),
                    0 4px 8px rgba(0, 0, 0, 0.6),
                    inset 0 0 10px rgba(205, 18, 34, 0.2);
        text-shadow: 0 0 8px rgba(234, 205, 157, 0.8);
    }
    100% {
        box-shadow: 0 0 25px rgba(205, 18, 34, 0.8),
                    0 4px 8px rgba(0, 0, 0, 0.6),
                    inset 0 0 15px rgba(205, 18, 34, 0.4);
        text-shadow: 0 0 12px rgba(234, 205, 157, 1);
    }
}

/* Success animation when streak increases */
.streak-counter.success {
    animation: streak-success 0.6s ease;
    color: #4CAF50;
    border-color: #4CAF50;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.8),
                0 4px 8px rgba(0, 0, 0, 0.6),
                inset 0 0 15px rgba(76, 175, 80, 0.3);
}

@keyframes streak-success {
    0% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.2); }
    100% { transform: translateX(-50%) scale(1); }
}

/* Critical state when close to winning */
.streak-counter.critical {
    animation: critical-pulse 1s infinite;
    color: #FFD700;
    border-color: #FFD700;
}

@keyframes critical-pulse {
    0%, 100% {
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.6),
                    0 4px 8px rgba(0, 0, 0, 0.6),
                    inset 0 0 10px rgba(255, 215, 0, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 215, 0, 1),
                    0 4px 8px rgba(0, 0, 0, 0.6),
                    inset 0 0 20px rgba(255, 215, 0, 0.5);
    }
}

/* Popup styles */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

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

.popup-container {
    background: linear-gradient(145deg, #0a0a0a, #1a0a0c);
    border-radius: 20px;
    border: 3px solid #ff9800;
    box-shadow: 0 0 40px rgba(255, 152, 0, 0.6), 0 15px 40px rgba(0, 0, 0, 0.9), inset 0 0 20px rgba(255, 152, 0, 0.3);
    padding: 60px 35px 40px;
    position: relative;
    max-width: 380px;
    width: 90%;
    text-align: center;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.popup-container.active {
    transform: scale(1) translateY(0);
}

.icon-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 80px;
    height: 80px;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: translateY(-50%);
}

.icon-background {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    z-index: 1;
    background: radial-gradient(circle, #1a150a 0%, #0a0a0a 100%);
    border: 3px solid #ff9800;
    box-shadow: 0 0 25px rgba(255, 152, 0, 0.8), inset 0 0 15px rgba(255, 152, 0, 0.4);
}

.warning-icon {
    top: -5%;
    font-size: 42px;
    color: #ff9800;
    position: relative;
    z-index: 2;
    text-shadow: 0 0 15px rgba(255, 152, 0, 0.8);
    animation: pulse 1.5s infinite;
}

.popup-corner {
    position: absolute;
    width: 30px;
    height: 30px;
}

.popup-corner-tl {
    top: 15px;
    left: 15px;
    border-top: 3px solid #EACD9D;
    border-left: 3px solid #EACD9D;
}

.popup-corner-tr {
    top: 15px;
    right: 15px;
    border-top: 3px solid #EACD9D;
    border-right: 3px solid #EACD9D;
}

.popup-corner-bl {
    bottom: 15px;
    left: 15px;
    border-bottom: 3px solid #EACD9D;
    border-left: 3px solid #EACD9D;
}

.popup-corner-br {
    bottom: 15px;
    right: 15px;
    border-bottom: 3px solid #EACD9D;
    border-right: 3px solid #EACD9D;
}

.popup-content {
    text-align-last: center;
    text-align: center;
    margin: 0 auto;
    max-width: 100%;
}

.popup-title {
    color: #EACD9D;
    font-size: 28px;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.5);
    letter-spacing: 1px;
}

.popup-message {
    color: #ccc;
    font-size: 18px;
    margin-bottom: 30px;
    line-height: 1.5;
}

.popup-btn {
    background: linear-gradient(135deg, #ff9800, #e65100);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 16px 40px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.4), 0 0 10px rgba(255, 204, 0, 0.5), inset 0 0 10px rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
    min-width: 180px;
}

.popup-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 152, 0, 0.6), 0 0 15px rgba(255, 204, 0, 0.7), inset 0 0 15px rgba(255, 255, 255, 0.4);
}

.popup-btn:not(:hover) {
    transform: translateY(0);
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.4), 0 0 10px rgba(255, 204, 0, 0.5), inset 0 0 10px rgba(255, 255, 255, 0.3);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* RTL support for popup alert */
html[dir="rtl"] .popup-title,
html[dir="rtl"] .popup-message {
    text-align: right;
    direction: rtl;
}

html[dir="rtl"] .popup-content {
    text-align: center;
    margin: 0 auto;
}

html[dir="rtl"] .icon-container {
    left: 0;
    right: 0;
    margin: 0 auto;
}

html[dir="rtl"] .popup-corner-tl {
    left: 15px; /* Keep at left side */
    right: auto;
    border-left: 3px solid #EACD9D; /* Keep left border */
    border-top: 3px solid #EACD9D; /* Keep top border */
    border-right: none;
}

html[dir="rtl"] .popup-corner-tr {
    right: 15px; /* Keep at right side */
    left: auto;
    border-right: 3px solid #EACD9D; /* Keep right border */
    border-top: 3px solid #EACD9D; /* Keep top border */
    border-left: none;
}

html[dir="rtl"] .popup-corner-bl {
    left: 15px; /* Keep at left side */
    right: auto;
    border-left: 3px solid #EACD9D; /* Keep left border */
    border-bottom: 3px solid #EACD9D; /* Keep bottom border */
    border-right: none;
}

html[dir="rtl"] .popup-corner-br {
    right: 15px; /* Keep at right side */
    left: auto;
    border-right: 3px solid #EACD9D; /* Keep right border */
    border-bottom: 3px solid #EACD9D; /* Keep bottom border */
    border-left: none;
}

/* Leaderboard Info Styles */
.leaderboard-info {
    background: linear-gradient(145deg, #0a0a0a, #1a0a0c);
    border: 2px solid #cd1222;
    border-radius: 12px;
    padding: 0;
    margin: 20px 0;
    position: relative;
    box-shadow: 0 0 20px rgba(205, 18, 34, 0.3), inset 0 0 15px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.leaderboard-header {
    background: linear-gradient(135deg, #cd1222, #8a0c1a);
    padding: 12px 15px;
    display: flex;
    align-items: center;
    border-bottom: 2px solid #EACD9D;
    position: relative;
    overflow: hidden;
}

.leaderboard-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shine 3s infinite linear;
}

@keyframes shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.leaderboard-icon {
    color: #EACD9D;
    font-size: 24px;
    margin-right: 10px;
    margin-left: 10px;
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.7);
}

.leaderboard-title {
    color: #EACD9D;
    font-size: 20px;
    margin: 0;
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.5);
    letter-spacing: 1px;
}

.leaderboard-content {
    padding: 20px;
}

.leaderboard-score-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.score-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.score-label {
    color: #EACD9D;
    font-size: 16px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 5px rgba(255, 204, 0, 0.3);
}

.score-value-container {
    background: linear-gradient(145deg, #0a0a0a, #1a0a0c);
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid #cd1222;
    min-width: 100px;
    text-align: center;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5), 0 0 10px rgba(205, 18, 34, 0.3);
    position: relative;
    overflow: hidden;
}

.score-value-container::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(205, 18, 34, 0.1) 0%, transparent 70%);
    transform: rotate(30deg);
    z-index: -1;
}

.score-value {
    color: #cd1222;
    font-weight: bold;
    font-size: 28px;
    text-shadow: 0 0 10px rgba(205, 18, 34, 0.5);
}

.leaderboard-actions {
    width: 100%;
    display: flex;
    justify-content: center;
}

.btn-leaderboard {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #EACD9D, #CA8342);
    color: #8a0c1a;
    font-weight: bold;
    border-radius: 8px;
    border: none;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3), 0 0 15px rgba(205, 18, 34, 0.3);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-leaderboard::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(30deg);
    transition: all 0.6s ease;
}

.btn-leaderboard:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4), 0 0 20px rgba(205, 18, 34, 0.4);
    color: #8a0c1a;
}

.btn-leaderboard:hover::before {
    transform: rotate(30deg) translate(20%, 20%);
}

.corner-accent {
    position: absolute;
    width: 20px;
    height: 20px;
    z-index: 1;
}

.corner-accent.corner-tl {
    top: 5px;
    left: 5px;
    border-top: 2px solid #EACD9D;
    border-left: 2px solid #EACD9D;
}

.corner-accent.corner-tr {
    top: 5px;
    right: 5px;
    border-top: 2px solid #EACD9D;
    border-right: 2px solid #EACD9D;
}

.corner-accent.corner-bl {
    bottom: 5px;
    left: 5px;
    border-bottom: 2px solid #EACD9D;
    border-left: 2px solid #EACD9D;
}

.corner-accent.corner-br {
    bottom: 5px;
    right: 5px;
    border-bottom: 2px solid #EACD9D;
    border-right: 2px solid #EACD9D;
}

/* Responsive styles for leaderboard */
@media (min-width: 768px) {
    .leaderboard-score-container {
        flex-direction: row;
        justify-content: space-between;
    }

    .score-display {
        align-items: flex-start;
    }

    .leaderboard-actions {
        justify-content: flex-end;
    }
}

@media (max-width: 480px) {
    .leaderboard-header {
        padding: 10px;
    }

    .leaderboard-icon {
        font-size: 20px;
    }

    .leaderboard-title {
        font-size: 18px;
    }

    .leaderboard-content {
        padding: 15px;
    }

    .score-label {
        font-size: 14px;
    }

    .score-value {
        font-size: 24px;
    }

    .btn-leaderboard {
        padding: 10px 15px;
        font-size: 14px;
    }
}

.game-section {
    margin: 20px 0;
    padding: 0;
    background: linear-gradient(145deg, #0a0a0a, #1a0a0c);
    border-radius: 12px;
    border: 2px solid #cd1222;
    position: relative;
    box-shadow: 0 0 20px rgba(205, 18, 34, 0.3), inset 0 0 15px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

/* Game section corner accents - reusing the same styling as leaderboard for consistency */
.game-section .corner-accent {
    position: absolute;
    width: 20px;
    height: 20px;
    z-index: 1;
}

.game-section .corner-accent.corner-tl {
    top: 5px;
    left: 5px;
    border-top: 2px solid #EACD9D;
    border-left: 2px solid #EACD9D;
}

.game-section .corner-accent.corner-tr {
    top: 5px;
    right: 5px;
    border-top: 2px solid #EACD9D;
    border-right: 2px solid #EACD9D;
}

.game-section .corner-accent.corner-bl {
    bottom: 5px;
    left: 5px;
    border-bottom: 2px solid #EACD9D;
    border-left: 2px solid #EACD9D;
}

.game-section .corner-accent.corner-br {
    bottom: 5px;
    right: 5px;
    border-bottom: 2px solid #EACD9D;
    border-right: 2px solid #EACD9D;
}

/* Result section styling - matches game-section */
.result-section {
    margin: 20px 0;
    padding: 0;
    background: linear-gradient(145deg, #0a0a0a, #1a0a0c);
    border-radius: 12px;
    border: 2px solid #cd1222;
    position: relative;
    box-shadow: 0 0 20px rgba(205, 18, 34, 0.3), inset 0 0 15px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

/* Result section corner accents - same as game-section */
.result-section .corner-accent {
    position: absolute;
    width: 20px;
    height: 20px;
    z-index: 1;
}

.result-section .corner-accent.corner-tl {
    top: 5px;
    left: 5px;
    border-top: 2px solid #EACD9D;
    border-left: 2px solid #EACD9D;
}

.result-section .corner-accent.corner-tr {
    top: 5px;
    right: 5px;
    border-top: 2px solid #EACD9D;
    border-right: 2px solid #EACD9D;
}

.result-section .corner-accent.corner-bl {
    bottom: 5px;
    left: 5px;
    border-bottom: 2px solid #EACD9D;
    border-left: 2px solid #EACD9D;
}

.result-section .corner-accent.corner-br {
    bottom: 5px;
    right: 5px;
    border-bottom: 2px solid #EACD9D;
    border-right: 2px solid #EACD9D;
}

/* Result header styling - matches game-header */
.result-header {
    background: linear-gradient(135deg, #cd1222, #8a0c1a);
    padding: 12px 15px;
    display: flex;
    align-items: center;
    border-bottom: 2px solid #EACD9D;
    position: relative;
    overflow: hidden;
}

.result-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shine 3s infinite linear;
}

.result-icon {
    color: #EACD9D;
    font-size: 24px;
    margin-right: 10px;
    margin-left: 10px;
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.7);
}

.result-title {
    color: #EACD9D;
    font-size: 20px;
    margin: 0;
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.5);
    letter-spacing: 1px;
}

/* Result content area - matches game-content */
.result-content {
    padding: 20px;
}

/* ===== PRIZE DISPLAY STYLING ===== */
.prize-display {
    text-align: center;
    animation: prizeReveal 0.8s ease-out;
}

@keyframes prizeReveal {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.prize-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, rgba(10, 10, 10, 0.8), rgba(26, 10, 12, 0.8));
    border-radius: 12px;
    border: 1px solid #cd1222;
    box-shadow: 0 0 15px rgba(205, 18, 34, 0.3), inset 0 0 10px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.prize-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shine 4s infinite linear;
}

.prize-icon {
    font-size: 48px;
    width: 78px;
    height: 78px;
    padding: 15px;
    border-radius: 50%;
    border: 3px solid #EACD9D;
    background: linear-gradient(135deg, #cd1222, #8a0c1a);
    box-shadow: 0 0 20px rgba(205, 18, 34, 0.5);
    animation: iconPulse 2s infinite ease-in-out;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(205, 18, 34, 0.5);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 30px rgba(205, 18, 34, 0.8);
    }
}

.prize-icon.prize-rare {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border-color: #FFD700;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.6);
}

.prize-icon.prize-uncommon {
    background: linear-gradient(135deg, #9370DB, #6A5ACD);
    border-color: #9370DB;
    box-shadow: 0 0 25px rgba(147, 112, 219, 0.6);
}

.prize-icon.prize-common {
    background: linear-gradient(135deg, #32CD32, #228B22);
    border-color: #32CD32;
    box-shadow: 0 0 25px rgba(50, 205, 50, 0.6);
}

.prize-info {
    flex: 1;
    text-align: left;
    position: relative;
    z-index: 1;
}

.prize-rarity {
    color: #EACD9D;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
    text-shadow: 0 0 8px rgba(255, 204, 0, 0.5);
}

.prize-name {
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    margin: 0;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    line-height: 1.2;
}

.prize-description {
    background: rgba(10, 10, 10, 0.6);
    border: 1px solid rgba(205, 18, 34, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    color: #ccc;
    font-size: 16px;
    line-height: 1.5;
    text-align: center;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
    position: relative;
}

.prize-description::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(205, 18, 34, 0.1) 0%, transparent 70%);
    border-radius: 8px;
    pointer-events: none;
}

.prize-footer {
    color: #EACD9D;
    font-size: 16px;
    font-weight: bold;
    margin: 20px 0;
    text-align: center;
    text-shadow: 0 0 8px rgba(255, 204, 0, 0.5);
    animation: footerGlow 3s infinite ease-in-out;
}

@keyframes footerGlow {
    0%, 100% {
        text-shadow: 0 0 8px rgba(255, 204, 0, 0.5);
    }
    50% {
        text-shadow: 0 0 15px rgba(255, 204, 0, 0.8);
    }
}

.prize-actions {
    margin-top: 25px;
}

.btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, #cd1222, #8a0c1a);
    color: #EACD9D;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    border: 2px solid #EACD9D;
    box-shadow: 0 0 15px rgba(205, 18, 34, 0.4);
    transition: all 0.3s ease;
    text-shadow: 0 0 5px rgba(255, 204, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(205, 18, 34, 0.6);
    border-color: #FFD700;
    color: #FFD700;
}

.btn-primary:hover::before {
    left: 100%;
}

/* ===== ERROR MESSAGE STYLING ===== */
.error-container {
    text-align: center;
    animation: errorShake 0.6s ease-out;
}

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

.error-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.8), rgba(205, 18, 34, 0.8));
    border-radius: 12px;
    border: 2px solid #ff4444;
    box-shadow: 0 0 20px rgba(255, 68, 68, 0.4), inset 0 0 10px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.error-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shine 3s infinite linear;
}

.error-icon {
    color: #ff6666;
    font-size: 32px;
    text-shadow: 0 0 10px rgba(255, 102, 102, 0.7);
    animation: errorIconPulse 2s infinite ease-in-out;
    position: relative;
    z-index: 1;
}

@keyframes errorIconPulse {
    0%, 100% {
        transform: scale(1);
        text-shadow: 0 0 10px rgba(255, 102, 102, 0.7);
    }
    50% {
        transform: scale(1.1);
        text-shadow: 0 0 20px rgba(255, 102, 102, 1);
    }
}

.error-title {
    color: #ff6666;
    font-size: 20px;
    font-weight: bold;
    margin: 0;
    text-shadow: 0 0 10px rgba(255, 102, 102, 0.5);
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

.error-content {
    background: rgba(139, 0, 0, 0.3);
    border: 1px solid rgba(255, 68, 68, 0.5);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    color: #ffcccc;
    font-size: 16px;
    line-height: 1.6;
    text-align: center;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.5);
    position: relative;
}

.error-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 68, 68, 0.1) 0%, transparent 70%);
    border-radius: 8px;
    pointer-events: none;
}

.error-footer {
    color: #ff9999;
    font-size: 14px;
    font-style: italic;
    margin-top: 15px;
    text-align: center;
    text-shadow: 0 0 5px rgba(255, 153, 153, 0.5);
}

/* ===== RESPONSIVE DESIGN FOR RESULT CONTENT ===== */
@media (max-width: 768px) {
    .result-content {
        padding: 15px;
    }

    .prize-header {
        flex-direction: column;
        gap: 10px;
        padding: 12px;
    }

    .prize-icon {
        font-size: 40px;
        width: 78px;
        height: 78px;
        padding: 12px;
    }

    .prize-info {
        text-align: center;
    }

    .prize-name {
        font-size: 20px;
    }

    .prize-description {
        padding: 12px;
        font-size: 14px;
    }

    .btn-primary {
        padding: 10px 20px;
        font-size: 14px;
    }

    .error-header {
        flex-direction: column;
        gap: 8px;
        padding: 12px;
    }

    .error-icon {
        font-size: 28px;
    }

    .error-title {
        font-size: 18px;
    }

    .error-content {
        padding: 15px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .result-content {
        padding: 12px;
    }

    .prize-icon {
        font-size: 36px;
        width: 78px;
        height: 78px;
        padding: 10px;
    }

    .prize-name {
        font-size: 18px;
    }

    .prize-rarity {
        font-size: 12px;
    }

    .prize-description {
        padding: 10px;
        font-size: 13px;
        margin: 15px 0;
    }

    .prize-footer {
        font-size: 14px;
    }

    .btn-primary {
        padding: 8px 16px;
        font-size: 13px;
    }

    .error-icon {
        font-size: 24px;
    }

    .error-title {
        font-size: 16px;
    }

    .error-content {
        padding: 12px;
        font-size: 13px;
    }

    .error-footer {
        font-size: 12px;
    }
}

/* Hidden class for visibility toggling */
.hidden {
    display: none !important;
}

/* Game header styling */
.game-header {
    background: linear-gradient(135deg, #cd1222, #8a0c1a);
    padding: 12px 15px;
    display: flex;
    align-items: center;
    border-bottom: 2px solid #EACD9D;
    position: relative;
    overflow: hidden;
}

.game-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shine 3s infinite linear;
}

.game-icon {
    color: #EACD9D;
    font-size: 24px;
    margin-right: 10px;
    margin-left: 10px;
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.7);
}

.game-title {
    color: #EACD9D;
    font-size: 20px;
    margin: 0;
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.5);
    letter-spacing: 1px;
}

/* Game content area */
.game-content {
    padding: 20px;
}

/* Game instructions styling */
.game-instructions {
    background: rgba(10, 10, 10, 0.7);
    border: 1px solid #cd1222;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.game-instructions::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(205, 18, 34, 0.3) 0%, transparent 70%);
    pointer-events: none;
}

.instruction-icon {
    color: #EACD9D;
    font-size: 24px;
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #cd1222, #8a0c1a);
    border-radius: 50%;
    border: 2px solid #EACD9D;
    box-shadow: 0 0 10px rgba(205, 18, 34, 0.5);
}

.instruction-text {
    color: #ccc;
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
}

/* Responsive styles for game section */
@media (max-width: 480px) {
    .game-header {
        padding: 10px;
    }

    .game-icon {
        font-size: 20px;
    }

    .game-title {
        font-size: 18px;
    }

    .game-content {
        padding: 15px;
    }

    .game-container {
        height: 600px;
    }

    .game-instructions {
        flex-direction: column;
        text-align: center;
        padding: 12px;
    }

    .instruction-text {
        font-size: 14px;
    }

    .play-btn {
        font-size: 1.2rem;
        padding: 0.8rem 1.2rem;
    }
}

.overlay-click {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    z-index: 1000;
}

.game-controls {
    text-align: center;
}

.play-btn {
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #cd1222, #8a0c1a);
    color: white;
    font-weight: 700;
    border-radius: 12px;
    border: 2px solid #EACD9D;
    box-shadow: 0 0 15px rgba(205, 18, 34, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.play-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(30deg);
    transition: all 0.6s ease;
}

.play-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(205, 18, 34, 0.6), 0 0 15px rgba(255, 204, 0, 0.7), inset 0 0 15px rgba(255, 255, 255, 0.4);
}

.play-btn:hover::before {
    transform: rotate(30deg) translate(20%, 20%);
}

.play-icon {
    height: 5rem;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(255, 204, 0, 0.5));
}

.buttons-container {
    text-align: center;
    margin-top: 25px;
}

.btn-secondary {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #333, #222);
    color: white;
    font-weight: 500;
    border-radius: 8px;
    border: 2px solid #444;
    text-decoration: none;
    margin-right: 10px;
}

.btn-primary {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #cd1222, #8a0c1a);
    color: white;
    font-weight: 500;
    border-radius: 8px;
    border: 2px solid #EACD9D;
    text-decoration: none;
}

/* Broken Lockpick Styles */
.broken-lockpick {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    animation: fadeIn 0.5s ease-out;
    align-content: center;
}

.broken-lockpick-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

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

.broken-lockpick-content {
    background: linear-gradient(145deg, #0a0a0a, #1a0a0c);
    border: 2px solid #cd1222;
    border-radius: 12px;
    padding: 20px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(205, 18, 34, 0.3), inset 0 0 15px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    margin: auto;
}

.broken-lockpick-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(205, 18, 34, 0.8), transparent);
    animation: scanline 2s linear infinite;
}

@keyframes scanline {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.broken-lockpick-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        45deg,
        rgba(205, 18, 34, 0.05),
        rgba(205, 18, 34, 0.05) 10px,
        transparent 10px,
        transparent 20px
    );
    pointer-events: none;
}

.broken-lockpick-header {
    margin-bottom: 15px;
    text-align: center;
    position: relative;
    width: 100%;
}

.broken-lockpick-label {
    background: linear-gradient(135deg, #cd1222, #8a0c1a);
    color: white;
    font-weight: bold;
    padding: 8px 15px;
    border-radius: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5), inset 0 0 5px rgba(255, 255, 255, 0.3);
    font-size: 16px;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.broken-lockpick-image {
    margin: 15px 0;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #cd1222;
    box-shadow: 0 0 20px rgba(205, 18, 34, 0.6);
    transform: rotate(-5deg);
    transition: transform 0.3s ease;
}

.broken-lockpick-image:hover {
    transform: rotate(5deg) scale(1.05);
}

.broken-lockpick-message {
    background: linear-gradient(145deg, #0a0a0a, #1a0a0c);
    padding: 12px;
    border-radius: 8px;
    color: #ddd;
    text-align: center;
    font-size: 14px;
    margin: 15px 0;
    width: 100%;
    border: 1px solid #cd1222;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.broken-lockpick-message::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        rgba(205, 18, 34, 0) 0%,
        rgba(205, 18, 34, 0.5) 50%,
        rgba(205, 18, 34, 0) 100%);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.broken-lockpick-scores {
    margin: 20px 0;
    display: flex;
    justify-content: space-around;
    width: 100%;
    padding: 10px;
    background: rgba(10, 10, 10, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(205, 18, 34, 1);
}

.score-item {
    text-align: center;
    padding: 0 15px;
    position: relative;
}


.score-item-label {
    font-size: 12px;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.score-item-value {
    font-size: 24px;
    font-weight: bold;
    color: #cd1222;
    text-shadow: 0 0 5px rgba(205, 18, 34, 0.5);
}

.broken-lockpick-retry {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.retry-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #cd1222, #8a0c1a);
    color: white;
    font-size: 16px;
    font-weight: 600;
    border-radius: 25px;
    border: 2px solid #EACD9D;
    box-shadow: 0 0 15px rgba(205, 18, 34, 0.6), inset 0 0 10px rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.retry-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.retry-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(205, 18, 34, 0.6), 0 0 15px rgba(255, 204, 0, 0.7), inset 0 0 15px rgba(255, 255, 255, 0.4);
}

.retry-btn:hover::before {
    opacity: 1;
}

/* Utility classes */
.text-center {
    text-align: center;
}

/* Leaderboard Content Area Styles */

/* Enhanced content area styling */
.leaderboard-content-area {
    background: linear-gradient(145deg, #0a0a0a, #1a0a0c);
    border-radius: 20px;
    border: 3px solid #cd1222;
    box-shadow:
        0 0 30px rgba(205, 18, 34, 0.6),
        0 10px 30px rgba(0, 0, 0, 0.8),
        inset 0 0 15px rgba(205, 18, 34, 0.3);
    padding: 0;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
    margin-bottom: 70px;
}

.leaderboard-content-area::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(205, 18, 34, 0.3) 0%, transparent 70%);
    transform: rotate(30deg);
    z-index: -1;
}

/* Leaderboard header styling */
.leaderboard-content-header {
    background: linear-gradient(135deg, #cd1222, #8a0c1a);
    padding: 12px 15px;
    display: flex;
    align-items: center;
    border-bottom: 2px solid #EACD9D;
    position: relative;
    overflow: hidden;
}

.leaderboard-content-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shine 3s infinite linear;
}

.leaderboard-content-icon {
    color: #EACD9D;
    font-size: 24px;
    margin-right: 10px;
    margin-left: 10px;
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.7);
}

.leaderboard-content-title {
    color: #EACD9D;
    font-size: 20px;
    margin: 0;
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.5);
    letter-spacing: 1px;
}

/* Leaderboard content body */
.leaderboard-content-body {
    padding: 20px;
}

/* Corner accents */
.leaderboard-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    z-index: 1;
}

.leaderboard-corner.corner-tl {
    top: 5px;
    left: 5px;
    border-top: 2px solid #EACD9D;
    border-left: 2px solid #EACD9D;
}

.leaderboard-corner.corner-tr {
    top: 5px;
    right: 5px;
    border-top: 2px solid #EACD9D;
    border-right: 2px solid #EACD9D;
}

.leaderboard-corner.corner-bl {
    bottom: 5px;
    left: 5px;
    border-bottom: 2px solid #EACD9D;
    border-left: 2px solid #EACD9D;
}

.leaderboard-corner.corner-br {
    bottom: 5px;
    right: 5px;
    border-bottom: 2px solid #EACD9D;
    border-right: 2px solid #EACD9D;
}

/* Tab navigation styling */
.tab-navigation-top {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.tab-group {
    display: flex;
    background: rgba(10, 10, 10, 0.7);
    border-radius: 8px;
    border: 1px solid #cd1222;
    overflow: hidden;
}

.tab-link {
    padding: 10px 20px;
    color: #ccc;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-align: center;
    font-size: 14px;
    letter-spacing: 1px;
}

.tab-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #EACD9D;
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: center;
}

.tab-link:hover {
    color: #EACD9D;
}

.tab-link:hover::before {
    transform: scaleX(0.8);
}

.tab-link.active {
    background: linear-gradient(135deg, rgba(205, 18, 34, 0.3), rgba(138, 12, 26, 0.3));
    color: #EACD9D;
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.5);
}

.tab-link.active::before {
    transform: scaleX(1);
}

/* Leaderboard table styling */
.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    border: 1px solid rgba(205, 18, 34, 0.3);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

.leaderboard-table thead {
    background: linear-gradient(135deg, rgba(205, 18, 34, 0.2), rgba(138, 12, 26, 0.2));
}

.leaderboard-table th {
    padding: 12px 15px;
    text-align: left;
    color: #EACD9D;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 14px;
    border-bottom: 1px solid rgba(205, 18, 34, 0.5);
}

.leaderboard-table td {
    padding: 12px 15px;
    color: #ccc;
    border-bottom: 1px solid rgba(205, 18, 34, 0.2);
}

.leaderboard-table tr:last-child td {
    border-bottom: none;
}

.leaderboard-table tr:nth-child(even) {
    background: rgba(10, 10, 10, 0.3);
}

.leaderboard-table tr:hover {
    background: rgba(205, 18, 34, 0.1);
}

.leaderboard-table tr.current-user {
    background: linear-gradient(135deg, rgba(205, 18, 34, 0.2), rgba(138, 12, 26, 0.2));
}

.rank-medal {
    font-size: 24px;
    display: inline-block;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.rank-number {
    color: #ccc;
}

.you-badge {
    background: linear-gradient(135deg, #cd1222, #8a0c1a);
    color: #EACD9D;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 5px rgba(205, 18, 34, 0.5);
}

.empty-message {
    text-align: center;
    padding: 20px;
    color: #aaa;
}

/* Stats section styling */
.stats-section {
    margin-top: 30px;
    background: rgba(10, 10, 10, 0.7);
    border: 1px solid #cd1222;
    border-radius: 8px;
    padding: 15px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.stats-title {
    color: #EACD9D;
    font-size: 16px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 5px rgba(255, 204, 0, 0.3);
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.stats-item {
    text-align: center;
    padding: 10px;
    background: linear-gradient(145deg, #0a0a0a, #1a0a0c);
    border-radius: 8px;
    border: 1px solid rgba(205, 18, 34, 0.3);
}

.stats-label {
    color: #aaa;
    font-size: 12px;
    margin-bottom: 5px;
}

.stats-value {
    color: #cd1222;
    font-weight: bold;
    font-size: 28px;
    text-shadow: 0 0 10px rgba(205, 18, 34, 0.5);
}

/* Action buttons */
.action-buttons {
    margin-top: 30px;
    text-align: center;
}

/* Alert message */
.alert-message {
    background-color: rgba(205, 18, 34, 0.2);
    border: 1px solid #cd1222;
    color: #EACD9D;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}

/* Responsive design for leaderboard */
@media (max-width: 480px) {
    .leaderboard-content-area {
        padding: 0;
    }

    .leaderboard-content-header {
        padding: 10px;
    }

    .leaderboard-content-icon {
        font-size: 20px;
    }

    .leaderboard-content-title {
        font-size: 18px;
    }

    .leaderboard-content-body {
        padding: 15px;
    }

    .tab-link {
        padding: 8px 12px;
        font-size: 12px;
    }

    .leaderboard-table th,
    .leaderboard-table td {
        padding: 10px 5px;
        font-size: 12px;
    }

    .rank-medal {
        font-size: 20px;
    }

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

    .stats-value {
        font-size: 24px;
    }
}

/* Enhanced Leaderboard Content Area Styles */

/* Enhanced content area styling */
.leaderboard-content-area {
    background: linear-gradient(145deg, #0a0a0a, #1a0a0c);
    border-radius: 20px;
    border: 3px solid #cd1222;
    box-shadow:
        0 0 30px rgba(205, 18, 34, 0.6),
        0 10px 30px rgba(0, 0, 0, 0.8),
        inset 0 0 15px rgba(205, 18, 34, 0.3);
    padding: 0;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
    margin-bottom: 70px;
}

.leaderboard-content-area::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(205, 18, 34, 0.3) 0%, transparent 70%);
    transform: rotate(30deg);
    z-index: -1;
}

/* Leaderboard header styling */
.leaderboard-content-header {
    background: linear-gradient(135deg, #cd1222, #8a0c1a);
    padding: 12px 15px;
    display: flex;
    align-items: center;
    border-bottom: 2px solid #EACD9D;
    position: relative;
    overflow: hidden;
}

.leaderboard-content-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shine 3s infinite linear;
}

.leaderboard-content-icon {
    color: #EACD9D;
    font-size: 24px;
    margin-right: 10px;
    margin-left: 10px;
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.7);
}

.leaderboard-content-title {
    color: #EACD9D;
    font-size: 20px;
    margin: 0;
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.5);
    letter-spacing: 1px;
}

/* Leaderboard content body */
.leaderboard-content-body {
    padding: 20px;
}

/* Enhanced corner accents */
.leaderboard-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    z-index: 1;
}

.leaderboard-corner.corner-tl {
    top: 5px;
    left: 5px;
    border-top: 2px solid #EACD9D;
    border-left: 2px solid #EACD9D;
}

.leaderboard-corner.corner-tr {
    top: 5px;
    right: 5px;
    border-top: 2px solid #EACD9D;
    border-right: 2px solid #EACD9D;
}

.leaderboard-corner.corner-bl {
    bottom: 5px;
    left: 5px;
    border-bottom: 2px solid #EACD9D;
    border-left: 2px solid #EACD9D;
}

.leaderboard-corner.corner-br {
    bottom: 5px;
    right: 5px;
    border-bottom: 2px solid #EACD9D;
    border-right: 2px solid #EACD9D;
}

/* Enhanced stats section styling */
.stats-section {
    margin-top: 30px;
    background: rgba(10, 10, 10, 0.7);
    border: 1px solid #cd1222;
    border-radius: 8px;
    padding: 15px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.stats-title {
    color: #EACD9D;
    font-size: 16px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 5px rgba(255, 204, 0, 0.3);
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.stats-item {
    text-align: center;
    padding: 10px;
    background: linear-gradient(145deg, #0a0a0a, #1a0a0c);
    border-radius: 8px;
    border: 1px solid rgba(205, 18, 34, 0.3);
}

.stats-label {
    color: #aaa;
    font-size: 12px;
    margin-bottom: 5px;
}

.stats-value {
    color: #cd1222;
    font-weight: bold;
    font-size: 28px;
    text-shadow: 0 0 10px rgba(205, 18, 34, 0.5);
}

/* Enhanced action buttons */
.action-buttons {
    margin-top: 20px;
    text-align: center;
}

.submit-btn {
    background: linear-gradient(135deg, #cd1222, #8a0c1a);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 16px 24px;
    width: 100%;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(205, 18, 34, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    display: inline-block;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(205, 18, 34, 0.6);
}

/* Shine animation */
@keyframes shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Responsive design for leaderboard */
@media (max-width: 480px) {
    .leaderboard-content-area {
        padding: 0;
    }

    .leaderboard-content-header {
        padding: 10px;
    }

    .leaderboard-content-icon {
        font-size: 20px;
    }

    .leaderboard-content-title {
        font-size: 18px;
    }

    .leaderboard-content-body {
        padding: 15px;
    }

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

    .stats-value {
        font-size: 24px;
    }

    .submit-btn {
        font-size: 14px;
        padding: 12px 20px;
    }
}

/* Terms Page Specific Styles */
.terms-content {
    padding: 20px 0;
}

.terms-sections {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
    margin-bottom: 20px;
}

.terms-sections::-webkit-scrollbar {
    width: 8px;
}

.terms-sections::-webkit-scrollbar-track {
    background: rgba(20, 10, 12, 0.8);
    border-radius: 4px;
}

.terms-sections::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #cd1222, #8a0c1a);
    border-radius: 4px;
}

.terms-sections::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #8a0c1a, #cd1222);
}

.terms-sections .section {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(20, 10, 12, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(205, 18, 34, 0.2);
}

.terms-sections .section-title {
    color: #EACD9D;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 5px rgba(234, 205, 157, 0.3);
}

.terms-sections .section p {
    color: #ccc;
    line-height: 1.6;
    font-size: 14px;
    margin: 0;
}

.back-button-container {
    text-align: center;
    margin-top: 20px;
}

.back-btn {
    background: linear-gradient(135deg, #cd1222, #8a0c1a);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(205, 18, 34, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    display: inline-block;
}

.back-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(205, 18, 34, 0.6);
    text-decoration: none;
    color: white;
}

.back-btn i {
    margin-right: 8px;
}

/* RTL support for terms page */
html[dir="rtl"] .back-btn i {
    margin-right: 0;
    margin-left: 8px;
}

/* Responsive design for terms page */
@media (max-width: 480px) {
    .terms-content {
        padding: 15px 0;
    }

    .terms-sections {
        max-height: 300px;
        padding-right: 5px;
    }

    .terms-sections .section {
        padding: 12px;
        margin-bottom: 15px;
    }

    .terms-sections .section-title {
        font-size: 14px;
    }

    .terms-sections .section p {
        font-size: 13px;
    }

    .back-btn {
        padding: 10px 20px;
        font-size: 12px;
    }
}
