
/* ===== RESET & MOBILE-FIRST BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    /* Colors */
    --primary-color: #00d4ff;
    --secondary-color: #ff6b6b;
    --accent-color: #ffd93d;
    --success-color: #6bcf7f;
    --warning-color: #ff9500;
    --danger-color: #ff4757;

    /* Title System Colors */
    --title-cupu: #8B7355;
    --title-pemula: #CD7F32; 
    --title-aktif: #C0C0C0;
    --title-serius: #FFD700;
    --title-expert: #FF6B35;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    --gradient-success: linear-gradient(45deg, #6bcf7f, #4ecdc4);
    --gradient-cosmic: linear-gradient(135deg, #0f0f23 0%, #1a1a3e 50%, #2d1b69 100%);
    
    /* Fonts */
    --font-primary: 'Orbitron', monospace;
    --font-secondary: 'Rajdhani', sans-serif;
    
    /* MOBILE-FIRST SPACING */
    --spacing-xs: 0.5rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.25rem;
    --spacing-xl: 1.5rem;
    --spacing-xxl: 2rem;
    
    /* MOBILE-FIRST SIZES */
    --header-height: 100px;
    --footer-height: 70px;
    --mission-size: 80px;
    --floating-btn-size: 70px;
    --min-touch-size: 48px;
    
    /* MOBILE-FIRST TYPOGRAPHY */
    --font-xs: 0.75rem;
    --font-sm: 0.875rem;
    --font-md: 1rem;
    --font-lg: 1.125rem;
    --font-xl: 1.25rem;
    --font-xxl: 1.5rem;
    --font-title: 2rem;
}

/* MOBILE-FIRST TYPOGRAPHY SCALE */
@media (min-width: 768px) {
    :root {
        --spacing-xs: 0.25rem;
        --spacing-sm: 0.5rem;
        --spacing-md: 0.75rem;
        --spacing-lg: 1rem;
        --spacing-xl: 1.5rem;
        --spacing-xxl: 2rem;
        
        --header-height: 80px;
        --footer-height: 60px;
        --mission-size: 70px;
        --floating-btn-size: 60px;
        
        --font-xs: 0.7rem;
        --font-sm: 0.8rem;
        --font-md: 0.9rem;
        --font-lg: 1rem;
        --font-xl: 1.1rem;
        --font-xxl: 1.3rem;
        --font-title: 1.8rem;
    }
}

body {
    font-family: var(--font-secondary);
    background: var(--gradient-cosmic);
    color: white;
    overflow-x: hidden;
    height: 100vh;
    height: -webkit-fill-available; /* iOS viewport fix */
    position: relative;
    font-size: var(--font-md);
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    -webkit-overflow-scrolling: touch;
}

/* ===== ANIMATED BACKGROUND - OPTIMIZED ===== */
.bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.bg-stars {
    position: absolute;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="1" fill="white" opacity="0.8"/><circle cx="80" cy="30" r="0.5" fill="white" opacity="0.6"/><circle cx="40" cy="50" r="0.8" fill="white" opacity="0.7"/><circle cx="60" cy="70" r="0.6" fill="white" opacity="0.5"/><circle cx="10" cy="80" r="0.7" fill="white" opacity="0.6"/><circle cx="90" cy="10" r="1" fill="white" opacity="0.8"/></svg>') repeat;
    animation: twinkle 4s ease-in-out infinite;
}

.bg-nebula {
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 20% 50%, rgba(255, 107, 107, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 40% 80%, rgba(107, 207, 127, 0.1) 0%, transparent 50%);
    animation: nebula-drift 20s linear infinite;
}

.bg-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0.15;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.3)" stroke-width="1"/></pattern></defs><rect width="50" height="50" fill="url(%23grid)"/></svg>') repeat;
}

/* Reduced motion for mobile performance */
@media (prefers-reduced-motion: reduce) {
    .bg-stars,
    .bg-nebula {
        animation: none;
    }
}

@keyframes twinkle {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 0.3; }
}

@keyframes nebula-drift {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: -webkit-fill-available;
    max-width: 100%;
    margin: 0 auto;
    padding: var(--spacing-sm);
    position: relative;
    z-index: 1;
    /* iOS safe area support */
    padding-top: max(var(--spacing-sm), env(safe-area-inset-top));
    padding-bottom: max(var(--spacing-sm), env(safe-area-inset-bottom));
    padding-left: max(var(--spacing-sm), env(safe-area-inset-left));
    padding-right: max(var(--spacing-sm), env(safe-area-inset-right));
}

.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;  /* ✅ CENTER VERTIKAL */
    align-items: center;      /* ✅ CENTER HORIZONTAL */
    min-height: 0;
    overflow: hidden;
}

.app-footer {
    flex-shrink: 0;
    height: var(--footer-height);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ✅ HEADER CONTENT - UPDATED */
.header-content {
    position: relative;
    z-index: 2;
    width: 100%;
    text-align: center;
}

/* ✅ COMPACT TITLE */
.main-title {
    font-family: var(--font-primary);
    font-size: var(--font-xl);  /* ✅ KURANGI DARI var(--font-title) */
    font-weight: 900;
    margin-bottom: var(--spacing-xs);  /* ✅ KURANGI */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    line-height: 1.1;
}

.title-text {
    background: linear-gradient(45deg, #ff6b6b, #ffd93d, #6bcf7f, #4ecdc4, #00d4ff);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbow-shift 3s ease-in-out infinite;
}

.title-icon {
    font-size: 1.3em;
    animation: icon-pulse 2s ease-in-out infinite;
}

.login-title-icon {
    width: 50px;  /* Ukuran gambar untuk ikon login */
    height: auto; /* Pastikan tinggi otomatis agar proporsional */
    margin-right: 8px; /* Spasi antara gambar dan teks */
    animation: icon-pulse 2s ease-in-out infinite;
}

.subtitle {
    font-size: var(--font-md);  /* ✅ KURANGI DARI var(--font-lg) */
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    text-align: center;
    margin: 0;
    line-height: 1.2;
}

@keyframes rainbow-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes icon-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.login-section {
    flex: 1; /* Use flex to fill available space */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-lg);
    gap: var(--spacing-xl);
    width: 100%;
    min-height: 100vh; /* ✅ TAMBAHKAN INI KEMBALI */
}

.login-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    padding: var(--spacing-xxl);
    width: 100%;
    max-width: 400px; /* ✅ INI YANG PENTING */
    margin: 0 auto; /* ✅ INI JUGA PENTING */
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shine 3s ease-in-out infinite;
}

.card-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.card-header h2 {
    font-family: var(--font-primary);
    font-size: var(--font-xl);
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: var(--spacing-sm);
}

.input-group {
    margin-bottom: var(--spacing-xl);
}

.input-group label {
    display: block;
    margin-bottom: var(--spacing-sm);
    color: rgba(255, 255, 255, 0.95);
    font-weight: 700;
    font-size: var(--font-md);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 5px;
}

.input-container {
    position: relative;
}

.input-container input {
    width: 100%;
    padding: 1.2rem 1.5rem;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: var(--font-lg);
    font-weight: 600;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    min-height: var(--min-touch-size);
}

.input-container input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 25px rgba(0, 212, 255, 0.5);
    transform: translateY(-2px);
}

.input-container input::placeholder {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.input-decoration {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
    border-radius: 0 0 15px 15px;
}

.input-container input:focus + .input-decoration {
    width: 100%;
}

@keyframes shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ✅ GAME SECTION - GROUPED WITH HEADER */
.game-section {
    display: none;  /* Default hidden */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 500px;
    gap: var(--spacing-md);
}

.login-section .app-header,
.game-section .app-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--spacing-sm) 0 var(--spacing-md) 0;
    width: 100%;
}

.login-section .app-header {
    flex-shrink: 0;
    padding: var(--spacing-md) 0;
    margin-bottom: 0;
}

/* ===== PLAYER INFO COMPACT ===== */
.player-info-compact {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: var(--spacing-md);
    width: 100%;
    flex-shrink: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.player-info-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.player-avatar {
    position: relative;
    flex-shrink: 0;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    position: relative;
    z-index: 2;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.avatar-image {  /* Kelas untuk gambar avatar */
    height: 35px; /* Ukuran gambar yang lebih kecil */
    object-fit: cover; /* Menjaga rasio proporsi gambar */
}

.avatar-ring {
    position: absolute;
    top: -3px;
    left: -3px;
    width: 56px;
    height: 56px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: ring-rotate 4s linear infinite;
}

.player-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.welcome-message {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.welcome-text {
    font-family: var(--font-primary);
    font-size: var(--font-md);
    color: var(--accent-color);
    font-weight: 700;
    line-height: 1.1;
}

.player-name-display {
    font-family: var(--font-secondary);
    font-size: var(--font-lg);
    font-weight: 700;
    color: white;
    line-height: 1.1;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
    background: linear-gradient(45deg, #ff6b6b, #ffd93d, #6bcf7f);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: username-glow 3s ease-in-out infinite;
}

/* HORIZONTAL LAYOUT FOR PLAYER STATS */
.player-info-compact .player-stats {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
    padding: var(--spacing-xs) 0;
    flex-wrap: nowrap;
    width: 100%;
}

.player-info-compact .stat-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    background: rgba(255, 255, 255, 0.15);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 12px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: all 0.3s ease;
    flex: 1;
    min-width: 110px;
    justify-content: center;
    font-size: var(--font-xs);
    font-weight: 600;
}

.player-info-compact .stat-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}

.player-info-compact .stat-icon {
    font-size: var(--font-md);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    flex-shrink: 0;
}

.player-info-compact .stat-value {
    font-weight: 700;
    font-size: var(--font-xs);
    color: rgba(255, 255, 255, 0.95);
    white-space: nowrap;
    text-align: center;
}

.player-info-compact .stat-item.streak {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 140, 0, 0.2));
    border-color: rgba(255, 215, 0, 0.4);
}

.player-info-compact .stat-item.next-reward {
    background: linear-gradient(135deg, rgba(0, 255, 127, 0.2), rgba(0, 191, 255, 0.2));
    border-color: rgba(0, 255, 127, 0.4);
}

@keyframes username-glow {
    0%, 100% { 
        background-position: 0% 50%;
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    }
    50% { 
        background-position: 100% 50%;
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    }
}

@keyframes ring-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== MISSION CONTAINER COMPACT ===== */
.mission-container-compact {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: var(--spacing-md);
    width: 100%;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.mission-container-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.mission-title {
    text-align: center;
    font-family: var(--font-primary);
    font-size: var(--font-lg);
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: var(--accent-color);
    flex-shrink: 0;
    line-height: 1.2;
    text-shadow: 0 0 10px rgba(255, 217, 61, 0.3);
}

.mission-scroll-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.mission-grid-horizontal {
    display: flex;
    gap: var(--spacing-md);
    overflow-x: auto;
    overflow-y: hidden;
    padding: var(--spacing-sm) 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex: 1;
    scroll-snap-type: x mandatory;
}

.mission-grid-horizontal::-webkit-scrollbar {
    display: none;
}

.mission-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    min-width: var(--mission-size);
    width: var(--mission-size);
    max-width: var(--mission-size);
}

.mission-day {
    position: relative;
    width: 100%;
    max-width: var(--mission-size);
    height: auto;
    min-height: calc(var(--mission-size) - 10px);
    margin: 0 auto;
    border-radius: 20px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    scroll-snap-align: center;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    box-sizing: border-box;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.mission-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.mission-icon-mini {
    width: 48px;           /* Satuan, disamakan */
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 10px;
    margin-bottom: 4px;
    font-size: 2rem;       /* Untuk emoji */
    overflow: hidden;
    box-sizing: border-box;
}
.mission-icon-mini img,
.mission-icon-mini .reward-image-mini {
    width: 100%; 
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

.mission-cell {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: calc(var(--mission-size) - 20px);
}

.mission-day::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mission-day:hover::before,
.mission-day:active::before {
    opacity: 1;
    animation: shine 1s ease-in-out;
}

.mission-day.available {
    border-color: var(--success-color);
    background: rgba(107, 207, 127, 0.25);
    cursor: pointer;
    animation: mission-pulse 2s ease-in-out infinite;
}

.mission-day.available:hover,
.mission-day.available:active {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(107, 207, 127, 0.6);
}

.mission-day.completed {
    border-color: var(--primary-color);
    background: rgba(0, 212, 255, 0.25);
    animation: mission-glow 2s ease-in-out infinite;
    height: auto;
    min-height: calc(var(--mission-size) - 10px);
}

.mission-day.locked {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    cursor: not-allowed;
    opacity: 0.6;
}

.day-number {
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 2px;
    color: inherit;
}

.day-status {
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1;
    opacity: 0.9;
    color: inherit;
    text-align: center;
}

.day-label {
    font-size: var(--font-xs) !important;
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 700 !important;
    text-align: center !important;
    line-height: 1 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

.mission-stamp {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: var(--primary-color);
    animation: stamp-appear 0.5s ease-out;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.reward-status {
    width: 100%;
    max-width: var(--mission-size);
    padding: 6px;
    border-radius: 12px;
    font-size: 8px;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    box-sizing: border-box;
    margin: 0 auto;
}

.reward-status.claimable {
    background: linear-gradient(135deg, #00d4ff, #4ecdc4);
    border: 2px solid rgba(0, 212, 255, 0.6);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.5);
    color: white;
    animation: reward-glow 2s infinite;
}

.reward-status.not-claimable {
    background: linear-gradient(135deg, #ff0d0d, #141414);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    color: #cccccc;
    opacity: 0.7;
    /* ❌ NO ANIMATION - STATIC */
}

.reward-status.skip {
    background: linear-gradient(135deg, #00ff0a, #000000);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    color: #cccccc;
    opacity: 0.7;
    /* ❌ NO ANIMATION - STATIC */
}
.reward-status.expired {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.6);
}

.btn-claim-contact {
    margin-top: 3px;
    padding: 3px 6px;
    border: none;
    border-radius: 6px;
    font-size: 7px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    line-height: 1.2;
}

.btn-claim-contact.active {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-claim-contact.active:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-1px);
}

.btn-claim-contact.disabled {
    background: transparent;
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
}

.btn-claim-contact.skip {
    background: transparent;
    color: rgb(255, 255, 255);
    cursor: not-allowed;
}

.scroll-indicator {
    text-align: center;
    opacity: 0.6;
    flex-shrink: 0;
}

.scroll-text {
    font-size: var(--font-xs);
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    animation: scroll-hint 2s ease-in-out infinite;
}

@keyframes scroll-hint {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

@keyframes mission-pulse {
    0% { box-shadow: 0 0 0 0 rgba(107, 207, 127, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(107, 207, 127, 0); }
    100% { box-shadow: 0 0 0 0 rgba(107, 207, 127, 0); }
}

@keyframes mission-glow {
    0%, 100% { box-shadow: 0 4px 15px rgba(0, 212, 255, 0.5); }
    50% { box-shadow: 0 4px 30px rgba(0, 212, 255, 0.8); }
}

@keyframes stamp-appear {
    0% { transform: translate(-50%, -50%) scale(0) rotate(0deg); }
    50% { transform: translate(-50%, -50%) scale(1.2) rotate(180deg); }
    100% { transform: translate(-50%, -50%) scale(1) rotate(360deg); }
}

@keyframes reward-glow {
    0%, 100% { box-shadow: 0 4px 15px rgba(0, 212, 255, 0.5); }
    50% { box-shadow: 0 4px 25px rgba(0, 212, 255, 0.8); }
}

/* ===== ACTION BUTTONS COMPACT ===== */
.action-container-compact {
    flex-shrink: 0;
    width: 100%;
}

.action-buttons-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    width: 100%;
    flex-shrink: 0;
}

.btn-action-compact {
    background: var(--gradient-success);
    color: white;
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: var(--font-md);
    font-weight: 700;
    box-shadow: 0 8px 30px rgba(107, 207, 127, 0.5);
    width: 100%;
    min-height: 55px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-action-compact::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: transform 0.6s ease;
    transform: translateX(-100%);
}

.btn-action-compact:hover::before,
.btn-action-compact:active::before {
    transform: translateX(100%);
}

.btn-action-compact:hover,
.btn-action-compact:active {
    box-shadow: 0 12px 40px rgba(107, 207, 127, 0.7);
    transform: translateY(-3px);
}

.btn-rewards {
    background: var(--gradient-secondary);
    box-shadow: 0 8px 30px rgba(255, 107, 107, 0.5);
}

.btn-rewards:hover,
.btn-rewards:active {
    box-shadow: 0 12px 40px rgba(255, 107, 107, 0.7);
}

.btn-leaderboard {
    background: var(--gradient-primary);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.5);
}

.btn-leaderboard:hover,
.btn-leaderboard:active {
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.7);
}

/* ===== FLOATING BUTTONS ===== */
.floating-actions {
    position: fixed;
    bottom: var(--spacing-lg);
    right: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    z-index: 1500;
}

.floating-btn {
    width: var(--floating-btn-size);
    height: var(--floating-btn-size);
    border-radius: 50%;
    border: none;
    font-size: var(--font-xl);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    position: relative;
    overflow: hidden;
}

.floating-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: transform 0.6s ease;
    transform: rotate(45deg) translateX(-100%);
}

.floating-btn:hover::before,
.floating-btn:active::before {
    transform: rotate(45deg) translateX(100%);
}

.floating-btn:hover,
.floating-btn:active {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.btn-rewards-float {
    background: var(--gradient-secondary);
}

.btn-leaderboard-float {
    background: var(--gradient-primary);
}

.btn-logout-float {
    background: linear-gradient(135deg, #ff4757, #ff6b6b);
}

.rewards-modal .modal-content {
    width: 95vw;
    max-width: 450px;
    margin: 0 auto;
}

/* ===== MODALS BASE ===== */
.rewards-modal,
.leaderboard-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: var(--spacing-md);
}

.rewards-modal.show,
.leaderboard-modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    cursor: pointer;
}

.modal-content {
    position: relative;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a3e 50%, #2d1b69 100%);
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.8) translateY(50px);
    transition: transform 0.3s ease;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.rewards-modal.show .modal-content,
.leaderboard-modal.show .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-lg) var(--spacing-xl);
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-shrink: 0;
}

