/* ==================== VISUAL EFFECTS STYLES ==================== */

/* ==================== CUSTOM SCROLLBAR ==================== */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--gold-dark) rgba(0, 0, 0, 0.3);
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

*::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--gold-light), var(--gold-dark));
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.3);
}

*::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ffdd33, #d4a00a);
}

*::-webkit-scrollbar-corner {
    background: transparent;
}

/* ==================== PARTICLE SYSTEM ==================== */
#particles-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    bottom: -20px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.9), rgba(255, 215, 0, 0));
    border-radius: 50%;
    animation: floatUp 20s linear infinite;
    opacity: 0;
}

.particle-star {
    background: none;
    color: rgba(255, 215, 0, 0.6);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    animation: floatUpStar 18s linear infinite;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) translateX(0) scale(0);
        opacity: 0;
    }

    10% {
        opacity: 0.6;
        transform: translateY(-10vh) translateX(10px) scale(1);
    }

    50% {
        opacity: 0.4;
    }

    90% {
        opacity: 0.2;
    }

    100% {
        transform: translateY(-110vh) translateX(-20px) scale(0.5);
        opacity: 0;
    }
}

@keyframes floatUpStar {
    0% {
        transform: translateY(0) rotate(0deg) scale(0);
        opacity: 0;
    }

    5% {
        opacity: 0.8;
        transform: translateY(-5vh) rotate(45deg) scale(1);
    }

    50% {
        opacity: 0.5;
        transform: translateY(-50vh) rotate(180deg) scale(0.8);
    }

    100% {
        transform: translateY(-110vh) rotate(360deg) scale(0.3);
        opacity: 0;
    }
}

/* ==================== POPUP OVERLAY ==================== */
.popup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 500;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
    background: rgba(0, 0, 0, 0.5);
}

.popup-title {
    font-family: 'Lalezar', sans-serif;
    font-size: 1.4rem;
    color: var(--gold-light);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.popup-title i {
    margin-left: 6px;
}

.popup-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-close:hover {
    background: rgba(255, 100, 100, 0.3);
    border-color: #ff6b6b;
    color: #ff6b6b;
}

.popup-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    padding-bottom: 100px;
}

/* ==================== LEADERBOARD STYLES ==================== */
.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s;
}

.leaderboard-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.leaderboard-item.gold {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(184, 134, 11, 0.1));
    border-color: rgba(255, 215, 0, 0.4);
}

.leaderboard-item.silver {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.2), rgba(128, 128, 128, 0.1));
    border-color: rgba(192, 192, 192, 0.4);
}

.leaderboard-item.bronze {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.2), rgba(139, 69, 19, 0.1));
    border-color: rgba(205, 127, 50, 0.4);
}

.leaderboard-item.current-user {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.3), rgba(33, 150, 243, 0.2));
    border: 2px solid #4CAF50;
}

.rank-number {
    min-width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #fff;
    font-size: 0.9rem;
}

.rank-number.top-3 {
    background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
    color: #000;
}

.user-info {
    flex: 1;
}

.user-name {
    color: #fff;
    font-weight: bold;
    margin-bottom: 4px;
}

.prize-text {
    color: #888;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.prize-text i {
    color: var(--gold-light);
}

.user-score {
    color: var(--gold-light);
    font-weight: bold;
    font-size: 0.95rem;
}

.current-user-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(20, 20, 30, 0.98);
    border-top: 2px solid var(--gold-dark);
    padding: 15px 20px;
    z-index: 600;
    box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.8);
}

/* ==================== HELP POPUP STYLES ==================== */
.help-section {
    margin-bottom: 10px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.help-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.2s;
}

.help-section-header:hover {
    background: rgba(255, 255, 255, 0.1);
}

.help-section-header i:first-child {
    color: var(--gold-light);
    font-size: 1.1rem;
}

.help-section-header span {
    flex: 1;
    color: #fff;
    font-weight: bold;
}

.help-section-header .chevron {
    color: #888;
    transition: transform 0.3s;
}

.help-section.open .chevron {
    transform: rotate(180deg);
}

