/* Bonus Page Styles - Premium Design */
:root {
    --bonus-gradient-start: #304FFE;
    --bonus-gradient-end: #00d4ff;
    --bonus-success: #2ed573;
    --bonus-card-shadow: 0 10px 40px rgba(48, 79, 254, 0.15);
}

.bonus-header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 18px 0;
    border-bottom: 1px solid rgba(224, 224, 224, 0.5);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.03);
}

.bonus-header-content {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    width: 100%;
    min-height: 56px;
    gap: 14px;
}

/* === LOGO === */
.bonus-logo-container {
    display: flex;
    align-items: center;
    justify-self: center;
    grid-column: 2;
    min-width: 0;
}

.bonus-logo {
    height: clamp(30px, 3.3vw, 38px);
    width: auto;
    max-width: min(210px, 52vw);
    object-fit: contain;
}

/* === LANGUAGE SWITCHER === */
.bonus-header .language-switcher {
    position: relative;
    justify-self: start;
    grid-column: 1;
    margin: 0 !important;
    order: initial !important;
}

/* === USER MENU === */
.user-menu-wrapper {
    position: relative;
    justify-self: end;
    grid-column: 3;
    margin: 0 !important;
    order: initial !important;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    flex-direction: column;
    gap: 5px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

[dir="rtl"] .mobile-menu-toggle {
    margin-right: 0;
    margin-left: 15px;
}

[dir="ltr"] .mobile-menu-toggle {
    margin-left: 0;
    margin-right: 15px;
}

.mobile-menu-toggle:hover {
    background: rgba(48, 79, 254, 0.05);
}

.mobile-menu-toggle span {
    width: 26px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* User Menu - Premium Design */
.user-icon-btn {
    background: linear-gradient(135deg, rgba(48, 79, 254, 0.1) 0%, rgba(0, 212, 255, 0.1) 100%);
    border: 2px solid rgba(48, 79, 254, 0.2);
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--primary-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(48, 79, 254, 0.1);
}

.user-icon-btn:hover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(48, 79, 254, 0.15) 0%, rgba(0, 212, 255, 0.15) 100%);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(48, 79, 254, 0.2);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    left: 0 !important;
    right: auto !important;
    background: #ffffff;
    border: 1px solid rgba(224, 224, 224, 0.8);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    min-width: 300px;
    display: none;
    z-index: 1001;
    overflow: hidden;
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ensure dropdown opens to the right (starts from button and extends rightward) */
body[dir="ltr"] .user-dropdown,
body[dir="rtl"] .user-dropdown {
    left: 0 !important;
    right: auto !important;
}

.user-dropdown.active {
    display: block;
}

.user-email {
    padding: 20px;
    border-bottom: 1px solid rgba(224, 224, 224, 0.5);
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 600;
    background: linear-gradient(135deg, rgba(248, 248, 248, 0.5) 0%, rgba(255, 255, 255, 0.5) 100%);
}

.email-prefix {
    color: var(--text-primary);
    font-weight: 600;
}

.email-stars {
    color: var(--text-secondary);
    letter-spacing: 3px;
    margin: 0 2px;
}

.email-domain {
    color: var(--text-primary);
    font-weight: 500;
}

.verification-badge {
    background: linear-gradient(135deg, rgba(46, 213, 115, 0.12) 0%, rgba(46, 213, 115, 0.08) 100%);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2ed573;
    font-size: 14px;
    font-weight: 600;
    border-left: 3px solid #2ed573;
}

body[dir="rtl"] .verification-badge {
    border-left: none;
    border-right: 3px solid #2ed573;
}

.verification-badge svg {
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(46, 213, 115, 0.3));
}

.logout-btn {
    width: 100%;
    background: transparent;
    border: none;
    padding: 16px 20px;
    color: var(--error-color);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    font-family: var(--font-family);
    border-top: 1px solid rgba(224, 224, 224, 0.5);
}

.logout-btn:hover {
    background: rgba(255, 71, 87, 0.05);
    padding-right: 24px;
}