.modal-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-family: var(--font-primary);
    font-size: var(--font-xl);
    font-weight: 700;
    color: var(--accent-color);
    margin: 0;
    text-shadow: 0 0 10px rgba(255, 217, 61, 0.3);
}

.modal-icon {
    font-size: 1.4rem;
    animation: icon-pulse 2s ease-in-out infinite;
}

.modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 2rem;
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    min-width: var(--min-touch-size);
    min-height: var(--min-touch-size);
}

.modal-close:hover,
.modal-close:active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: rotate(90deg);
}

.modal-body {
    padding: var(--spacing-lg);
    overflow-y: auto;
    max-height: calc(90vh - 120px);
    -webkit-overflow-scrolling: touch;
}

.leaderboard-modal .modal-content {
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.leaderboard-modal .modal-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.rewards-grid {
    display: flex;
    flex-direction: column;
    gap: 18px; /* ✅ BIGGER GAP */
    max-height: 70vh;
    overflow-y: auto;
    padding: 12px 8px;
    padding-right: 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
    -webkit-overflow-scrolling: touch;
}

/* ✅ BETTER SCROLLBAR */
.rewards-grid::-webkit-scrollbar {
    width: 10px;
}

.rewards-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
}

.rewards-grid::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 6px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

/* ✅ REWARD ITEM - 2 COLUMN GRID */
.reward-item {
    display: grid;
    grid-template-columns: 100px 1fr; /* ✅ KEMBALI 2 KOLOM */
    align-items: center;
    gap: 24px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.12));
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 26px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    min-height: 100px;
    position: relative;
    overflow: hidden;
    margin-bottom: 18px;
}

.reward-day {
    grid-column: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 70px !important;
    height: 70px !important;
    border-radius: 18px !important;
    font-weight: bold !important;
}


.reward-status-text {
    grid-column: 3 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    padding: 8px 12px !important;
    border-radius: 12px !important;
    text-align: center !important;
    min-height: 35px !important;
}

.reward-available .reward-day {
    background: linear-gradient(135deg, #00d4ff 0%, #4ecdc4 100%);
    border: 3px solid rgba(0, 212, 255, 0.7);
    color: white;
    box-shadow: 
        0 8px 24px rgba(0, 212, 255, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    animation: day-pulse 2.5s infinite;
}

.reward-completed .reward-day {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
    border: 3px solid rgba(78, 205, 196, 0.7);
    color: white;
    box-shadow: 
        0 8px 24px rgba(78, 205, 196, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.reward-locked .reward-day {
    background: linear-gradient(135deg, #666666 0%, #444444 100%);
    border: 3px solid rgba(255, 255, 255, 0.3);
    color: #cccccc;
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    opacity: 0.8;
}

.reward-tomorrow .reward-day {
    background: linear-gradient(135deg, #ff9500 0%, #ffc107 100%);
    border: 3px solid rgba(255, 149, 0, 0.7);
    color: white;
    box-shadow: 
        0 8px 20px rgba(255, 149, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    opacity: 0.95;
}

@keyframes day-pulse {
    0%, 100% { 
        box-shadow: 
            0 8px 24px rgba(0, 212, 255, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
        transform: scale(1);
    }
    50% { 
        box-shadow: 
            0 12px 36px rgba(0, 212, 255, 0.8),
            inset 0 1px 0 rgba(255, 255, 255, 0.4);
        transform: scale(1.04);
    }
}

.reward-middle {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    min-width: 0;
    padding: var(--spacing-xs) 0;
}

.reward-icon,
.reward-image {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 17px !important;
}

.reward-icon {
    font-size: 2rem !important;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3)) !important;
}

.reward-image {
    background-size: cover !important;
    background-position: center !important;
}


/* ✅ MOBILE RESPONSIVE - UKURAN TETAP KONSISTEN */
@media (max-width: 480px) {
    .reward-item {
        grid-template-columns: 60px 1fr 90px !important;
        gap: 12px !important;
        padding: 12px !important;
    }
    
    .reward-day {
        width: 50px !important;
        height: 50px !important;
    }
    
    .reward-icon,
    .reward-image {
        width: 40px !important;
        height: 40px !important;
    }
    
    .reward-icon {
        font-size: 1.5rem;
    }
    
    .reward-amount {
        font-size: var(--font-xs);
    }
    
    .reward-status-text {
        font-size: 0.7rem !important;
        padding: 6px 8px !important;
    }
}

@media (max-width: 375px) {
    .reward-item {
        grid-template-columns: 55px 1fr 85px;
        gap: 6px;
        padding: 10px;
        min-height: 75px;
    }
    
    .reward-day {
        width: 45px;       /* ✅ FIXED */
        height: 45px;      /* ✅ FIXED */
        font-size: var(--font-sm);
    }
    
    .reward-icon,
    .reward-image {
        width: 35px !important;
        height: 35px !important;
    }
    
    .reward-icon {
        font-size: 1.3rem;
    }
    
    .reward-amount {
        font-size: 0.7rem;
    }
    
    .reward-status-text {
        width: 80px;
        height: 35px;      /* ✅ FIXED */
        font-size: 0.65rem;
    }
}

@media (max-width: 320px) {
    .reward-item {
        grid-template-columns: 50px 1fr 75px;
        gap: 4px;
        padding: 8px;
        min-height: 70px;
    }
    
    .reward-day {
        width: 40px;       /* ✅ FIXED */
        height: 40px;      /* ✅ FIXED */
        font-size: 0.8rem;
    }
    
    .reward-icon,
    .reward-image {
        width: 30px !important;
        height: 30px !important;
    }
    
    .reward-icon {
        font-size: 1.1rem;
    }
    
    .reward-amount {
        font-size: 0.65rem;
    }
    
    .reward-status-text {
        width: 70px;
        height: 30px;      /* ✅ FIXED */
        font-size: 0.6rem;
    }
}

.reward-visual:hover {
    transform: scale(1.05);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.day-icon {
    font-size: 2rem; /* ✅ SMALLER SIZE */
    text-align: center;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
    width: 45px; /* ✅ SMALLER WIDTH */
}

.day-text {
    font-size: var(--font-md); /* ✅ SMALLER FONT */
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    white-space: nowrap; /* ✅ NO WRAP */
    overflow: hidden; /* ✅ HIDE OVERFLOW */
    text-overflow: ellipsis; /* ✅ ADD DOTS */
}


.day-subtitle {
    font-size: var(--font-sm);
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
}

.reward-item::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;
}

.reward-item:hover::before {
    left: 100%;
}

.reward-item:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 
        0 16px 48px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.6);
}

.reward-item:hover::before,
.reward-item:active::before {
    opacity: 1;
    animation: shine 1s ease-in-out;
}

.reward-item:hover,
.reward-item:active {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 255, 255, 0.3);
}

.reward-item.current {
    border-color: var(--success-color);
    background: rgba(107, 207, 127, 0.25);
    animation: reward-pulse 2s ease-in-out infinite;
}

.reward-item.completed {
    border-color: var(--primary-color);
    background: rgba(0, 212, 255, 0.25);
}

.reward-icon {
    font-size: 2rem;
    line-height: 1;
    text-align: center;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}



.reward-text {
    font-size: var(--font-md);
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.2;
}

.reward-amount-modal {
    font-size: var(--font-lg); /* ✅ SMALLER FONT */
    font-weight: 800;
    color: #ffd93d;
    text-align: center;
    text-shadow: 0 0 8px rgba(255, 217, 61, 0.4);
    min-width: 90px;
    white-space: nowrap; /* ✅ NO WRAP */
    overflow: hidden; /* ✅ HIDE OVERFLOW */
}

.rewards-info {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: var(--spacing-xl);
    text-align: center;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.rewards-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--font-md);
    font-weight: 600;
    line-height: 1.6;
    margin: 0;
}

/* ✅ STATUS - COLUMN 3 */
.reward-status-text {
    grid-column: 3;
    grid-row: 1 / -1;
    font-size: var(--font-xs);
    font-weight: 700;
    padding: var(--spacing-sm);
    border-radius: 15px;
    text-align: center;
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 55px;
}

/* ===== REWARD STATUS COLORS ===== */
.reward-completed {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    border-color: rgba(78, 205, 196, 0.5);
}

.reward-completed .reward-status-text {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: white;
    border: 2px solid rgba(78, 205, 196, 0.6);
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.3);
}

.reward-available {
    background: linear-gradient(135deg, #00d4ff, #4ecdc4);
    border-color: rgba(0, 212, 255, 0.5);
    animation: reward-modal-pulse 2s infinite;
}

.reward-available .reward-status-text {
    background: linear-gradient(135deg, #00d4ff, #4ecdc4);
    color: white;
    border: 2px solid rgba(0, 212, 255, 0.6);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
    animation: status-pulse 2s infinite;
}

.reward-locked {
    background: linear-gradient(135deg, #4a4a4a, #2c2c2c);
    border-color: rgba(255, 255, 255, 0.1);
    opacity: 0.6;
}

.reward-locked .reward-status-text {
    background: linear-gradient(135deg, #666666, #444444);
    color: #cccccc;
    border: 2px solid rgba(255, 255, 255, 0.25);
    opacity: 0.8;
}

@keyframes status-pulse {
    0%, 100% { 
        box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 4px 25px rgba(0, 212, 255, 0.6);
        transform: scale(1.02);
    }
}

.reward-locked .reward-amount-modal {
    color: #888888;
}

/* ===== REWARD MODAL PULSE ANIMATION ===== */
@keyframes reward-modal-pulse {
    0%, 100% { 
        box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
    }
    50% { 
        box-shadow: 0 4px 25px rgba(0, 212, 255, 0.6);
    }
}

@keyframes reward-pulse {
    0% { box-shadow: 0 0 0 0 rgba(107, 207, 127, 0.7); }
    70% { box-shadow: 0 0 0 25px rgba(107, 207, 127, 0); }
    100% { box-shadow: 0 0 0 0 rgba(107, 207, 127, 0); }
}

/* ===== LEADERBOARD MODAL ===== */
.modal-leaderboard-list {
    margin: 0 -8px; /* Extend closer to modal-body edges */
    padding: 0 8px;
    max-height: 65vh;
    overflow-y: auto;
    padding-right: 12px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
    -webkit-overflow-scrolling: touch;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.modal-leaderboard-list::-webkit-scrollbar {
    width: 12px;
}

.modal-leaderboard-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
}

.modal-leaderboard-list::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.modal-leaderboard-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
}

.leaderboard-item {
    display: grid;
    grid-template-columns: 55px minmax(0, 2fr) 95px; /* ✅ GANTI INI */
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-lg) var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    min-height: 85px;
    cursor: default;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.leaderboard-item::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.leaderboard-item:hover::before,
.leaderboard-item:active::before {
    opacity: 1;
    animation: shine 1s ease-in-out;
}

.leaderboard-item:hover,
.leaderboard-item:active {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 255, 255, 0.3);
}

.leaderboard-item:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

.leaderboard-item.rank-1 {
    border-color: #ffd700;
    background: linear-gradient(45deg, rgba(255, 215, 0, 0.25), rgba(255, 215, 0, 0.15));
}

.leaderboard-item.rank-2 {
    border-color: #c0c0c0;
    background: linear-gradient(45deg, rgba(192, 192, 192, 0.25), rgba(192, 192, 192, 0.15));
}

.leaderboard-item.rank-3 {
    border-color: #cd7f32;
    background: linear-gradient(45deg, rgba(205, 127, 50, 0.25), rgba(205, 127, 50, 0.15));
}

.leaderboard-item.completed {
    border-color: var(--success-color);
    background: linear-gradient(45deg, rgba(107, 207, 127, 0.25), rgba(107, 207, 127, 0.15));
}

.leaderboard-item.current-user {
    border-color: var(--accent-color);
    background: linear-gradient(45deg, rgba(255, 217, 61, 0.25), rgba(255, 217, 61, 0.15));
}

/* Title level styles with enhanced effects */
.leaderboard-item.title-level-1 {
    background: linear-gradient(135deg, rgba(139, 115, 85, 0.1), rgba(139, 115, 85, 0.05));
    border: 1px solid rgba(139, 115, 85, 0.3);
}
.leaderboard-item.title-level-2 {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.15), rgba(205, 127, 50, 0.05));
    border: 1px solid rgba(205, 127, 50, 0.4);
}
.leaderboard-item.title-level-3 {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.15), rgba(192, 192, 192, 0.05));
    border: 1px solid rgba(192, 192, 192, 0.4);
}
.leaderboard-item.title-level-4 {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.05));
    border: 1px solid rgba(255, 215, 0, 0.5);
    box-shadow: 0 2px 15px rgba(255, 215, 0, 0.2);
}
.leaderboard-item.title-level-5 {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.2), rgba(255, 107, 53, 0.05));
    border: 1px solid rgba(255, 107, 53, 0.5);
    box-shadow: 0 2px 15px rgba(255, 107, 53, 0.25);
}
.leaderboard-item.title-level-6 {
    background: linear-gradient(135deg, rgba(255, 23, 68, 0.2), rgba(255, 23, 68, 0.05));
    border: 1px solid rgba(255, 23, 68, 0.5);
    box-shadow: 0 2px 20px rgba(255, 23, 68, 0.3);
    animation: master-glow 3s infinite;
}
.leaderboard-item.title-level-7 {
    background: linear-gradient(135deg, rgba(156, 39, 176, 0.25), rgba(156, 39, 176, 0.05));
    border: 1px solid rgba(156, 39, 176, 0.6);
    box-shadow: 0 3px 25px rgba(156, 39, 176, 0.4);
    animation: legend-glow 2.5s infinite;
}
.leaderboard-item.title-level-8 {
    background: linear-gradient(135deg, rgba(63, 81, 181, 0.3), rgba(63, 81, 181, 0.05));
    border: 1px solid rgba(63, 81, 181, 0.7);
    box-shadow: 0 4px 30px rgba(63, 81, 181, 0.5);
    animation: mythic-glow 2s infinite;
}
.leaderboard-item.title-level-9 {
    background: linear-gradient(135deg, rgba(0, 188, 212, 0.35), rgba(0, 188, 212, 0.05));
    border: 2px solid rgba(0, 188, 212, 0.8);
    box-shadow: 0 5px 35px rgba(0, 188, 212, 0.6);
    animation: god-glow 1.5s infinite;
}
.leaderboard-item.title-level-10 {
    background: linear-gradient(135deg, rgba(233, 30, 99, 0.4), rgba(233, 30, 99, 0.1));
    border: 2px solid rgba(233, 30, 99, 0.9);
    box-shadow: 0 6px 40px rgba(233, 30, 99, 0.7);
    animation: immortal-glow 1s infinite;
}