.help-section-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.help-section.open .help-section-body {
    max-height: 500px;
}

.help-section-content {
    padding: 15px;
    color: #ccc;
    line-height: 1.8;
    background: rgba(0, 0, 0, 0.3);
}

.prize-list-help {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.prize-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.prize-list-item .rank {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

.prize-list-item.gold .rank {
    background: linear-gradient(135deg, #ffd700, #b8860b);
    color: #000;
}

.prize-list-item.silver .rank {
    background: linear-gradient(135deg, #c0c0c0, #888);
    color: #000;
}

.prize-list-item.bronze .rank {
    background: linear-gradient(135deg, #cd7f32, #8b4513);
}

/* ==================== MEGA PRIZE POPUP ==================== */
.mega-prize-card {
    background: linear-gradient(135deg, rgba(93, 64, 55, 0.6), rgba(26, 15, 15, 0.8));
    border: 2px solid var(--gold-light);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.mega-prize-image {
    width: 100%;
    max-height: 200px;
    object-fit: contain;
    border-radius: 12px;
    margin-bottom: 15px;
}

.mega-prize-title {
    font-family: 'Lalezar', sans-serif;
    font-size: 1.5rem;
    color: var(--gold-light);
    margin-bottom: 10px;
}

.mega-prize-desc {
    color: #ccc;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.mega-prize-value {
    display: inline-block;
    background: linear-gradient(135deg, #c0392b, #e74c3c);
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: bold;
}

.small-prizes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 20px;
}

.small-prize-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    transition: all 0.2s;
}

.small-prize-card:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: var(--gold-dark);
    transform: translateY(-3px);
}

.small-prize-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d35400, #c0392b);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 1.2rem;
}

.small-prize-card h4 {
    color: #fff;
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.small-prize-card p {
    color: #888;
    font-size: 0.8rem;
    margin: 0;
}

.cta-button {
    display: block;
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #d35400, #f1c40f);
    color: #fff;
    text-align: center;
    border-radius: 50px;
    font-family: 'Lalezar', sans-serif;
    font-size: 1.3rem;
    text-decoration: none;
    margin-top: 20px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(211, 84, 0, 0.4);
    color: #fff;
}

/* ==================== FALLING LEAVES ==================== */
#leavesContainer {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.falling-leaf {
    position: absolute;
    top: -50px;
    font-size: 24px;
    animation: leafFall linear infinite;
    pointer-events: none;
}

@keyframes leafFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* ==================== ANIMATIONS ==================== */
.animate-bounce {
    animation: bounce 1s ease infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.popup-overlay .popup-content {
    animation: slideUp 0.3s ease;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes flashFade {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(1.5);
    }
}

/* ==================== WELCOME POPUP STYLES ==================== */
.welcome-content {
    text-align: center;
}

.welcome-hero {
    margin-bottom: 25px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(184, 134, 11, 0.1));
    border-radius: 20px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.welcome-icon {
    font-size: 64px;
    margin-bottom: 15px;
    animation: welcomeBounce 2s ease-in-out infinite;
}

@keyframes welcomeBounce {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-10px) scale(1.1);
    }
}

.welcome-title {
    font-family: 'Lalezar', sans-serif;
    font-size: 1.8rem;
    color: #ffd700;
    text-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
    margin-bottom: 8px;
}

.welcome-subtitle {
    color: #e2e8f0;
    font-size: 1rem;
    margin: 0;
}

.welcome-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.welcome-feature {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: right;
    transition: all 0.3s ease;
}

.welcome-feature:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.3);
    transform: translateX(-5px);
}

.feature-icon {
    font-size: 28px;
    min-width: 40px;
    text-align: center;
}

.feature-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.feature-text strong {
    color: #ffd700;
    font-size: 0.95rem;
}

.feature-text span {
    color: #a0aec0;
    font-size: 0.8rem;
}

.welcome-cta {
    padding-top: 10px;
}

