@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Orbitron:wght@400;700;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

:root {
    --royal-purple: #5D3FD3;
    --royal-gold: #FFD700;
    --midnight: #0C0C1E;
    --dark-blue: #1a1a3e;
    --medium-blue: #2d2d5f;
    --light-blue: #3d3d7f;
    --neon-pink: #FF10F0;
    --neon-cyan: #00FFF0;
    --success: #00FFB7;
    --danger: #FF3366;
    --text: #FFFFFF;
    --text-dim: #B8B8D0;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--midnight);
    color: var(--text);
    overflow: hidden;
    height: 100vh;
    position: relative;
}

/* Animations */
@keyframes zoomIn {
    from { transform: scale(0) rotate(360deg); opacity: 0; }
    to { transform: scale(1) rotate(0deg); opacity: 1; }
}

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

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

@keyframes floatUp {
    0% { transform: translateY(100vh) translateX(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) translateX(20px); opacity: 0; }
}

@keyframes confettiFall {
    0% { transform: translateY(-100vh) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

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

@keyframes logoShine {
    to { background-position: 200% center; }
}

@keyframes todayPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.5); }
    50% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(255, 215, 0, 0); }
}

@keyframes premiumSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(2520deg); }
}

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

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

@keyframes toastSlide {
    to { transform: translateX(-50%) translateY(0); }
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

@keyframes textGlow {
    0% { filter: brightness(1); }
    100% { filter: brightness(1.2); }
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Background */
.luxury-bg {
    position: fixed;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0C0C1E 0%, #1a1a3e 50%, #0C0C1E 100%);
    z-index: -3;
}

.particles {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 215, 0, 0.5);
    border-radius: 50%;
    animation: floatUp 20s infinite;
}

/* Main App */
.app {
    position: relative;
    width: 100%;
    max-width: 430px;
    height: 100vh;
    margin: 0 auto;
    background: rgba(12, 12, 30, 0.95);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-left: 1px solid rgba(255, 215, 0, 0.2);
    border-right: 1px solid rgba(255, 215, 0, 0.2);
}

/* Live Ticker */
.live-ticker {
    background: linear-gradient(90deg, #1a1a3e, #2d2d5f, #1a1a3e);
    padding: 18px 0;
    overflow: hidden;
    border-bottom: 3px solid var(--royal-gold);
    position: relative;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.4);
}

.ticker-content {
    display: flex;
    animation: tickerScroll 40s linear infinite;
    white-space: nowrap;
}

.ticker-item {
    padding: 0 60px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
}

/* Header */
.header {
    background: linear-gradient(180deg, var(--dark-blue) 0%, rgba(26, 26, 62, 0.9) 100%);
    padding: 15px;
    text-align: center;
    position: relative;
}

.app-logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 32px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--royal-gold) 0%, #FFA500 50%, var(--royal-gold) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: logoShine 3s linear infinite;
    text-transform: uppercase;
    letter-spacing: 3px;
}

/* Points Card */
.points-card {
    margin: 15px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(93, 63, 2, 0.2) 0%, rgba(255, 16, 240, 0.1) 100%);
    border-radius: 24px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 15px 40px rgba(93, 63, 2, 0.4);
    position: relative;
}

/* Navigation */
.nav-tabs {
    display: flex;
    background: linear-gradient(135deg, rgba(29, 29, 95, 0.6), rgba(45, 45, 1, 0.6));
    padding: 4px;
    margin: 0 15px;
    border-radius: 20px;
    gap: 2px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

.nav-tab {
    flex: 1;
    padding: 12px 4px;
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 10px;
    font-weight: 700;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
}

.nav-tab.active {
    background: linear-gradient(135deg, var(--royal-purple), var(--neon-pink));
    color: white;
    box-shadow: 0 4px 20px rgba(255, 16, 240, 0.5);
    transform: scale(1.05);
}

/* Content */
.content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 15px 15px;
}

.tab-panel {
    display: none;
    animation: fadeIn 0.5s ease;
}

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

/* Wheel */
.wheel-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto 25px;
}

.wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: absolute;
    overflow: hidden;
    cursor: pointer;
    border: 5px solid var(--royal-gold);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.6);
    transition: transform 0.3s ease;
}

.wheel:hover {
    transform: scale(1.03);
}

.wheel.spinning {
    pointer-events: none;
    filter: brightness(1.05) saturate(1.2);
}

.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, var(--royal-gold), var(--royal-purple));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.6);
    z-index: 10;
    cursor: pointer;
}

/* Lucky Boxes */
.lucky-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 20px 0;
}