/* GLOW ANIMATIONS FOR HIGH LEVELS */
@keyframes master-glow {
    0%, 100% { box-shadow: 0 2px 20px rgba(255, 23, 68, 0.3); }
    50% { box-shadow: 0 2px 30px rgba(255, 23, 68, 0.5); }
}
@keyframes legend-glow {
    0%, 100% { box-shadow: 0 3px 25px rgba(156, 39, 176, 0.4); }
    50% { box-shadow: 0 3px 40px rgba(156, 39, 176, 0.7); }
}
@keyframes mythic-glow {
    0%, 100% { box-shadow: 0 4px 30px rgba(63, 81, 181, 0.5); }
    50% { box-shadow: 0 4px 50px rgba(63, 81, 181, 0.8); }
}
@keyframes god-glow {
    0%, 100% { box-shadow: 0 5px 35px rgba(0, 188, 212, 0.6); }
    50% { box-shadow: 0 5px 60px rgba(0, 188, 212, 0.9); }
}
@keyframes immortal-glow {
    0%, 100% { box-shadow: 0 6px 40px rgba(233, 30, 99, 0.7); }
    50% { box-shadow: 0 6px 70px rgba(233, 30, 99, 1); }
}

.player-info-mini {
    display: contents; /* This makes the children act as direct grid items */
}

.player-rank {
    font-family: var(--font-primary);
    font-size: var(--font-xxl);
    font-weight: 900;
    color: var(--accent-color);
    text-align: center;
    text-shadow: 0 0 10px rgba(255, 217, 61, 0.4);
    justify-self: center;
}

.player-name {
    font-weight: 700;
    color: white;
    font-size: var(--font-lg);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    line-height: 1.3;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
    /* Allow 2 lines max */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.player-title {
    font-size: var(--font-sm);
    margin-top: var(--spacing-xs);
    opacity: 0.8;
    font-weight: 600;
    
    /* ✅ TAMBAH WORD WRAP RULES: */
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    white-space: normal;
    line-height: 1.3;
    
    /* ✅ ALLOW MULTIPLE LINES: */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Max 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    
    /* ✅ INTELLIGENT BREAKING: */
    word-spacing: 0.1em;
    letter-spacing: 0.02em;
}

.player-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    width: 95px; /* Fixed width */
    flex-shrink: 0;
    justify-self: end;
}

.total-days, 
.streak-completed {
    font-size: var(--font-sm);
    opacity: 0.9;
    padding: 6px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    white-space: nowrap;
    width: 95px; /* Fixed width to prevent movement */
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 600;
    box-sizing: border-box;
}

.you-badge {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    background: var(--gradient-success);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: var(--font-xs);
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(107, 207, 127, 0.4);
    z-index: 2;
}

/* Rank colors with enhanced effects */
.leaderboard-item.rank-1 .player-rank {
    color: #ffd700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
}

.leaderboard-item.rank-2 .player-rank {
    color: #c0c0c0;
    text-shadow: 0 0 15px rgba(192, 192, 192, 0.8);
}

.leaderboard-item.rank-3 .player-rank {
    color: #cd7f32;
    text-shadow: 0 0 15px rgba(205, 127, 50, 0.8);
}

.leaderboard-item.current-user .player-rank {
    color: var(--accent-color);
    text-shadow: 0 0 15px rgba(255, 217, 61, 0.8);
}

/* ===== LOADING STATES ===== */
.leaderboard-loading,
.leaderboard-empty {
    text-align: center;
    padding: var(--spacing-xxl);
    color: rgba(255, 255, 255, 0.8);
}

.loading-spinner-small {
    width: 45px;
    height: 45px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--spacing-lg);
}

.leaderboard-empty::before {
    content: '🎯';
    font-size: 3.5rem;
    display: block;
    margin-bottom: var(--spacing-lg);
}

.leaderboard-loading p,
.leaderboard-empty p {
    font-size: var(--font-md);
    font-weight: 600;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== STATS HIDDEN ===== */
.modal-stats {
    display: none !important;
}

.stat-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    padding: var(--spacing-lg);
    flex: 1;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.stat-number {
    font-family: var(--font-primary);
    font-size: var(--font-xxl);
    font-weight: 900;
    color: var(--primary-color);
    margin-bottom: var(--spacing-xs);
}

.stat-label {
    font-size: var(--font-sm);
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    text-transform: uppercase;
}

/* ===== BUTTONS ===== */
.btn {
    font-family: var(--font-secondary);
    font-weight: 700;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    min-height: var(--min-touch-size);
}

.btn-primary {
    background: var(--gradient-secondary);
    color: white;
    padding: var(--spacing-lg) var(--spacing-xl);
    font-size: var(--font-lg);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.5);
    width: 100%;
    min-height: 60px;
}

.btn:hover,
.btn:active {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.7);
}