.welcome-btn {
    width: 100%;
    padding: 15px 30px;
    border: none;
    border-radius: 15px;
    font-family: 'Lalezar', sans-serif;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.welcome-btn.primary {
    background: linear-gradient(135deg, #ffd700, #b8860b);
    color: #000;
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.4);
}

.welcome-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.5);
}

.welcome-btn.primary:active {
    transform: translateY(0);
}

.welcome-note {
    color: #718096;
    font-size: 0.8rem;
    margin-top: 15px;
    margin-bottom: 0;
}
/* ==================== BEAUTIFUL HELP POPUP ==================== */
.help-beautiful {
    padding-bottom: 30px !important;
}

.help-hero {
    text-align: center;
    padding: 25px 20px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(184, 134, 11, 0.1));
    border-radius: 20px;
    border: 2px solid rgba(255, 215, 0, 0.4);
    margin-bottom: 20px;
}

.help-hero-icon {
    font-size: 50px;
    margin-bottom: 10px;
}

.help-hero h3 {
    font-family: 'Lalezar', sans-serif;
    font-size: 1.5rem;
    color: #ffd700;
    margin-bottom: 8px;
}

.help-hero p {
    color: #e2e8f0;
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.6;
}

/* Help Cards */
.help-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    margin-bottom: 15px;
    overflow: hidden;
}

.help-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: rgba(255, 215, 0, 0.1);
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.help-card-header i {
    color: #ffd700;
    font-size: 1.1rem;
}

.help-card-header span {
    color: #ffd700;
    font-weight: bold;
    font-size: 1rem;
}

.help-card-body {
    padding: 15px;
}

/* Steps */
.help-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.help-step:last-child {
    border-bottom: none;
}

.step-num {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #ffd700, #b8860b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #000;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.step-text {
    color: #e2e8f0;
    font-size: 0.9rem;
}

/* Ticket Methods */
.ticket-method {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    margin-bottom: 10px;
}

.ticket-method:last-child {
    margin-bottom: 0;
}

.ticket-method.highlight {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(184, 134, 11, 0.1));
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.ticket-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.ticket-icon.daily { background: linear-gradient(135deg, #3498db, #2980b9); }
.ticket-icon.invite { background: linear-gradient(135deg, #9b59b6, #8e44ad); }
.ticket-icon.register { background: linear-gradient(135deg, #2ecc71, #27ae60); }
.ticket-icon.buy { background: linear-gradient(135deg, #f39c12, #d68910); }

.ticket-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ticket-info strong {
    color: #fff;
    font-size: 0.9rem;
}

.ticket-count {
    color: #a0aec0;
    font-size: 0.8rem;
}

.badge-infinite {
    display: inline-block;
    background: linear-gradient(135deg, #ffd700, #b8860b);
    color: #000;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: bold;
    margin-right: 5px;
}

/* Prizes Grid */
.prizes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 15px;
}

.prize-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 5px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    text-align: center;
}

.prize-badge.gold {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(184, 134, 11, 0.2));
    border: 1px solid rgba(255, 215, 0, 0.5);
}

.prize-badge.silver {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.3), rgba(128, 128, 128, 0.2));
    border: 1px solid rgba(192, 192, 192, 0.5);
}

.prize-badge.bronze {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.3), rgba(139, 69, 19, 0.2));
    border: 1px solid rgba(205, 127, 50, 0.5);
}

.prize-badge.everyone {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.3), rgba(39, 174, 96, 0.2));
    border: 1px solid rgba(46, 204, 113, 0.5);
}

.prize-rank {
    font-weight: bold;
    color: #ffd700;
    font-size: 0.9rem;
    margin-bottom: 3px;
}

.prize-name {
    color: #ccc;
    font-size: 0.7rem;
    line-height: 1.2;
}

.everyone-wins {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.2), rgba(39, 174, 96, 0.1));
    border-radius: 12px;
    border: 1px solid rgba(46, 204, 113, 0.4);
}

.everyone-wins i {
    color: #2ecc71;
    font-size: 1.2rem;
}

.everyone-wins span {
    color: #2ecc71;
    font-weight: bold;
    font-size: 0.85rem;
}