body[dir="ltr"] .logout-btn:hover {
    padding-right: 20px;
    padding-left: 24px;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Menu - Premium */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    z-index: 1002;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

body[dir="ltr"] .mobile-menu {
    right: auto;
    left: -100%;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
}

.mobile-menu.active {
    right: 0;
}

body[dir="ltr"] .mobile-menu.active {
    left: 0;
}

.mobile-menu-content {
    padding: 30px 20px;
}

.mobile-menu-close {
    background: rgba(48, 79, 254, 0.1);
    border: none;
    font-size: 22px;
    color: var(--primary-color);
    cursor: pointer;
    margin-bottom: 30px;
    padding: 8px 12px;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.mobile-menu-close:hover {
    background: rgba(48, 79, 254, 0.15);
    transform: scale(1.1);
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-nav-link {
    padding: 14px 18px;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 15px;
    border: 2px solid transparent;
}

.mobile-nav-link:hover {
    background: rgba(48, 79, 254, 0.08);
    color: var(--primary-color);
    transform: translateX(-5px);
    border-color: rgba(48, 79, 254, 0.2);
}

body[dir="ltr"] .mobile-nav-link:hover {
    transform: translateX(5px);
}

.mobile-nav-link.active {
    background: linear-gradient(135deg, rgba(48, 79, 254, 0.15) 0%, rgba(0, 212, 255, 0.1) 100%);
    color: var(--primary-color);
    border-color: rgba(48, 79, 254, 0.3);
    box-shadow: 0 2px 8px rgba(48, 79, 254, 0.1);
}

/* Main Content - Premium Design */
.bonus-main {
    padding: 80px 0;
    min-height: calc(100vh - 80px);
    background: linear-gradient(135deg, #f8f8f8 0%, #ffffff 50%, #f8f8f8 100%);
    position: relative;
    overflow: hidden;
}

.bonus-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 400px;
    background: linear-gradient(135deg, rgba(48, 79, 254, 0.03) 0%, rgba(0, 212, 255, 0.02) 100%);
    z-index: 0;
}

.bonus-container {
    max-width: 650px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.bonus-card {
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.98) 100%);
    border-radius: 32px;
    padding: 56px 48px;
    box-shadow: var(--bonus-card-shadow);
    text-align: center;
    border: 1px solid rgba(224, 224, 224, 0.5);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.bonus-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(48, 79, 254, 0.05) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

.bonus-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(48, 79, 254, 0.2);
}

.bonus-icon {
    margin-bottom: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
    height: 120px;
}

.icon-glow {
    position: absolute;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(48, 79, 254, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 3s ease-in-out infinite;
}

.bonus-icon svg {
    filter: drop-shadow(0 6px 20px rgba(48, 79, 254, 0.4));
    animation: float 3s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

.bonus-title {
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--bonus-gradient-end) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
    line-height: 1.2;
}

.bonus-description {
    font-size: 17px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

.bonus-amount {
    background: linear-gradient(135deg, rgba(48, 79, 254, 0.08) 0%, rgba(0, 212, 255, 0.05) 100%);
    border-radius: 20px;
    padding: 28px 32px;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 2px solid rgba(48, 79, 254, 0.15);
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(48, 79, 254, 0.1);
}

.amount-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(48, 79, 254, 0.1);
    border-radius: 14px;
}

.amount-icon svg {
    width: 28px;
    height: 28px;
}

.amount-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

body[dir="rtl"] .amount-content {
    align-items: flex-end;
}

.bonus-amount-label {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bonus-amount-value {
    font-size: 48px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--bonus-gradient-end) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -2px;
    line-height: 1;
}

.bonus-actions {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    z-index: 1;
}

.btn-bonus-claim,
.btn-bonus-withdraw {
    padding: 18px 32px;
    border-radius: 16px;
    font-size: 17px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-family: var(--font-family);
    position: relative;
    overflow: hidden;
}

.btn-bonus-claim {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--bonus-gradient-end) 100%);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(48, 79, 254, 0.3);
}

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

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

.btn-bonus-claim:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(48, 79, 254, 0.4);
}

.btn-bonus-withdraw {
    background: #ffffff;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: 0 2px 8px rgba(48, 79, 254, 0.1);
}

.btn-bonus-withdraw:hover {
    background: linear-gradient(135deg, rgba(48, 79, 254, 0.05) 0%, rgba(0, 212, 255, 0.03) 100%);
    border-color: var(--bonus-gradient-end);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(48, 79, 254, 0.2);
}

.btn-bonus-claim.loading,
.btn-bonus-withdraw.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-15px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .bonus-card {
        padding: 40px 32px;
        margin: 0 20px;
        border-radius: 24px;
    }

    .bonus-title {
        font-size: 28px;
    }

    .bonus-amount {
        padding: 24px 28px;
        flex-direction: column;
        gap: 8px;
    }

    .bonus-amount-value {
        font-size: 36px;
    }

    .user-dropdown {
        left: 0 !important;
        right: auto !important;
        min-width: 260px;
        max-width: calc(100vw - 40px);
    }

    .bonus-header-content {
        min-height: 52px;
        gap: 10px;
        grid-template-columns: auto 1fr auto;
    }

    .bonus-logo-container {
        position: static;
        transform: none;
        grid-column: 2;
        justify-self: center;
    }

    .bonus-header .language-switcher {
        grid-column: 1;
        justify-self: start;
    }

    .user-menu-wrapper {
        grid-column: 3;
        justify-self: end;
    }

    .bonus-logo {
        height: 30px;
        max-width: min(180px, 48vw);
    }

    .bonus-header .lang-toggle-btn,
    .user-icon-btn {
        width: 38px;
        height: 38px;
    }

    .mobile-menu-toggle {
        order: 1;
    }

    .bonus-main {
        padding: 60px 0;
    }
}

@media (max-width: 480px) {
    .bonus-header {
        padding: 12px 0;
    }

    .bonus-header-content {
        min-height: 46px;
        gap: 8px;
    }

    .bonus-logo {
        height: 26px;
        max-width: min(150px, 44vw);
    }

    .bonus-header .lang-toggle-btn,
    .user-icon-btn {
        width: 34px;
        height: 34px;
    }

    .globe-icon {
        width: 18px;
        height: 18px;
    }

    .bonus-main {
        padding: 40px 0;
    }

    .bonus-card {
        padding: 32px 24px;
        margin: 0 15px;
        border-radius: 20px;
    }

    .bonus-title {
        font-size: 24px;
    }

    .bonus-description {
        font-size: 15px;
    }

    .bonus-amount {
        padding: 20px 24px;
    }

    .bonus-amount-value {
        font-size: 32px;
    }

    .btn-bonus-claim,
    .btn-bonus-withdraw {
        padding: 16px 24px;
        font-size: 16px;
    }
}

/* Loading animation for buttons */
.btn.loading::after {
    content: '';
    width: 18px;
    height: 18px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: inline-block;
    margin-right: 8px;
}

body[dir="ltr"] .btn.loading::after {
    margin-right: 0;
    margin-left: 8px;
}

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