.btn:disabled {
    background: rgba(255, 255, 255, 0.2);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-glow {
    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:hover .btn-glow,
.btn:active .btn-glow {
    left: 100%;
}

.btn-text {
    position: relative;
    z-index: 2;
    font-size: var(--font-lg);
    font-weight: 700;
}

/* ===== ALERTS ===== */
.alert {
    position: fixed;
    top: var(--spacing-lg);
    left: var(--spacing-md);
    right: var(--spacing-md);
    padding: var(--spacing-lg);
    border-radius: 20px;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    z-index: 3000;
    transform: translateY(-100px);
    opacity: 0;
    animation: alert-slide-in 0.5s ease-out forwards;
    text-align: center;
    font-weight: 700;
    font-size: var(--font-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.alert-success {
    background: rgba(107, 207, 127, 0.95);
    border: 2px solid var(--success-color);
    color: white;
}

.alert-danger {
    background: rgba(255, 71, 87, 0.95);
    border: 2px solid var(--danger-color);
    color: white;
}

.alert-warning {
    background: rgba(255, 149, 0, 0.95);
    border: 2px solid var(--warning-color);
    color: white;
}

@keyframes alert-slide-in {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ===== LOADING OVERLAY ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 2500;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: var(--spacing-lg);
}

.loading-overlay p {
    font-size: var(--font-lg);
    font-weight: 700;
    color: white;
}

/* ===== MOBILE-SPECIFIC OPTIMIZATIONS ===== */

/* Small phones */
@media (max-width: 480px) {
    /* Header adjustments */
    .login-section .app-header,
    .game-section .app-header {
        padding: var(--spacing-xs) 0 var(--spacing-sm) 0;
    }
    
    .rewards-modal .modal-content {
        width: 98vw;
        max-width: 380px; /* ✅ SMALLER ON MOBILE */
    }
    
    .reward-item {
        grid-template-columns: 50px 1fr 100px; /* ✅ SMALLER COLUMNS */
        gap: var(--spacing-xs);
        padding: var(--spacing-sm);
        min-height: 75px;
    }
    
    .day-icon {
        font-size: 1.8rem;
        width: 40px;
    }
    
    .day-text {
        font-size: var(--font-sm);
    }
    
    .reward-amount-modal {
        font-size: var(--font-md);
        min-width: 80px;
    }
    
    .reward-status-text {
        font-size: 0.7rem;
        padding: 4px 8px;
        min-width: 100px;
    }

    .main-title {
        font-size: var(--font-lg);
        margin-bottom: 2px;
    }
    
    .subtitle {
        font-size: var(--font-sm);
    }
    
    /* Player info mobile layout */
    .player-info-compact {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-sm);
        padding: var(--spacing-sm);
    }
    
    .player-details {
        width: 100%;
        align-items: center;
    }
    
    .welcome-message {
        text-align: center;
    }
    
    .player-name-display {
        font-size: var(--font-md);
        text-align: center;
    }
    
    .player-info-compact .player-stats {
        gap: var(--spacing-sm);
        flex-wrap: wrap;
    }
    
    .player-info-compact .stat-item {
        padding: var(--spacing-xs) var(--spacing-sm);
        min-width: 90px;
        flex: 1;
    }
    
    .player-info-compact .stat-icon {
        font-size: var(--font-sm);
        min-width: 18px;
    }
    
    .player-info-compact .stat-value {
        font-size: 0.7rem;
    }
    
    .avatar {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    
    .avatar-ring {
        width: 51px;
        height: 51px;
    }
    
    .mission-container-compact {
        padding: var(--spacing-sm);
    }
    
    .mission-title {
        font-size: var(--font-md);
        margin-bottom: var(--spacing-sm);
    }
    
    /* Modal mobile optimizations */
    .leaderboard-modal .modal-content {
        max-width: 85vw;
        width: 85vw;
        max-height: 80vh;
        margin: 0 auto;
    }
    
    .modal-header {
        padding: var(--spacing-md) var(--spacing-lg);
    }
    
    .modal-title {
        font-size: var(--font-lg);
    }
    
    .modal-close {
        width: 40px;
        height: 40px;
        font-size: 1.6rem;
    }
    
    .modal-icon {
        font-size: 1.3rem;
    }
    
    /* ✅ NEW LEADERBOARD FIXES - INTEGRATED */
    .leaderboard-item {
        grid-template-columns: 45px 1fr 85px; /* Smaller on mobile */
        padding: var(--spacing-md) var(--spacing-sm);
        gap: var(--spacing-xs);
        min-height: 75px;
        margin-bottom: var(--spacing-sm);
    }
    
    .player-rank {
        font-size: var(--font-xl);
        min-width: 45px;
    }
    
    .player-name {
        font-size: var(--font-md);
    }
    
    .player-title {
        font-size: 0.55rem;
        margin-top: 1px;
        /* ✅ ADD WORD WRAP RULES: */
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        white-space: normal;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        word-spacing: 0.1em;
        letter-spacing: 0.02em;
    }
    
    /* ✅ PLAYER STATS FIXES */
    .player-stats {
        width: 85px;
    }
    
    .total-days, 
    .streak-completed {
        font-size: var(--font-xs);
        padding: 4px 6px;
        width: 85px;
        min-width: 70px;
    }
    
    .you-badge {
        font-size: 0.65rem;
        padding: 2px 6px;
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .login-section .app-header,
    .game-section .app-header {
        padding: 4px 0 var(--spacing-xs) 0;
    }
    
    .main-title {
        font-size: var(--font-md);
        margin-bottom: 0;
    }

    .reward-item {
        gap: var(--spacing-xs);
    }
    
    .day-icon {
        font-size: 1.8rem;
        width: 45px;
    }
    
    .reward-amount-modal {
        min-width: 90px;
    }
    
    .reward-status-text {
        font-size: 0.7rem;
        padding: 4px 8px;
        min-width: 100px;
    }
    
    .subtitle {
        font-size: var(--font-xs);
    }
    
    .game-section {
        gap: var(--spacing-xs);
    }
    
    .player-info-compact {
        padding: var(--spacing-xs);
    }
    
    .welcome-text {
        font-size: var(--font-sm);
    }
    
    .player-name-display {
        font-size: var(--font-sm);
    }
    
    .mission-title {
        font-size: var(--font-sm);
    }
    
    .day-number {
        font-size: 1.3rem;
    }
    
    .day-label {
        font-size: 0.7rem;
    }
    
    .btn-action-compact {
        min-height: 45px;
        font-size: var(--font-sm);
    }
    
    .player-info-compact .player-stats {
        gap: var(--spacing-xs);
        align-items: stretch;
    }
    
    .player-info-compact .stat-item {
        min-width: unset;
        width: 100%;
    }
    
    /* Modal adjustments for very small screens */
    .leaderboard-modal .modal-content {
        max-width: 90vw;
        width: 90vw;
    }
    
    /* ✅ NEW LEADERBOARD FIXES - INTEGRATED */
    .leaderboard-item {
        grid-template-columns: 40px 1fr 75px; /* Even smaller */
        padding: var(--spacing-sm) var(--spacing-xs);
        min-height: 70px;
        gap: var(--spacing-xs);
    }
    
    .player-rank {
        font-size: var(--font-lg);
        min-width: 40px;
    }
    
    .player-name {
        font-size: var(--font-sm);
        margin-left: var(--spacing-sm);
    }
    
    /* ✅ PLAYER STATS FIXES */
    .player-stats {
        width: 75px;
    }
    
    .total-days, 
    .streak-completed {
        font-size: 0.7rem;
        padding: 2px 4px;
        width: 75px;
        min-width: 60px;
    }
}

/* Ultra-small screens */
@media (max-width: 320px) {
    .player-name-display {
        font-size: var(--font-sm);
        line-height: 1.3;
    }
    
    .player-stats {
        flex-direction: column;
        gap: var(--spacing-xs);
    }
    
    .stat-item {
        width: 100%;
        justify-content: center;
    }
}

/* Landscape mobile optimization */
@media (max-height: 500px) and (orientation: landscape) {
    .login-section .app-header,
    .game-section .app-header {
        padding: 2px 0 var(--spacing-xs) 0;
    }
    
    .main-title {
        font-size: var(--font-md);
        margin-bottom: 0;
    }
    
    .subtitle {
        display: none;
    }
    
    .game-section {
        gap: var(--spacing-xs);
    }
    
    .player-info-compact {
        flex-direction: row;
        padding: var(--spacing-xs);
    }
    
    .welcome-text {
        font-size: var(--font-sm);
    }
    
    .player-name-display {
        font-size: var(--font-sm);
    }
    
    .mission-title {
        font-size: var(--font-sm);
        margin-bottom: var(--spacing-xs);
    }
}

/* ===== 🚀 100% PERFECTION ADDITIONS ===== */

/* ===== iOS-SPECIFIC OPTIMIZATIONS ===== */
@supports (-webkit-touch-callout: none) {
    /* iOS Safari specific fixes */
    .app-container {
        height: -webkit-fill-available;
    }
    
    /* Fix iOS keyboard issues */
    .input-container input:focus {
        transform: translateY(-2px);
        -webkit-transform: translateY(-2px);
        -webkit-user-select: text;
    }
    
    /* iOS modal backdrop fix */
    .modal-backdrop {
        -webkit-backdrop-filter: blur(15px);
        backdrop-filter: blur(15px);
    }
    
    /* iOS scroll momentum */
    .mission-grid-horizontal,
    .modal-leaderboard-list,
    .modal-body {
        -webkit-overflow-scrolling: touch;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}

/* Prevent iOS zoom on input focus */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    .input-container input {
        font-size: max(16px, var(--font-lg)); /* Prevent zoom while maintaining design */
    }
    
    @media (max-width: 480px) {
        .input-container input {
            font-size: 16px; /* Force 16px on small iOS devices */
        }
    }
}

/* ===== ADVANCED TOUCH OPTIMIZATIONS ===== */
/* Better touch handling for all interactive elements */
.touchable,
.mission-day,
.floating-btn,
.leaderboard-item,
.btn,
.modal-close,
.reward-item,
.login-card,
.player-info-compact {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation; /* Optimize touch response */
}

/* Allow text selection for input fields */
.input-container input,
.player-name-display,
.modal-body p {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Improve scrolling performance */
.mission-grid-horizontal,
.modal-leaderboard-list,
.modal-body {
    -webkit-overflow-scrolling: touch;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: scroll-position;
    contain: layout style paint;
}

/* ===== MISSING ANIMATION KEYFRAMES ===== */
/* Additional mission specific animations */
@keyframes mission-available-pulse {
    0% { 
        box-shadow: 0 0 0 0 rgba(107, 207, 127, 0.7);
        transform: scale(1);
        border-color: var(--success-color);
    }
    70% { 
        box-shadow: 0 0 0 15px rgba(107, 207, 127, 0);
        transform: scale(1.05);
        border-color: rgba(107, 207, 127, 0.8);
    }
    100% { 
        box-shadow: 0 0 0 0 rgba(107, 207, 127, 0);
        transform: scale(1);
        border-color: var(--success-color);
    }
}

/* Daily streak glow effect */
@keyframes daily-streak-glow {
    0%, 100% { 
        border-color: var(--success-color);
        box-shadow: 0 0 20px rgba(107, 207, 127, 0.3);
    }
    50% { 
        border-color: var(--accent-color);
        box-shadow: 0 0 30px rgba(255, 217, 61, 0.5);
    }
}

/* Enhanced floating button animation */
@keyframes floating-bounce {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Login card entrance animation */
@keyframes card-entrance {
    0% { 
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    100% { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Title text shimmer effect */
@keyframes title-shimmer {
    0% { 
        background-position: -200% 0;
    }
    100% { 
        background-position: 200% 0;
    }
}

/* ===== ENHANCED PERFORMANCE OPTIMIZATIONS ===== */
/* GPU acceleration for smooth animations */
.bg-stars,
.bg-nebula,
.bg-grid,
.mission-day,
.floating-btn,
.modal-content,
.login-card,
.player-info-compact,
.mission-container-compact {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000px;
    perspective: 1000px;
    will-change: transform;
}

/* Optimize specific animations for performance */
.title-text,
.player-name-display {
    will-change: background-position;
}

.floating-btn:hover,
.mission-day:hover,
.btn:hover {
    will-change: transform, box-shadow;
}

/* Memory optimization for mobile */
@media (max-width: 768px) {
    .bg-nebula {
        background-size: 150% 150%; /* Reduce complexity on mobile */
        animation-duration: 30s; /* Slower animation for better performance */
    }
    
    .bg-stars {
        animation-duration: 6s; /* Optimize star animation */
    }
    
    /* Reduce floating button bounce on mobile */
    .floating-btn {
        animation: floating-bounce 4s ease-in-out infinite;
    }
}

/* ===== ADVANCED ACCESSIBILITY OPTIMIZATIONS ===== */
/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0099ff;
        --secondary-color: #ff3333;
        --accent-color: #ffcc00;
        --success-color: #00cc66;
    }
    
    .mission-day,
    .login-card,
    .player-info-compact {
        border-width: 3px;
    }
    
    .leaderboard-item {
        border-width: 2px;
    }
}

/* Reduced motion optimizations */
@media (prefers-reduced-motion: reduce) {
    /* Disable all animations for accessibility */
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    /* Keep essential hover effects but remove animations */
    .mission-day:hover,
    .btn:hover,
    .floating-btn:hover {
        animation: none;
        transform: translateY(-2px);
    }
    
    /* Disable background animations */
    .bg-stars,
    .bg-nebula {
        animation: none;
    }
}

/* ===== DARK MODE & THEME VARIATIONS ===== */
@media (prefers-color-scheme: light) {
    /* Optional light mode adjustments */
    .bg-container {
        opacity: 0.7; /* Reduce background intensity in light mode */
    }
}

/* ===== ENHANCED LOADING STATES ===== */
/* Skeleton loading for better UX */
.skeleton {
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.1) 25%, 
        rgba(255, 255, 255, 0.2) 50%, 
        rgba(255, 255, 255, 0.1) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Loading state for mission container */
.mission-container-compact.loading .mission-grid-horizontal {
    opacity: 0.6;
    pointer-events: none;
}

.mission-container-compact.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
}

/* ===== ENHANCED MODAL OPTIMIZATIONS ===== */
/* Better modal backdrop click handling */
.modal-backdrop {
    -webkit-tap-highlight-color: transparent;
    touch-action: none;
}

/* Modal content scroll optimizations */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ===== ENHANCED INPUT OPTIMIZATIONS ===== */
/* Better autocomplete styling */
.input-container input:-webkit-autofill,
.input-container input:-webkit-autofill:hover,
.input-container input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.15) inset;
    -webkit-text-fill-color: white;
    border-color: var(--primary-color);
}

/* Input focus improvements */
.input-container input:focus {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* ===== ENHANCED MISSION SYSTEM ===== */
/* Today's mission special highlighting */
.mission-day.today {
    border-color: var(--accent-color);
    background: rgba(255, 217, 61, 0.2);
    animation: today-glow 3s ease-in-out infinite;
    position: relative;
}

.mission-day.today::after {
    content: "TODAY";
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-color);
    color: #000;
    font-size: 0.6rem;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 8px;
    letter-spacing: 0.5px;
}

@keyframes today-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 217, 61, 0.4); }
    50% { box-shadow: 0 0 35px rgba(255, 217, 61, 0.7); }
}

/* ===== ENHANCED TYPOGRAPHY ===== */
/* Better font rendering */
body,
.main-title,
.modal-title,
.player-name-display {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ===== PRINT STYLES (BONUS) ===== */
@media print {
    .bg-container,
    .floating-actions,
    .modal-backdrop {
        display: none !important;
    }
    
    .app-container {
        background: white;
        color: black;
    }
    
    .login-card,
    .player-info-compact,
    .mission-container-compact {
        border: 2px solid #ccc;
        background: white;
    }
}

/* ===== FINAL PERFORMANCE TWEAKS ===== */
/* Optimize font loading */
@font-face {
    font-family: 'Orbitron';
    font-display: swap; /* Better loading performance */
}

@font-face {
    font-family: 'Rajdhani';
    font-display: swap;
}

/* Container query support (future-proofing) */
@supports (container-type: inline-size) {
    .app-container {
        container-type: inline-size;
    }
    
    @container (max-width: 480px) {
        .main-title {
            font-size: var(--font-lg);
        }
    }
}

/* ===== EDGE CASE FIXES ===== */
/* Fix for some Android browsers */
@media screen and (max-width: 767px) {
    .app-container {
        min-height: 100vh;
    }
}

/* Fix for Firefox on mobile */
@-moz-document url-prefix() {
    .mission-grid-horizontal {
        scrollbar-width: none;
    }
}

/* ===== ENHANCED SECURITY ===== */
/* Prevent content selection on sensitive elements */
.player-stats .stat-value,
.reward-amount,
.you-badge {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* ===== 🎯 100% PERFECTION ACHIEVED! ===== */
/* Add this class to body when everything is loaded for enhanced entrance */
.app-loaded .login-card,
.app-loaded .game-section > * {
    animation: card-entrance 0.6s ease-out;
}

.app-loaded .floating-btn {
    animation: floating-bounce 3s ease-in-out infinite;
}

/* Success indicator for perfect loading */
.perfection-indicator {
    position: fixed;
    top: 10px;
    right: 10px;
    background: var(--gradient-success);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 700;
    z-index: 9999;
    opacity: 0;
    animation: perfection-show 2s ease-in-out;
}

@keyframes perfection-show {
    0%, 90% { opacity: 0; transform: translateY(-20px); }
    10%, 80% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-20px); }
}

/* ===== 🚀 CONGRATULATIONS - 100% PERFECT CSS COMPLETE! ===== */


/* ===== ADVANCED MOBILE RESPONSIVE FOR REWARDS MODAL ===== */

/* Large Mobile - iPhone 14 Plus, etc (430px+) */
@media (max-width: 430px) and (min-width: 415px) {
    .rewards-modal .reward-item {
        grid-template-columns: 1fr 90px 110px;
        gap: 10px;
        padding: var(--spacing-md) var(--spacing-sm);
    }
    
    .rewards-modal .day-text {
        font-size: 1rem;
    }
}

/* iPhone 14, 13, 12 Pro (390-414px) */
@media (max-width: 414px) and (min-width: 391px) {
    .rewards-modal .reward-item {
        grid-template-columns: 1fr 80px 100px; /* ✅ SMALLER */
        gap: 8px;
        padding: var(--spacing-sm) 10px;
    }
    
    .rewards-modal .day-text {
        font-size: 0.85rem; /* ✅ SMALLER FONT */
        font-weight: 600;
    }
    
    .rewards-modal .reward-amount-modal {
        font-size: 0.9rem;
        min-width: 80px;
    }
    
    .rewards-modal .reward-status-text {
        font-size: 0.7rem;
        padding: 4px 8px;
        min-width: 100px;
    }
}

/* iPhone 12 Pro, 13 mini (390px) - CRITICAL FIX */
@media (max-width: 390px) and (min-width: 376px) {
    .rewards-modal .modal-content {
        max-width: 370px; /* ✅ TIGHTER */
    }
    
    .rewards-modal .reward-item {
        grid-template-columns: 1fr 75px 95px; /* ✅ EVEN SMALLER */
        gap: 6px;
        padding: 10px 8px;
        min-height: 65px;
    }
    
    .rewards-modal .day-icon {
        font-size: 1.7rem;
        width: 38px;
    }
    
    .rewards-modal .day-text {
        font-size: 0.8rem; /* ✅ MUCH SMALLER */
        font-weight: 600;
        letter-spacing: -0.5px; /* ✅ TIGHTER LETTERS */
    }
    
    .rewards-modal .reward-amount-modal {
        font-size: 0.85rem;
        min-width: 75px;
        font-weight: 700;
    }
    
    .rewards-modal .reward-status-text {
        font-size: 0.65rem;
        padding: 4px 6px;
        min-width: 95px;
        font-weight: 600;
    }
}

/* iPhone SE, 8, 7 (375px) */
@media (max-width: 375px) and (min-width: 361px) {
    .rewards-modal .modal-content {
        max-width: 355px;
    }
    
    .rewards-modal .reward-item {
        grid-template-columns: 1fr 70px 90px;
        gap: 5px;
        padding: 8px 6px;
        min-height: 60px;
    }
    
    .rewards-modal .day-icon {
        font-size: 1.6rem;
        width: 35px;
    }
    
    .rewards-modal .day-text {
        font-size: 0.75rem; /* ✅ SMALLER */
        font-weight: 600;
        letter-spacing: -0.3px;
    }
    
    .rewards-modal .reward-amount-modal {
        font-size: 0.8rem;
        min-width: 70px;
    }
    
    .rewards-modal .reward-status-text {
        font-size: 0.6rem;
        padding: 3px 5px;
        min-width: 90px;
    }
}

/* Small Devices (360px and below) */
@media (max-width: 360px) and (min-width: 321px) {
    .rewards-modal .modal-content {
        max-width: 340px;
    }
    
    .rewards-modal .reward-item {
        grid-template-columns: 1fr 65px 85px;
        gap: 4px;
        padding: 6px 4px;
        min-height: 55px;
    }
    
    .rewards-modal .day-icon {
        font-size: 1.4rem;
        width: 32px;
    }
    
    .rewards-modal .day-text {
        font-size: 0.7rem;
        letter-spacing: -0.2px;
    }
    
    .rewards-modal .reward-amount-modal {
        font-size: 0.75rem;
        min-width: 65px;
    }
    
    .rewards-modal .reward-status-text {
        font-size: 0.55rem;
        padding: 2px 4px;
        min-width: 85px;
    }
}

/* Ultra Small (320px and below) */
@media (max-width: 320px) {
    .rewards-modal .modal-content {
        max-width: 310px;
    }
    
    .rewards-modal .reward-item {
        grid-template-columns: 1fr 60px 80px;
        gap: 3px;
        padding: 5px 3px;
        min-height: 50px;
    }
    
    .rewards-modal .day-icon {
        font-size: 1.2rem;
        width: 28px;
    }
    
    .rewards-modal .day-text {
        font-size: 0.65rem;
        letter-spacing: -0.1px;
    }
    
    .rewards-modal .reward-amount-modal {
        font-size: 0.7rem;
        min-width: 60px;
    }
    
    .rewards-modal .reward-status-text {
        font-size: 0.5rem;
        padding: 2px 3px;
        min-width: 80px;
    }
}

/* Mobile First - All Small Screens */
@media (max-width: 480px) {
    .rewards-modal .modal-content {
        width: 96vw;
        max-width: min(95vw, 400px); /* ✅ FLEXIBLE WIDTH */
        margin: 0 auto;
    }
    
    .rewards-modal .reward-item {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(70px, auto) minmax(90px, auto); /* ✅ FLEXIBLE COLUMNS */
        gap: clamp(4px, 2vw, 10px); /* ✅ FLEXIBLE GAP */
        padding: clamp(8px, 2.5vw, 12px) clamp(6px, 2vw, 10px); /* ✅ FLEXIBLE PADDING */
        min-height: clamp(55px, 15vw, 70px); /* ✅ FLEXIBLE HEIGHT */
    }
    
    .rewards-modal .day-icon {
        font-size: clamp(1.4rem, 4vw, 2rem); /* ✅ FLEXIBLE FONT */
        width: clamp(30px, 8vw, 40px); /* ✅ FLEXIBLE WIDTH */
    }
    
    .rewards-modal .day-text {
        font-size: clamp(0.7rem, 2.2vw, 0.9rem); /* ✅ SCALES WITH SCREEN */
        font-weight: 600;
        letter-spacing: -0.3px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
    }
    
    .rewards-modal .reward-amount-modal {
        font-size: clamp(0.75rem, 2.3vw, 0.95rem); /* ✅ FLEXIBLE */
        min-width: clamp(70px, 18vw, 85px);
        font-weight: 700;
    }
    
    .rewards-modal .reward-status-text {
        font-size: clamp(0.55rem, 1.8vw, 0.75rem); /* ✅ FLEXIBLE */
        padding: clamp(3px, 1vw, 6px) clamp(5px, 2vw, 10px);
        min-width: clamp(85px, 22vw, 105px);
        font-weight: 600;
    }

    .reward-day {
        font-size: var(--font-md);
        padding: var(--spacing-xs);
        min-height: 45px;
    }
    
    .reward-visual {
        width: 40px;
        height: 40px;
    }
    
    .reward-icon {
        font-size: 1.5rem;
    }
    
    .reward-amount {
        font-size: var(--font-xs);
    }
    
    .reward-status-text {
        font-size: 0.7rem;
        min-width: 100px;
        min-height: 45px;
        padding: var(--spacing-xs);
    }
}

/* Larger Mobile & Tablet */
@media (min-width: 481px) {
    .rewards-modal .reward-item {
        grid-template-columns: 1fr 90px 110px;
        gap: var(--spacing-sm);
        padding: var(--spacing-md) var(--spacing-sm);
    }
    
    .rewards-modal .day-text {
        font-size: var(--font-md);
    }
}

/* ===== ULTRA SMALL DEVICES - iPhone 4, Old Android (320px and below) ===== */
@media (max-width: 320px) {
    .rewards-modal .modal-content {
        width: 98vw;
        max-width: 310px; /* ✅ TIGHTER FOR TINY SCREENS */
        margin: 0 auto;
        border-radius: 20px; /* ✅ SMALLER RADIUS */
    }
    
    .rewards-modal .modal-header {
        padding: var(--spacing-sm) var(--spacing-md); /* ✅ SMALLER PADDING */
    }
    
    .rewards-modal .modal-header h2 {
        font-size: var(--font-lg); /* ✅ SMALLER TITLE */
    }
    
    .rewards-modal .modal-body {
        padding: var(--spacing-sm); /* ✅ TIGHTER PADDING */
    }
    
    .rewards-modal .rewards-grid {
        gap: 8px; /* ✅ SMALLER GAP BETWEEN ITEMS */
        padding: 0 2px;
        max-height: 50vh; /* ✅ SMALLER HEIGHT */
    }
    
    .rewards-modal .reward-item {
        grid-template-columns: minmax(0, 1fr) minmax(55px, auto) minmax(75px, auto); /* ✅ SUPER TIGHT */
        gap: 4px;
        padding: 6px 4px; /* ✅ MINIMAL PADDING */
        min-height: 45px; /* ✅ COMPACT HEIGHT */
        border-radius: 12px; /* ✅ SMALLER RADIUS */
        margin-bottom: 4px;
    }
    
    .rewards-modal .reward-day {
        gap: 4px;
        min-width: 0;
    }
    
    .rewards-modal .day-icon {
        font-size: 1.2rem; /* ✅ SMALLER ICON */
        width: 25px; /* ✅ COMPACT WIDTH */
        flex-shrink: 0;
    }
    
    .rewards-modal .day-text {
        font-size: 0.6rem; /* ✅ TINY BUT READABLE */
        font-weight: 600;
        letter-spacing: -0.2px;
        line-height: 1.1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
    }
    
    .rewards-modal .reward-amount-modal {
        font-size: 0.65rem; /* ✅ TINY FONT */
        min-width: 55px;
        font-weight: 700;
        white-space: nowrap;
    }
    
    .rewards-modal .reward-status-text {
        font-size: 0.45rem; /* ✅ VERY TINY BUT READABLE */
        padding: 2px 4px;
        min-width: 75px;
        font-weight: 600;
        border-radius: 10px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* ✅ MAKE SCROLLBAR EVEN THINNER */
    .rewards-modal .rewards-grid::-webkit-scrollbar {
        width: 2px;
    }
    
    .rewards-modal .rewards-grid::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 1px;
    }
    
    .rewards-modal .rewards-grid::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 1px;
    }
    
    /* ✅ BOTTOM TEXT AREA */
    .rewards-modal .rewards-info {
        padding: var(--spacing-sm);
    }
    
    .rewards-modal .rewards-description {
        font-size: 0.6rem; /* ✅ SMALLER DESCRIPTION */
        line-height: 1.3;
    }
}

/* ===== EVEN SMALLER - 280px (Very Old Devices) ===== */
@media (max-width: 280px) {
    .rewards-modal .modal-content {
        max-width: 270px;
    }
    
    .rewards-modal .reward-item {
        grid-template-columns: minmax(0, 1fr) 50px 70px; /* ✅ ULTRA COMPACT */
        gap: 2px;
        padding: 4px 2px;
        min-height: 40px;
    }
    
    .rewards-modal .day-icon {
        font-size: 1rem;
        width: 20px;
    }
    
    .rewards-modal .day-text {
        font-size: 0.55rem;
    }
    
    .rewards-modal .reward-amount-modal {
        font-size: 0.6rem;
        min-width: 50px;
    }
    
    .rewards-modal .reward-status-text {
        font-size: 0.4rem;
        min-width: 70px;
        padding: 1px 3px;
    }
}

/* ===== LEADERBOARD MOBILE RESPONSIVE - COMPLETE VERSION ===== */

/* Large Mobile - iPhone 14 Plus (415px+) */
@media (max-width: 430px) and (min-width: 415px) {
    .leaderboard-item {
        grid-template-columns: 50px minmax(0, 2fr) 90px;
        padding: var(--spacing-md) var(--spacing-sm);
        gap: var(--spacing-sm);
        min-height: 75px;
        align-items: center;
    }
    
    .player-rank {
        font-size: var(--font-xl);
        align-self: center;
    }
    
    .player-name {
        font-size: var(--font-md);
        line-height: 1.2;
        font-weight: 600;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        word-break: break-word;
        margin-bottom: 2px;
    }
    
    .player-title {
        font-size: 0.55rem;
        margin-top: 1px;
        /* ✅ ADD WORD WRAP RULES: */
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        white-space: normal;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        word-spacing: 0.1em;
        letter-spacing: 0.02em;
    }
    
    .player-stats {
        width: 90px;
        align-self: center;
    }
    
    .total-days, 
    .streak-completed {
        font-size: 0.7rem;
        padding: 3px 6px;
        width: 90px;
    }
}

/* iPhone 14, 13, 12 Pro (391-414px) */
@media (max-width: 414px) and (min-width: 391px) {
    .leaderboard-item {
        grid-template-columns: 45px minmax(0, 2fr) 85px;
        padding: var(--spacing-sm) 10px;
        gap: 8px;
        min-height: 75px;
        align-items: center;
    }
    
    .player-rank {
        font-size: var(--font-xl);
        min-width: 45px;
        align-self: center;
    }
    
    .player-name {
        font-size: 0.9rem;
        font-weight: 600;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        word-break: break-word;
        line-height: 1.2;
        margin-bottom: 2px;
    }
    
    .player-title {
        font-size: 0.55rem;
        margin-top: 1px;
        /* ✅ ADD WORD WRAP RULES: */
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        white-space: normal;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        word-spacing: 0.1em;
        letter-spacing: 0.02em;
    }
    
    .player-stats {
        width: 85px;
        align-self: center;
    }
    
    .total-days, 
    .streak-completed {
        font-size: 0.7rem;
        padding: 3px 6px;
        width: 85px;
    }
}

/* iPhone 12 Pro, 13 mini (376-390px) */
@media (max-width: 390px) and (min-width: 376px) {
    .leaderboard-modal .modal-content {
        max-width: 370px;
    }
    
    .leaderboard-item {
        grid-template-columns: 40px minmax(0, 2fr) 80px;
        padding: var(--spacing-sm) 8px;
        gap: 6px;
        min-height: 75px;
        margin-bottom: var(--spacing-sm);
        align-items: center;
    }
    
    .player-rank {
        font-size: var(--font-lg);
        min-width: 40px;
        align-self: center;
    }
    
    .player-name {
        font-size: 0.85rem;
        font-weight: 600;
        letter-spacing: -0.3px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        word-break: break-word;
        line-height: 1.2;
        margin-bottom: 2px;
    }
    
    .player-title {
        font-size: 0.55rem;
        margin-top: 1px;
        /* ✅ ADD WORD WRAP RULES: */
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        white-space: normal;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        word-spacing: 0.1em;
        letter-spacing: 0.02em;
    }
    
    .player-stats {
        width: 80px;
        align-self: center;
    }
    
    .total-days, 
    .streak-completed {
        font-size: 0.65rem;
        padding: 2px 5px;
        width: 80px;
        min-width: 65px;
    }
}

/* iPhone SE (361-375px) - MAIN TARGET */
@media (max-width: 375px) and (min-width: 361px) {
    .leaderboard-modal .modal-content {
        max-width: 355px;
    }
    
    .leaderboard-item {
        grid-template-columns: 38px minmax(0, 2fr) 75px;
        padding: 10px 6px;
        gap: 5px;
        min-height: 80px;
        margin-bottom: 10px;
        align-items: center;
    }
    
    .player-rank {
        font-size: var(--font-md);
        min-width: 38px;
        font-weight: 800;
        align-self: center;
    }
    
    .player-name {
        font-size: 0.8rem;
        font-weight: 600;
        letter-spacing: -0.2px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        word-break: break-word;
        line-height: 1.3;
        margin-bottom: 2px;
    }
    
    .player-title {
        font-size: 0.55rem;
        margin-top: 1px;
        /* ✅ ADD WORD WRAP RULES: */
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        white-space: normal;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        word-spacing: 0.1em;
        letter-spacing: 0.02em;
    }
    
    .player-stats {
        width: 75px;
        gap: 2px;
        align-self: center;
    }
    
    .total-days, 
    .streak-completed {
        font-size: 0.6rem;
        padding: 2px 4px;
        width: 75px;
        min-width: 60px;
        border-radius: 8px;
    }
}

/* Small devices (321-360px) */
@media (max-width: 360px) and (min-width: 321px) {
    .leaderboard-modal .modal-content {
        max-width: 340px;
    }
    
    .leaderboard-item {
        grid-template-columns: 35px minmax(0, 2fr) 70px;
        padding: 8px 5px;
        gap: 4px;
        min-height: 75px;
        margin-bottom: 8px;
        align-items: center;
    }
    
    .player-rank {
        font-size: var(--font-sm);
        min-width: 35px;
        font-weight: 800;
        align-self: center;
    }
    
    .player-name {
        font-size: 0.75rem;
        letter-spacing: -0.1px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        word-break: break-word;
        line-height: 1.25;
        margin-bottom: 2px;
    }
    
    .player-title {
        font-size: 0.55rem;
        margin-top: 1px;
        /* ✅ ADD WORD WRAP RULES: */
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        white-space: normal;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        word-spacing: 0.1em;
        letter-spacing: 0.02em;
    }
    
    .player-stats {
        width: 70px;
        gap: 1px;
        align-self: center;
    }
    
    .total-days, 
    .streak-completed {
        font-size: 0.55rem;
        padding: 1px 3px;
        width: 70px;
        min-width: 55px;
    }
}

/* iPhone 4 & Ultra Small (320px and below) */
@media (max-width: 320px) {
    .leaderboard-modal .modal-content {
        max-width: 310px;
    }
    
    .leaderboard-item {
        grid-template-columns: 32px minmax(0, 2fr) 65px;
        padding: 6px 4px;
        gap: 3px;
        min-height: 75px;
        margin-bottom: 6px;
        align-items: center;
    }
    
    .player-rank {
        font-size: 0.8rem;
        min-width: 32px;
        font-weight: 800;
        align-self: center;
    }
    
    .player-name {
        font-size: 0.7rem;
        letter-spacing: -0.1px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        word-break: break-word;
        line-height: 1.25;
        margin-bottom: 2px;
    }
    
    .player-title {
        font-size: 0.55rem;
        margin-top: 1px;
        /* ✅ ADD WORD WRAP RULES: */
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        white-space: normal;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        word-spacing: 0.1em;
        letter-spacing: 0.02em;
    }
    
    .player-stats {
        width: 65px;
        gap: 1px;
        align-self: center;
    }
    
    .total-days, 
    .streak-completed {
        font-size: 0.5rem;
        padding: 1px 2px;
        width: 65px;
        min-width: 50px;
    }
    
    .you-badge {
        font-size: 0.5rem;
        padding: 1px 4px;
    }
}

.mission-day.tomorrow {
    border-color: rgba(255, 149, 0, 0.5);
    background: rgba(255, 149, 0, 0.2);
    opacity: 0.8;
}

.mission-day.tomorrow:hover {
    transform: none; /* Tidak ada hover effect */
    cursor: default;
}

/* ===== REWARD TOMORROW STATUS ===== */
.reward-tomorrow {
    background: linear-gradient(135deg, rgba(255, 149, 0, 0.3), rgba(255, 149, 0, 0.1));
    border-color: rgba(255, 149, 0, 0.5);
    opacity: 0.8;
}

.reward-tomorrow .reward-status-text {
    background: rgba(255, 149, 0, 0.2);
    color: #ffffff;
}

.reward-tomorrow .reward-amount-modal {
    color: #ffab00;
    opacity: 0.8;
}

/* ===== AUTO PERFORMANCE OPTIMIZATIONS ===== */

/* GPU Acceleration for Interactive Elements */
.mission-day,
.floating-btn,
.btn,
.btn-claim-contact,
.particle,
.modal,
.leaderboard-item {
    transform: translateZ(0);
    will-change: transform;
}

/* Smooth Scrolling for Containers */
#missionGrid,
.leaderboard-list,
.modal-content {
    -webkit-overflow-scrolling: touch;
    contain: layout style;
}

/* Memory Optimization for Heavy Elements */
.modal,
#particlesContainer,
.leaderboard-modal {
    contain: layout style paint;
}

/* Utility Classes (Optional) */
.turbo-mode {
    transform: translateZ(0);
    will-change: auto;
    -webkit-overflow-scrolling: touch;
    contain: layout style;
}

/* ===== LEADERBOARD PAGINATION ===== */
.leaderboard-pagination {
    padding: var(--spacing-md) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    align-items: center;
}

.pagination-info {
    font-size: var(--font-sm);
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
}

.pagination-buttons {
    display: flex;
    gap: var(--spacing-xs);
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 8px;
    font-size: var(--font-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.pagination-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-dots {
    color: rgba(255, 255, 255, 0.6);
    padding: 0 var(--spacing-xs);
}

.btn-prev, .btn-next {
    font-weight: 600;
    min-width: 80px;
}

/* Mobile pagination */
@media (max-width: 480px) {
    .pagination-buttons {
        gap: 4px;
    }
    
    .pagination-btn {
        min-width: 32px;
        height: 32px;
        padding: 4px 8px;
        font-size: 0.75rem;
    }
    
    .btn-prev, .btn-next {
        min-width: 70px;
    }
}

/* ===== UNIFIED MISSION ICON SYSTEM ===== */
.mission-icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0 auto 4px auto;
    flex-shrink: 0;
}

.emoji-icon-mini {
    font-size: 2rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 2px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.1);
}

.day-label-unified {
    font-size: var(--font-xs);
    color: rgba(255, 255, 255, 0.9);
    font-weight: 700;
    text-align: center;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ===== ENSURE CONSISTENT MISSION CONTENT HEIGHT ===== */
.mission-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    flex: 1;
    width: 100%;
    padding: var(--spacing-xs);
    min-height: 60px; /* ✅ FIXED HEIGHT */
}

@media (max-width: 375px) {
    .rewards-modal .modal-content {
        width: 95vw;
        max-width: 365px; /* ✅ TIGHTER */
    }
    
    .reward-item {
        grid-template-columns: 50px 1fr 85px; /* ✅ SMALLER COLUMNS */
        gap: 8px; /* ✅ SMALLER GAP */
        padding: 12px; /* ✅ SMALLER PADDING */
        min-height: 75px; /* ✅ SMALLER HEIGHT */
    }
    
    .reward-day {
        width: 45px; /* ✅ SMALLER */
        height: 45px; /* ✅ SMALLER */
        font-size: var(--font-md);
    }
    
    .reward-icon,
    .reward-image {
        width: 35px !important; /* ✅ SMALLER */
        height: 35px !important; /* ✅ SMALLER */
    }
    
    .reward-icon {
        font-size: 1.5rem; /* ✅ SMALLER */
    }
    
    .reward-amount {
        font-size: 0.8rem; /* ✅ SMALLER */
        line-height: 1.1;
    }
    
    .reward-status-text {
        width: 80px; /* ✅ SMALLER */
        height: 35px; /* ✅ SMALLER */
        font-size: 0.7rem; /* ✅ SMALLER */
    }
}

@media (max-width: 320px) {
    .reward-item {
        grid-template-columns: 40px 1fr 85px;
        gap: 4px;
        padding: 8px;
        min-height: 65px;
    }
    
    .reward-day {
        font-size: 0.8rem;
        min-height: 35px;
    }
    
    .reward-visual {
        width: 30px;
        height: 30px;
    }
    
    .reward-icon {
        font-size: 1.1rem;
    }
    
    .reward-amount {
        font-size: 0.65rem;
    }
    
    .reward-status-text {
        font-size: 0.6rem;
        min-width: 85px;
        min-height: 35px;
    }
}

/* iPhone 6/7/8/SE (375px) - MAIN TARGET */
@media (max-width: 375px) {
    .rewards-modal .modal-content {
        width: 95vw;
        max-width: 365px; /* ✅ TIGHTER */
    }
    
    .reward-item {
        grid-template-columns: 50px 1fr 85px; /* ✅ SMALLER COLUMNS */
        gap: 8px; /* ✅ SMALLER GAP */
        padding: 12px; /* ✅ SMALLER PADDING */
        min-height: 75px; /* ✅ SMALLER HEIGHT */
    }
    
    .reward-day {
        width: 45px; /* ✅ SMALLER */
        height: 45px; /* ✅ SMALLER */
        font-size: var(--font-md);
    }
    
    .reward-icon,
    .reward-image {
        width: 35px !important; /* ✅ SMALLER */
        height: 35px !important; /* ✅ SMALLER */
    }
    
    .reward-icon {
        font-size: 1.5rem; /* ✅ SMALLER */
    }
    
    .reward-amount {
        font-size: 0.8rem; /* ✅ SMALLER */
        line-height: 1.1;
    }
    
    .reward-status-text {
        width: 80px; /* ✅ SMALLER */
        height: 35px; /* ✅ SMALLER */
        font-size: 0.7rem; /* ✅ SMALLER */
    }
}

/* Small Devices (360px and below) */
@media (max-width: 360px) {
    .rewards-modal .modal-content {
        width: 96vw;
        max-width: 350px;
    }
    
    .reward-item {
        grid-template-columns: 45px 1fr 80px; /* ✅ ULTRA COMPACT */
        gap: 6px;
        padding: 10px;
        min-height: 70px;
    }
    
    .reward-day {
        width: 40px;
        height: 40px;
        font-size: var(--font-sm);
    }
    
    .reward-icon,
    .reward-image {
        width: 30px !important;
        height: 30px !important;
    }
    
    .reward-icon {
        font-size: 1.3rem;
    }
    
    .reward-amount {
        font-size: 0.75rem;
    }
    
    .reward-status-text {
        width: 75px;
        height: 30px;
        font-size: 0.65rem;
    }
}

/* Ultra Small Devices (320px) */
@media (max-width: 320px) {
    .rewards-modal .modal-content {
        width: 98vw;
        max-width: 310px;
    }
    
    .reward-item {
        grid-template-columns: 40px 1fr 70px; /* ✅ MINIMAL */
        gap: 4px;
        padding: 8px;
        min-height: 65px;
    }
    
    .reward-day {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }
    
    .reward-icon,
    .reward-image {
        width: 25px !important;
        height: 25px !important;
    }
    
    .reward-icon {
        font-size: 1.1rem;
    }
    
    .reward-amount {
        font-size: 0.7rem;
    }
    
    .reward-status-text {
        width: 65px;
        height: 28px;
        font-size: 0.6rem;
    }
}

/* iPhone 12 Pro & similar (390px+) */
@media (max-width: 430px) and (min-width: 390px) {
    .reward-item {
        grid-template-columns: 75px 1fr;
        gap: 18px;
        padding: 18px;
        min-height: 85px;
    }
    
    .reward-day {
        width: 65px;
        height: 65px;
        font-size: var(--font-md);
    }
    
    .reward-visual {
        width: 55px;
        height: 55px;
    }
    
    .reward-icon {
        font-size: 2.2rem;
    }
    
    .reward-amount {
        font-size: var(--font-sm);
    }
}

/* iPhone SE & similar (375px) */
@media (max-width: 389px) and (min-width: 361px) {
    .rewards-modal .modal-content {
        width: 96vw;
        max-width: 370px;
    }
    
    .reward-item {
        grid-template-columns: 70px 1fr; /* ✅ OPTIMAL */
        gap: 16px;
        padding: 16px;
        min-height: 80px;
    }
    
    .reward-day {
        width: 60px;
        height: 60px;
        font-size: var(--font-sm);
        border-radius: 16px;
    }
    
    .reward-visual {
        width: 50px;
        height: 50px;
    }
    
    .reward-icon {
        font-size: 2rem;
    }
    
    .reward-amount {
        font-size: var(--font-sm);
        line-height: 1.2;
    }
}

/* Small Devices (360px and below) */
@media (max-width: 360px) {
    .rewards-modal .modal-content {
        width: 97vw;
        max-width: 350px;
    }
    
    .reward-item {
        grid-template-columns: 65px 1fr; /* ✅ COMPACT */
        gap: 14px;
        padding: 14px;
        min-height: 75px;
    }
    
    .reward-day {
        width: 55px;
        height: 55px;
        font-size: 0.9rem;
        border-radius: 14px;
    }
    
    .reward-visual {
        width: 45px;
        height: 45px;
    }
    
    .reward-icon {
        font-size: 1.8rem;
    }
    
    .reward-amount {
        font-size: 0.85rem;
        line-height: 1.2;
    }
}

/* Ultra Small (320px) */
@media (max-width: 320px) {
    .rewards-modal .modal-content {
        width: 98vw;
        max-width: 310px;
    }
    
    .reward-item {
        grid-template-columns: 60px 1fr; /* ✅ MINIMAL */
        gap: 12px;
        padding: 12px;
        min-height: 70px;
    }
    
    .reward-day {
        width: 50px;
        height: 50px;
        font-size: 0.8rem;
        border-radius: 12px;
    }
    
    .reward-visual {
        width: 40px;
        height: 40px;
    }
    
    .reward-icon {
        font-size: 1.6rem;
    }
    
    .reward-amount {
        font-size: 0.8rem;
        line-height: 1.1;
    }
}

@media (max-width: 375px) {
    .rewards-modal .modal-content {
        width: 96vw;
        max-width: 365px;
    }
    
    .reward-item {
        grid-template-columns: 85px 1fr;
        gap: 20px;
        padding: 20px;
        min-height: 90px;
    }
    
    .reward-day {
        width: 75px;
        height: 75px;
        border-radius: 18px;
    }
    
    .day-number {
        font-size: 1rem;
    }
    
    .day-status {
        font-size: 0.65rem;
    }
    
    .reward-visual {
        width: 60px;
        height: 60px;
    }
    
    .reward-icon {
        font-size: 2.5rem;
    }
    
    .reward-amount {
        font-size: 1rem;
    }
}

/* Small Devices (320px) */
@media (max-width: 320px) {
    .reward-item {
        grid-template-columns: 75px 1fr;
        gap: 16px;
        padding: 16px;
        min-height: 80px;
    }
    
    .reward-day {
        width: 65px;
        height: 65px;
        border-radius: 16px;
    }
    
    .day-number {
        font-size: 0.9rem;
    }
    
    .day-status {
        font-size: 0.6rem;
    }
    
    .reward-visual {
        width: 50px;
        height: 50px;
    }
    
    .reward-icon {
        font-size: 2rem;
    }
    
    .reward-amount {
        font-size: 0.9rem;
    }
}

/* ===== COMPLETE REWARDS MODAL REDESIGN - MOBILE FIRST ===== */

/* Reset & Override existing styles */
.rewards-modal .reward-item,
.reward-item {
    display: grid !important;
    grid-template-columns: 80px 1fr !important;
    align-items: center !important;
    gap: 20px !important;
    padding: 20px !important;
    margin-bottom: 16px !important;
    
    /* Visual styling */
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.25), 
        rgba(255, 255, 255, 0.15)) !important;
    border: 2px solid rgba(255, 255, 255, 0.6) !important;
    border-radius: 24px !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    
    /* Shadows & effects */
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.4) !important;
    
    /* Smooth transitions */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    
    /* Layout */
    min-height: 90px !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Hover effect */