.lucky-box {
    background: linear-gradient(135deg, rgba(29, 29, 95, 0.8), rgba(93, 63, 2, 0.3));
    border-radius: 24px;
    padding: 25px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--box-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.lucky-box:hover {
    transform: translateY(-5px) scale(1.03);
}

/* Daily Grid */
.daily-container {
    background: linear-gradient(135deg, rgba(93, 63, 2, 0.2), rgba(255, 16, 240, 0.1));
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.daily-header {
    text-align: center;
    margin-bottom: 20px;
}

.daily-header h2 {
    font-size: 24px;
    font-weight: 900;
    color: var(--royal-gold);
    margin-bottom: 5px;
}

.daily-header p {
    font-size: 12px;
    color: var(--text-dim);
}

.daily-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.daily-item {
    aspect-ratio: 1;
    background: linear-gradient(135deg, rgba(45, 45, 1, 0.6), rgba(93, 63, 2, 0.3));
    border: 2px solid rgba(255, 215, 0, 0.2);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.daily-item.claimed {
    background: linear-gradient(135deg, var(--success), #00D4A1);
    border-color: var(--success);
}

.daily-item.today {
    border-color: var(--royal-gold);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
    animation: todayPulse 2s ease-in-out infinite;
}

.daily-item.future {
    opacity: 0.5;
    cursor: not-allowed;
}

.daily-item .day-number {
    font-weight: 700;
    color: white;
    font-size: 12px;
    margin-bottom: 2px;
}

.daily-item .reward-amount {
    color: var(--royal-gold);
    font-weight: 700;
    font-size: 12px;
}

.daily-streak {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 10px;
    padding: 10px 15px;
    margin-top: 10px;
}

.streak-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.streak-count {
    font-size: 18px;
    font-weight: 900;
    color: var(--royal-gold);
}

.streak-label {
    font-size: 12px;
    color: var(--text-dim);
}

.claim-button {
    background: linear-gradient(135deg, var(--royal-purple), var(--neon-pink));
    border: none;
    border-radius: 8px;
    padding: 8px 15px;
    color: white;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.claim-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.claim-button:hover:not(:disabled) {
    transform: scale(1.05);
}

/* Leaderboard */
.leader-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, rgba(29, 29, 95, 0.6), rgba(93, 63, 2, 0.2));
    border-radius: 16px;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.leader-item.current-user {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(93, 63, 2, 0.4));
    border: 2px solid var(--royal-gold);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    text-align: center;
    animation: zoomIn 0.6s ease;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, var(--dark-blue), var(--medium-blue));
    padding: 16px 30px;
    border-radius: 50px;
    display: none;
    z-index: 10001;
    min-width: 300px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.toast.show {
    display: block;
    animation: toastSlide 0.4s ease forwards;
}

.toast.success {
    border: 1px solid var(--success);
}

.toast.error {
    border: 1px solid var(--danger);
}

/* Withdraw Success */
.withdraw-success {
    background: linear-gradient(135deg, var(--dark-blue), var(--medium-blue));
    padding: 40px;
    border-radius: 30px;
    max-width: 380px;
    border: 2px solid var(--royal-gold);
    box-shadow: 0 20px 60px rgba(255, 215, 0, 0.4);
}

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    animation: confettiFall 3s ease-out forwards;
    z-index: 9999;
    pointer-events: none;
}

/* Email Input */
.email-input-container {
    position: relative;
    margin-bottom: 20px;
}

.email-input {
    width: 100%;
    padding: 16px;
    background: rgba(12, 12, 30, 0.8);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    color: white;
    font-size: 15px;
    transition: all 0.3s ease;
}

.email-input:focus {
    border-color: var(--royal-gold);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
    outline: none;
}

.email-input.error {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(255, 51, 102, 0.2);
}

.email-error {
    color: var(--danger);
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

/* Loading Spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

/* Floating Reward */
.floating-reward {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    font-size: 36px;
    font-weight: 900;
    color: var(--success);
    text-shadow: 0 0 20px rgba(0,255,183,0.8);
    pointer-events: none;
    z-index: 9998;
    animation: floatUp 2s forwards;
}

/* PayPal Animated Logo */
.paypal-animated-logo {
    display: inline-block;
    background: linear-gradient(135deg, #002d85 0%, #0070ba 50%, #009cde 100%);
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 900;
    font-size: 20px;
    letter-spacing: 1px;
    box-shadow: 
        0 4px 15px rgba(0, 48, 135, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.paypal-animated-logo::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

.paypal-pulse {
    color: white;
    background: linear-gradient(45deg, #ffffff, #cce7ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: textGlow 2s ease-in-out infinite alternate;
}