.reward-item:hover {
    transform: translateY(-2px) !important;
    box-shadow: 
        0 16px 50px rgba(0, 0, 0, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.5) !important;
}

/* ===== DAY COLUMN STYLING ===== */
.reward-day {
    grid-column: 1 !important;
    position: relative !important;
    overflow: hidden !important;
    
    /* Layout */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    
    /* Size & shape */
    width: 70px !important;
    height: 70px !important;
    border-radius: 20px !important;
    
    /* Background */
    background: linear-gradient(135deg, 
        rgba(0, 212, 255, 0.3), 
        rgba(78, 205, 196, 0.2)) !important;
    border: 2px solid rgba(255, 255, 255, 0.4) !important;
    
    /* Shadow */
    box-shadow: 
        0 6px 20px rgba(0, 212, 255, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

/* Day text container */
.day-text-container {
    position: relative !important;
    height: 50px !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Animated text styling */
.day-text-animated {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    opacity: 0 !important;
    
    /* Typography */
    font-size: 0.85rem !important;
    font-weight: 800 !important;
    text-align: center !important;
    white-space: nowrap !important;
    line-height: 1.2 !important;
    
    /* Transition */
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.day-text-animated.active {
    opacity: 1 !important;
    transform: translate(-50%, -50%) scale(1) !important;
}

.day-text-animated.slide-up {
    opacity: 0 !important;
    transform: translate(-50%, -120%) scale(0.8) !important;
}

.day-text-animated.slide-down {
    opacity: 0 !important;
    transform: translate(-50%, 120%) scale(0.8) !important;
}

/* Status colors dengan contrast tinggi */
.day-text-animated.status-completed {
    color: #00ff88 !important;
    text-shadow: 0 0 15px rgba(0, 255, 136, 0.6) !important;
}

.day-text-animated.status-available {
    color: #00d4ff !important;
    text-shadow: 0 0 15px rgba(0, 212, 255, 0.6) !important;
}

.day-text-animated.status-locked {
    color: #cccccc !important;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3) !important;
}

.day-text-animated.status-tomorrow {
    color: #ffab00 !important;
    text-shadow: 0 0 15px rgba(255, 171, 0, 0.6) !important;
}

/* ===== CONTENT COLUMN STYLING ===== */
.reward-content {
    grid-column: 2 !important;
    display: flex !important;
    flex-direction: column !important; /* ✅ UBAH KE COLUMN */
    align-items: flex-start !important;
    justify-content: center !important;
    width: 100% !important;
    position: relative !important;
    padding-right: 60px !important; /* ✅ SPACE UNTUK ICON */
    min-height: 100% !important;
}

.reward-visual {
    position: absolute !important;
    right: 15px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 2 !important; /* ✅ DI ATAS TEXT */
    
    /* ✅ BACKGROUND UNTUK CONTRAST */
    background: rgba(0, 0, 0, 0.1) !important;
    border-radius: 50% !important;
    padding: 4px !important;
}

.reward-icon {
    font-size: 2rem !important;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3)) !important;
}

.reward-image {
    width: 45px !important;
    height: 45px !important;
    border-radius: 16px !important;
    background-size: cover !important;
    background-position: center !important;
    border: 2px solid rgba(255, 255, 255, 0.4) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
}

/* Reward amount - prevent overlap */
.reward-amount {
    width: 100% !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5) !important;
    
    /* ✅ TEXT WRAP SETTINGS - NO OVERLAP */
    text-align: left !important;
    line-height: 1.2 !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
    
    /* ✅ MAX 2 LINES dengan PADDING dari icon */
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    
    /* ✅ PASTIKAN TIDAK TEMBUS KE BELAKANG */
    white-space: normal !important;
    text-overflow: clip !important;
    z-index: 1 !important;
    
    /* ✅ MARGIN RIGHT untuk hindari overlap */
    margin-right: 10px !important;
    max-width: calc(100% - 10px) !important;
}

/* Hide status column */
.reward-status-text {
    display: none !important;
}

/* ===== RESPONSIVE BREAKPOINTS ===== */

/* iPhone 4/5/SE (320px) */
@media (max-width: 320px) {
    .reward-content {
        gap: 8px !important;
    }
    
    .reward-amount {
        font-size: 0.8rem !important;
    }
    
    .reward-image {
        width: 40px !important;
        height: 40px !important;
        border-radius: 12px !important;
    }
    
    .reward-icon {
        font-size: 1.6rem !important;
    }
}

/* iPhone 6/7/8 (375px) */
@media (min-width: 321px) and (max-width: 375px) {
    .reward-content {
        gap: 10px !important;
    }
    
    .reward-amount {
        font-size: 0.85rem !important;
    }
    
    .reward-image {
        width: 45px !important;
        height: 45px !important;
        border-radius: 14px !important;
    }
    
    .reward-icon {
        font-size: 1.8rem !important;
    }
}

/* iPhone X/XS dan lebih besar */
@media (min-width: 376px) {
    .reward-content {
        gap: 12px !important;
    }
    
    .reward-amount {
        font-size: 1rem !important;
    }
    
    .reward-image {
        width: 50px !important;
        height: 50px !important;
        border-radius: 16px !important;
    }
    
    .reward-icon {
        font-size: 2.2rem !important;
    }
}

/* Ultra wide - iPhone 16 Pro Max */
@media (min-width: 480px) {
    .reward-content {
        gap: 16px !important;
    }
    
    .reward-amount {
        font-size: 1.1rem !important;
    }
    
    .reward-image {
        width: 55px !important;
        height: 55px !important;
        border-radius: 18px !important;
    }
    
    .reward-icon {
        font-size: 2.4rem !important;
    }
}

.rewards-modal .modal-body {
    padding: 30px 40px !important; /* ✅ DARI 25px JADI 40px */
    max-height: 70vh !important;
    overflow-y: auto !important;
}

#modalRewardsGrid {
    display: flex !important;
    flex-direction: column !important;
    gap: 18px !important;
    padding: 0 !important;        /* ✅ ROLLBACK KE 0 */
    margin: 0 !important;
    margin-bottom: 20px !important;
}

/* ===== REWARD ITEMS SPACING ===== */
.rewards-modal .reward-item,
.reward-item {
    /* Remove margin-bottom karena sudah ada gap di container */
    margin-bottom: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    
    /* Pastikan full width */
    width: 100% !important;
    box-sizing: border-box !important;
}

/* iPhone 4/5/SE (320px) */
@media (max-width: 320px) {
    .rewards-modal .modal-body {
        padding: 20px 25px !important; /* ✅ DARI 15px JADI 25px */
    }
    
    .rewards-modal .modal-content {
        max-width: 92vw !important;
    }
    
    #modalRewardsGrid {
        gap: 12px !important;
    }
}

@media (min-width: 321px) and (max-width: 375px) {
    .rewards-modal .modal-body {
        padding: 25px 30px !important; /* ✅ DARI 20px JADI 30px */
    }
    
    .rewards-modal .modal-content {
        max-width: 93vw !important;
    }
    
    #modalRewardsGrid {
        gap: 15px !important;
    }
}

/* iPhone X/XS dan lebih besar (414px) */
@media (min-width: 376px) and (max-width: 480px) {
    .rewards-modal .modal-body {
        padding: 30px 35px !important; /* ✅ DARI 25px JADI 35px */
    }
    
    .rewards-modal .modal-content {
        max-width: 94vw !important;
    }
    
    #modalRewardsGrid {
        gap: 18px !important;
    }
}

/* Ultra wide - iPhone 16 Pro Max (480px+) */
@media (min-width: 481px) {
    .rewards-modal .modal-body {
        padding: 35px 45px !important; /* ✅ DARI 30px JADI 45px */
    }
    
    .rewards-modal .modal-content {
        max-width: 95vw !important;
    }
    
    #modalRewardsGrid {
        gap: 20px !important;
    }
}

/* Tablet & Desktop fallback */
@media (min-width: 768px) {
    .rewards-modal .modal-body {
        padding: 40px 60px !important; /* ✅ EXTRA LEBAR UNTUK TABLET */
    }
    
    .rewards-modal .modal-content {
        max-width: 600px !important; /* ✅ FIXED WIDTH UNTUK DESKTOP */
    }
}

/* ===== MODAL VISUAL ENHANCEMENTS ===== */
.rewards-modal .modal-content {
    max-width: 95vw !important; /* ✅ TAMBAH MAX WIDTH */
    margin: 0 auto !important;
    border-radius: 32px !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 
        0 25px 60px rgba(0, 0, 0, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.2) !important;
}

.rewards-modal .modal-header {
    padding: 25px 25px 15px 25px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.rewards-modal .modal-footer {
    padding: 15px 25px 25px 25px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.2) !important;
}

/* Scrollbar styling */
.rewards-modal .modal-body::-webkit-scrollbar {
    width: 6px !important;
}

.rewards-modal .modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 3px !important;
}

.rewards-modal .modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3) !important;
    border-radius: 3px !important;
}

.rewards-modal .modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5) !important;
}

.rewards-modal .modal-dialog,
#rewardsModal .modal-dialog {
    max-width: none !important;     /* ✅ REMOVE MAX WIDTH LIMIT */
    width: 95vw !important;         /* ✅ 95% VIEWPORT WIDTH */
    margin: 1rem 2.5vw !important; /* ✅ 2.5% MARGIN KIRI-KANAN */
}

.rewards-modal .modal-content,
#rewardsModal .modal-content {
    width: 100% !important;
    border-radius: 32px !important;
}

/* Modal body tanpa extra padding */
.rewards-modal .modal-body,
#rewardsModal .modal-body {
    padding: var(--spacing-xl) var(--spacing-lg) !important; /* 24px top-bottom, 20px kiri-kanan */
}

/* ===== RESPONSIVE MODAL WIDTH ===== */

/* iPhone 4/5/SE (320px) */
@media (max-width: 320px) {
    .rewards-modal .modal-dialog,
    #rewardsModal .modal-dialog {
        width: 92vw !important;         /* ✅ 92% WIDTH */
        margin: 1rem 4vw !important;   /* ✅ 4% MARGIN */
    }
    
    .rewards-modal .modal-body,
    #rewardsModal .modal-body {
        padding: var(--spacing-md) var(--spacing-sm) !important; /* 16px 12px */
    }
}

/* iPhone 6/7/8 (375px) */
@media (min-width: 321px) and (max-width: 375px) {
    .rewards-modal .modal-dialog,
    #rewardsModal .modal-dialog {
        width: 94vw !important;         /* ✅ 94% WIDTH */
        margin: 1rem 3vw !important;   /* ✅ 3% MARGIN */
    }
    
    .rewards-modal .modal-body,
    #rewardsModal .modal-body {
        padding: var(--spacing-lg) var(--spacing-md) !important; /* 20px 16px */
    }
}

/* iPhone X/XS dan lebih besar (414px) */
@media (min-width: 376px) and (max-width: 480px) {
    .rewards-modal .modal-dialog,
    #rewardsModal .modal-dialog {
        width: 95vw !important;         /* ✅ 95% WIDTH */
        margin: 1rem 2.5vw !important; /* ✅ 2.5% MARGIN */
    }
    
    .rewards-modal .modal-body,
    #rewardsModal .modal-body {
        padding: var(--spacing-xl) var(--spacing-lg) !important; /* 24px 20px */
    }
}

/* Ultra wide - iPhone 16 Pro Max (480px+) */
@media (min-width: 481px) {
    .rewards-modal .modal-dialog,
    #rewardsModal .modal-dialog {
        width: 96vw !important;         /* ✅ 96% WIDTH */
        margin: 1rem 2vw !important;   /* ✅ 2% MARGIN */
    }
    
    .rewards-modal .modal-body,
    #rewardsModal .modal-body {
        padding: var(--spacing-xl) var(--spacing-xl) !important; /* 24px 24px */
    }
}

/* Tablet & Desktop fallback */
@media (min-width: 768px) {
    .rewards-modal .modal-dialog,
    #rewardsModal .modal-dialog {
        width: 600px !important;        /* ✅ FIXED WIDTH UNTUK DESKTOP */
        margin: 1rem auto !important;  /* ✅ CENTER */
    }
}

@media (max-width: 320px) {
    .reward-content {
        padding-right: 50px !important;
    }
    
    .reward-amount {
        font-size: 0.75rem !important; /* 12px */
        line-height: 1.1 !important;
    }
    
    .reward-visual {
        right: 10px !important;
    }
    
    .reward-icon {
        font-size: 1.5rem !important;
    }
    
    .reward-image {
        width: 35px !important;
        height: 35px !important;
        border-radius: 12px !important;
    }
}

/* Small - iPhone 5/5S/SE (320px-375px) */
@media (min-width: 321px) and (max-width: 375px) {
    .reward-content {
        padding-right: 55px !important;
    }
    
    .reward-amount {
        font-size: 0.8rem !important; /* 13px */
        line-height: 1.15 !important;
    }
    
    .reward-visual {
        right: 0px !important;
    }
    
    .reward-icon {
        font-size: 1.7rem !important;
    }
    
    .reward-image {
        width: 40px !important;
        height: 40px !important;
        border-radius: 14px !important;
    }
}

/* Medium - iPhone 6/6S/7/8 (375px-414px) */
@media (min-width: 376px) and (max-width: 414px) {
    .reward-content {
        padding-right: 60px !important;
    }
    
    .reward-amount {
        font-size: 0.85rem !important; /* 14px */
        line-height: 1.2 !important;
    }
    
    .reward-visual {
        right: 15px !important;
    }
    
    .reward-icon {
        font-size: 1.8rem !important;
    }
    
    .reward-image {
        width: 42px !important;
        height: 42px !important;
        border-radius: 15px !important;
    }
}

/* Large - iPhone X/XS/11 Pro (414px-480px) */
@media (min-width: 415px) and (max-width: 480px) {
    .reward-content {
        padding-right: 65px !important;
    }
    
    .reward-amount {
        font-size: 0.9rem !important; /* 14.5px */
        line-height: 1.2 !important;
    }
    
    .reward-visual {
        right: 15px !important;
    }
    
    .reward-icon {
        font-size: 2rem !important;
    }
    
    .reward-image {
        width: 45px !important;
        height: 45px !important;
        border-radius: 16px !important;
    }
}

/* Extra Large - iPhone 12/13/14 Plus (480px-540px) */
@media (min-width: 481px) and (max-width: 540px) {
    .reward-content {
        padding-right: 70px !important;
    }
    
    .reward-amount {
        font-size: 0.95rem !important; /* 15px */
        line-height: 1.25 !important;
    }
    
    .reward-visual {
        right: 16px !important;
    }
    
    .reward-icon {
        font-size: 2.1rem !important;
    }
    
    .reward-image {
        width: 48px !important;
        height: 48px !important;
        border-radius: 17px !important;
    }
}

/* Ultra Large - iPhone 15/16 Pro Max (540px+) */
@media (min-width: 541px) {
    .reward-content {
        padding-right: 75px !important;
    }
    
    .reward-amount {
        font-size: 1rem !important; /* 16px */
        line-height: 1.3 !important;
    }
    
    .reward-visual {
        right: 18px !important;
    }
    
    .reward-icon {
        font-size: 2.2rem !important;
    }
    
    .reward-image {
        width: 50px !important;
        height: 50px !important;
        border-radius: 18px !important;
    }
}

/* Tablet Portrait (768px+) */
@media (min-width: 768px) {
    .reward-content {
        padding-right: 80px !important;
    }
    
    .reward-amount {
        font-size: 1.1rem !important;
        line-height: 1.35 !important;
    }
    
    .reward-visual {
        right: 20px !important;
    }
    
    .reward-icon {
        font-size: 2.5rem !important;
    }
    
    .reward-image {
        width: 55px !important;
        height: 55px !important;
        border-radius: 20px !important;
    }
}

/* ===== MODAL DIALOG - RESPONSIVE UNTUK SEMUA HP ===== */
.rewards-modal .modal-dialog,
#rewardsModal .modal-dialog {
    max-width: none !important;
    margin: 0.5rem !important;
}

/* Responsive width untuk semua HP */
@media (max-width: 320px) {
    .rewards-modal .modal-dialog { width: calc(100vw - 1rem) !important; }
}

@media (min-width: 321px) and (max-width: 375px) {
    .rewards-modal .modal-dialog { width: calc(100vw - 1.5rem) !important; }
}

@media (min-width: 376px) and (max-width: 414px) {
    .rewards-modal .modal-dialog { width: calc(100vw - 2rem) !important; }
}

@media (min-width: 415px) and (max-width: 480px) {
    .rewards-modal .modal-dialog { width: calc(100vw - 2.5rem) !important; }
}

@media (min-width: 481px) and (max-width: 540px) {
    .rewards-modal .modal-dialog { width: calc(100vw - 3rem) !important; }
}

@media (min-width: 541px) and (max-width: 768px) {
    .rewards-modal .modal-dialog { width: calc(100vw - 4rem) !important; }
}

@media (min-width: 769px) {
    .rewards-modal .modal-dialog { 
        width: 600px !important;
        margin: 1rem auto !important;
    }
}

/* iPhone 4/5/SE (320px) - ULTRA COMPACT */
@media (max-width: 320px) {
    .rewards-modal .reward-item,
    .reward-item {
        padding: 12px 10px !important; /* ✅ JAUH LEBIH KECIL */
        gap: 0px !important;
        min-height: 70px !important;
    }
}

/* iPhone 6/7/8 (375px) - COMPACT */
@media (min-width: 321px) and (max-width: 375px) {
    .rewards-modal .reward-item,
    .reward-item {
        padding: 14px 12px !important; /* ✅ LEBIH KECIL */
        gap: 0px !important;
        min-height: 75px !important;
    }
}

/* iPhone X/XS dan lebih besar (414px) - MEDIUM */
@media (min-width: 376px) and (max-width: 480px) {
    .rewards-modal .reward-item,
    .reward-item {
        padding: 16px 14px !important; /* ✅ SEDANG */
        gap: 0px !important;
        min-height: 80px !important;
    }
}

/* iPhone 16 Pro Max (480px+) - LARGE */
@media (min-width: 481px) and (max-width: 768px) {
    .rewards-modal .reward-item,
    .reward-item {
        padding: 18px 16px !important; /* ✅ LEBIH BESAR */
        gap: 0px !important;
        min-height: 85px !important;
    }
}

/* Tablet & Desktop (768px+) - FULL SIZE */
@media (min-width: 769px) {
    .rewards-modal .reward-item,
    .reward-item {
        padding: 20px !important; /* ✅ ORIGINAL SIZE */
        gap: 0px !important;
        min-height: 90px !important;
    }
}


/* iPhone 4/5/SE (320px) */
@media (max-width: 320px) {
    .reward-day {
        width: 55px !important;
        height: 55px !important;
        border-radius: 16px !important;
    }
    
    .day-text-animated {
        font-size: 0.7rem !important;
    }
    
    .reward-visual {
        right: 8px !important;
    }
    
    .reward-icon {
        font-size: 1.4rem !important;
    }
    
    .reward-image {
        width: 35px !important;
        height: 35px !important;
        border-radius: 12px !important;
    }
    
    .reward-amount {
        font-size: 0.75rem !important;
        line-height: 1.1 !important;
    }
    
    .reward-content {
        padding-right: 45px !important;
    }
}

/* iPhone 6/7/8 (375px) */
@media (min-width: 321px) and (max-width: 375px) {
    .reward-day {
        width: 60px !important;
        height: 60px !important;
        border-radius: 18px !important;
    }
    
    .day-text-animated {
        font-size: 0.75rem !important;
    }
    
    .reward-visual {
        right: 0px !important;
    }
    
    .reward-icon {
        font-size: 1.6rem !important;
    }
    
    .reward-image {
        width: 38px !important;
        height: 38px !important;
        border-radius: 14px !important;
    }
    
    .reward-amount {
        font-size: 0.8rem !important;
        line-height: 1.15 !important;
    }
    
    .reward-content {
        padding-right: 50px !important;
    }
}

/* iPhone X/XS (414px) */
@media (min-width: 376px) and (max-width: 480px) {
    .reward-day {
        width: 65px !important;
        height: 65px !important;
        border-radius: 20px !important;
    }
    
    .day-text-animated {
        font-size: 0.8rem !important;
    }
    
    .reward-visual {
        right: 12px !important;
    }
    
    .reward-icon {
        font-size: 1.8rem !important;
    }
    
    .reward-image {
        width: 42px !important;
        height: 42px !important;
        border-radius: 15px !important;
    }
    
    .reward-amount {
        font-size: 0.85rem !important;
        line-height: 1.2 !important;
    }
    
    .reward-content {
        padding-right: 55px !important;
    }
}

/* iPhone 16 Pro Max (480px+) */
@media (min-width: 481px) and (max-width: 768px) {
    .reward-day {
        width: 70px !important;
        height: 70px !important;
        border-radius: 20px !important;
    }
    
    .day-text-animated {
        font-size: 0.85rem !important;
    }
    
    .reward-visual {
        right: 15px !important;
    }
    
    .reward-icon {
        font-size: 2rem !important;
    }
    
    .reward-image {
        width: 45px !important;
        height: 45px !important;
        border-radius: 16px !important;
    }
    
    .reward-amount {
        font-size: 0.9rem !important;
        line-height: 1.2 !important;
    }
    
    .reward-content {
        padding-right: 60px !important;
    }
}

/* iPhone SE specific - Naikkan sedikit */
@media (min-width: 321px) and (max-width: 375px) {
    .reward-day {
        align-self: flex-start !important; /* ✅ SEDIKIT KE ATAS */
        margin-top: -4px !important;
    }
}

/* ===== NEST HUB SPECIFIC (1024x600) ===== */
@media (min-width: 1000px) and (max-width: 1100px) {
    .rewards-modal .modal-dialog {
        width: 800px !important;
        max-width: 800px !important;
        margin: 2rem auto !important;
    }
    
    .rewards-modal .reward-item,
    .reward-item {
        padding: 25px 20px !important;
        min-height: 100px !important;
        gap: 25px !important;
    }
    
    .reward-day {
        width: 80px !important;
        height: 80px !important;
        border-radius: 24px !important;
    }
    
    .day-text-animated {
        font-size: 1rem !important;
        font-weight: 800 !important;
    }
    
    .reward-amount {
        font-size: 1.2rem !important;
        line-height: 1.3 !important;
        font-weight: 800 !important;
    }
    
    .reward-content {
        padding-right: 80px !important;
    }
    
    .reward-visual {
        right: 20px !important;
    }
    
    .reward-icon {
        font-size: 2.5rem !important;
    }
    
    .reward-image {
        width: 60px !important;
        height: 60px !important;
        border-radius: 20px !important;
    }
}

/* 🎯 COMPREHENSIVE MOBILE DEVICE TARGETING */

/* iPhone SE (375x667) */
@media (width: 375px) and (height: 667px) {
    .reward-content { margin-bottom: 7px !important; }
    .reward-day { margin-top: -8px !important; }
}

/* iPhone XR/11 (414x896) */
@media (width: 414px) and (height: 896px) {
    .reward-content { margin-bottom: 5px !important; }
    .reward-day { margin-top: -6px !important; }
}

/* iPhone 12 Pro (390x844) */
@media (width: 390px) and (height: 844px) {
    .reward-content { margin-bottom: 6px !important; }
    .reward-day { margin-top: -7px !important; }
}

/* iPhone 14 Pro Max (430x932) */
@media (width: 430px) and (height: 932px) {
    .reward-content { margin-bottom: 4px !important; }
    .reward-day { margin-top: -5px !important; }
}

/* Galaxy S20/S21 (360x800) */
@media (width: 360px) and (height: 800px) {
    .reward-content { margin-bottom: 8px !important; }
    .reward-day { margin-top: -9px !important; }
}

/* Galaxy Note (412x915) */
@media (width: 412px) and (height: 915px) {
    .reward-content { margin-bottom: 5px !important; }
    .reward-day { margin-top: -6px !important; }
}

/* Pixel 4a (393x851) */
@media (width: 393px) and (height: 851px) {
    .reward-content { margin-bottom: 6px !important; }
    .reward-day { margin-top: -7px !important; }
}

/* 🔄 RANGE-BASED FALLBACKS */
/* Small phones (320-380px width) */
@media (min-width: 320px) and (max-width: 380px) {
    .reward-content { margin-bottom: 7px !important; }
    .reward-day { margin-top: -8px !important; }
}

/* Medium phones (381-410px width) */
@media (min-width: 381px) and (max-width: 410px) {
    .reward-content { margin-bottom: 6px !important; }
    .reward-day { margin-top: -7px !important; }
}

/* Large phones (411-440px width) */
@media (min-width: 411px) and (max-width: 440px) {
    .reward-content { margin-bottom: 5px !important; }
    .reward-day { margin-top: -6px !important; }
}

/* Extra large phones (441px+ width) */
@media (min-width: 441px) and (max-width: 500px) {
    .reward-content { margin-bottom: 4px !important; }
    .reward-day { margin-top: -5px !important; }
}

/* 🌍 UNIVERSAL MOBILE FALLBACK */
@media (max-width: 767px) and (orientation: portrait) {
    .reward-content { 
        margin-bottom: 6px !important;
    }
    .reward-day {
        margin-top: -9px !important;
    }
}

/* 📱 LANDSCAPE MODE UNIVERSAL */
@media (max-height: 500px) and (orientation: landscape) {
    .reward-content { 
        margin-bottom: 3px !important;
    }
    .reward-day {
        margin-top: -4px !important;
    }
}

.player-rank-title-display {
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.player-rank-part {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #64b5f6;
}

.player-title-part {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #ffb74d;
}

.rank-separator {
    color: #888;
    font-weight: 400;
}

/* Rank styling berdasarkan posisi */
.player-rank-title-display.top-rank .player-rank-part {
    background: linear-gradient(135deg, #ffd700, #ffb300);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.player-rank-title-display.top-10 .player-rank-part {
    background: linear-gradient(135deg, #42a5f5, #66bb6a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.player-rank-title-display.top-100 .player-rank-part {
    color: #81c784;
}

/* Title styling berdasarkan level */
.title-level-1 .player-title-part { color: #ffb74d; }
.title-level-2 .player-title-part { color: #4fc3f7; }
.title-level-3 .player-title-part { color: #81c784; }
.title-level-4 .player-title-part { color: #ba68c8; }
.title-level-5 .player-title-part { color: #f06292; }
.title-level-6 .player-title-part { color: #ff8a65; }
.title-level-7 .player-title-part { color: #ffd54f; }

/* Loading & Error states */
.player-rank-title-display.loading {
    color: #888;
    font-style: italic;
}

.player-rank-title-display.error {
    color: #f44336;
}

/* CSS untuk efek glow yang lebih tipis dan elegante */
.glow-effect {
    position: relative;
    animation: glowing 1.5s infinite alternate; /* Menggunakan animasi yang lebih halus */
    border: 1px solid #ffd700; /* Border kuning */
    border-radius: 8px; /* Sudut membulat */
}

/* Animasi glowing dengan efek yang lebih halus */
@keyframes glowing {
    0% {
        box-shadow: 0 0 3px #ffd700, 0 0 5px #ffd700, 0 0 10px rgba(255, 215, 0, 0.5); /* Glow lebih tipis */
        transform: scale(1);
    }
    100% {
        box-shadow: 0 0 6px #ffd700, 0 0 15px rgba(255, 215, 0, 0.3), 0 0 20px rgba(255, 215, 0, 0.2); /* Glow lebih halus */
        transform: scale(1.02);
    }
}

/* Memperjelas highlight pada current user */
.current-user {
    background-color: rgba(255, 215, 0, 0.1); /* Latar belakang kuning lebih transparan */
}

.rewards-list-container {
    text-align: center; /* Rata tengah untuk teks */
    margin: var(--spacing-lg) 0; /* Margin atas dan bawah */
    padding: var(--spacing-md); /* Padding di sekeliling */
    background: rgba(255, 255, 255, 0.1); /* Latar belakang transparan */
    border-radius: 35px; /* Sudut melengkung */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); /* Bayangan */
}

/* Judul Daftar Hadiah */
.rewards-list-container h2 {
    font-size: var(--font-lg); /* Ukuran font judul */
    color: var(--accent-color); /* Menggunakan warna aksen */
    margin-bottom: var(--spacing-sm); /* Margin bawah */
}

/* Gaya Tombol untuk Daftar Hadiah */
.btn-rewards-list {
    background: var(--gradient-secondary); /* Latar belakang gradient */
    color: white; /* Teks putih */
    padding: var(--spacing-sm) var(--spacing-md); /* Padding dalam tombol */
    border: none; /* Tanpa border */
    border-radius: 20px; /* Sudut tombol */
    font-size: var(--font-md); /* Ukuran font */
    font-weight: 700; /* Ketebalan font */
    cursor: pointer; /* Pointer saat hover */
    transition: transform 0.2s ease, box-shadow 0.2s ease; /* Transisi halus */
}

.btn-rewards-list:hover {
    transform: translateY(-2px); /* Efek terangkat saat hover */
    box-shadow: 0 4px 25px rgba(255, 107, 107, 0.7); /* Bayangan saat hover */
}

/* Gaya Modal Daftar Hadiah */
.awards-modal {
    display: none; /* Menyembunyikan modal secara default */
    position: fixed;
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0; 
    z-index: 2; /* Modal harus memiliki z-index lebih tinggi dari backdrop */
    display: flex; 
    justify-content: center; 
    align-items: center; 
}

.awards-content {
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a3e 50%, #2d1b69 100%);
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px; 
    padding: var(--spacing-lg); 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); 
    width: 80%; /* Lebar responsif */
    max-width: 600px; /* Lebar maksimum untuk konten */
    max-height: 80%; /* Membatasi tinggi maks modal */
    overflow-y: auto; /* Scroll jika konten melebihi tinggi */
}

/* Aturan untuk perangkat dengan tinggi kurang dari 650px */
@media (max-height: 650px) {
    .awards-content {
        max-height: 90vh; /* Membatasi tinggi hingga 90% dari viewport */
        overflow-y: auto; /* Tambahkan scroll untuk konten */
        padding: 10px; /* Padding lebih kecil */
    }

    .award-item {
        padding: 8px; /* Padding lebih kecil untuk item hadiah */
    }

    /* Mengatur ukuran font untuk menjaga konsistensi */
    .award-day {
        font-size: 1rem; /* Ukuran font untuk nama hari */
    }

    .award-content {
        font-size: 0.9rem; /* Ukuran font untuk konten hadiah */
    }
}

.awards-header {
    display: flex; 
    justify-content: space-between; /* Memastikan elemen terpisah dengan baik */
    align-items: center; /* Memusatkan isi header secara vertikal */
    width: 100%; /* Pastikan header mengambil 100% lebar */
    padding: 10px; /* Tambahkan padding jika diperlukan */
}

.awards-title {
    font-size: var(--font-lg); 
    color: var(--accent-color); 
}

/* Gaya untuk Tombol Close */
.awards-close {
    cursor: pointer; 
    background: transparent; 
    border: none; 
    font-size: 1.5rem; /* Ukuran font untuk tombol close */
    color: #ffffff; /* Warna untuk tombol close */
}

/* Gaya Konten Modal */
.awards-body {
    margin-top: 20px; 
}

/* Grid untuk Elemen Hadiah */
.awards-grid {
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); 
    gap: 20px; /* Jarak antara item grid */
    max-height: 400px; /* Misalnya Anda ingin batas tinggi untuk scroll */
    overflow-y: auto; /* Menambahkan scrollbar vertikal saat konten melebihi tinggi */
}

/* Item Hadiah */
.award-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.15)) !important;
    border-radius: 10px; 
    padding: var(--spacing-md); 
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); 
    text-align: center; 
    transition: transform 0.2s ease, box-shadow 0.2s ease; /* Transisi halus */
}

/* Hover effects for award items */
.award-item:hover {
    transform: translateY(-5px); /* Efek terangkat saat hover */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); /* Bayangan saat hover */
}

/* Elemen Hari */
.award-day {
    font-weight: bold; 
    margin-bottom: 10px; 
    font-size: 1.2rem; /* Ukuran font hari */
    color: var(--accent-color); /* Warna sesuai dengan skema */
}

/* Elemen Konten Hadiah */
.award-content {
    font-size: var(--font-md); 
    color: var(--text-color); 
    margin-top: 10px; /* Mengatur ruang atas */
}

/* Gaya untuk hadia tanpa konten */
.award-content.empty {
    font-style: italic; /* Italic untuk menunjukkan tidak ada konten */
    color: #777; /* Warna untuk elemen kosong */
    text-align: center; /* Rata tengah */
}

.awards-subtitle {
    text-align: center; /* Memusatkan teks */
    font-size: 1rem; /* Ukuran font untuk subtitle */
    color: var(--text-color); /* Warna teks sesuai dengan tema */
    margin-top: 5px; /* Ruang atas untuk memberikan jarak dari judul */
    font-weight: normal; /* Buat normal untuk kontras dengan judul */
}

.awards-backdrop {
    display: block; /* Menampilkan backdrop */
    position: fixed; /* Memastikan backdrop menutupi seluruh layar */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.3); /* Transparansi */
    z-index: -1; /* Pastikan z-index di atas konten lainnya */
    backdrop-filter: blur(5px); /* Efek blur pada latar belakang */
}

.award-item.no-award {
    background-color: rgba(220, 220, 220, 0.5); /* Warna latar belakang untuk item tanpa hadiah */
    color: #777; /* Warna teks untuk tidak ada hadiah */
    font-style: italic; /* Italic untuk menandakan tidak ada hadiah */
    padding: 15px; /* Padding untuk penampilan yang lebih baik */
    text-align: center; /* Memusatkan teks */
    border-radius: 10px; /* Untuk menjaga konsistensi desain */
}

/* Gaya untuk hari yang tidak memiliki hadiah */
.award-day.no-award-day {
    color: rgba(150, 150, 150, 0.7); /* Mengubah warna teks untuk tidak ada hadiah */
    font-style: italic; /* Mengatur teks menjadi miring */
    margin-bottom: -5px; 
}

.award-day.first-day {
    margin-top: 5px; /* Menambahkan margin-top khusus untuk hari pertama */
}