/* ==========================================
   PRIZE SITE - MOBILE FIRST CSS
   ========================================== */

:root {
    /* Primary Colors */
    --primary: #6C5CE7;
    --primary-dark: #5B4BD5;
    --primary-light: #A29BFE;

    /* Accent Colors */
    --accent: #FDCB6E;
    --accent-orange: #E17055;

    /* Status Colors */
    --success: #00B894;
    --warning: #FDCB6E;
    --danger: #FF7675;
    --info: #74B9FF;

    /* Neutrals */
    --white: #FFFFFF;
    --bg: #F8F9FA;
    --bg-card: #FFFFFF;
    --text: #2D3436;
    --text-light: #636E72;
    --text-muted: #B2BEC3;
    --border: #DFE6E9;

    /* Christmas Theme */
    --xmas-red: #E74C3C;
    --xmas-gold: #F1C40F;
    --xmas-green: #27AE60;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50%;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ==========================================
   RESET & BASE
   ========================================== */

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    font-size: inherit;
}

input, select {
    font-family: inherit;
    font-size: 16px;
}

/* ==========================================
   SNOWFLAKES ANIMATION
   ========================================== */

.snowflakes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    overflow: hidden;
}

.snowflake {
    position: absolute;
    color: #fff;
    font-size: 1rem;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    animation: snowfall linear infinite;
    opacity: 0.7;
}

@keyframes snowfall {
    0% {
        transform: translateY(-10vh) rotate(0deg);
    }
    100% {
        transform: translateY(110vh) rotate(360deg);
    }
}

/* ==========================================
   APP CONTAINER
   ========================================== */

.app-container {
    max-width: 430px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg);
    position: relative;
    padding-bottom: 80px;
}

/* ==========================================
   SCREENS
   ========================================== */

.screen {
    display: none;
    padding: var(--space-md);
    padding-bottom: 100px;
    animation: fadeIn var(--transition-normal);
}

.screen.active {
    display: block;
}

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

/* ==========================================
   HEADER
   ========================================== */

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) 0;
    margin-bottom: var(--space-md);
}

.user-greeting {
    display: flex;
    flex-direction: column;
}

.greeting-text {
    font-size: 0.875rem;
    color: var(--text-light);
}

.user-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
}

.points-badge {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    background: linear-gradient(135deg, var(--accent), var(--accent-orange));
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

.points-badge.small {
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.875rem;
}

.points-icon {
    font-size: 1.25rem;
}

.points-value {
    font-weight: 700;
    color: var(--text);
}

.screen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) 0;
    margin-bottom: var(--space-md);
}

.screen-header h1 {
    font-size: 1.5rem;
    font-weight: 800;
}

/* ==========================================
   HERO CARD
   ========================================== */

.hero-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    color: var(--white);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-bottom: var(--space-md);
}

.ribbon {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--xmas-red);
    color: var(--white);
    padding: var(--space-xs) var(--space-md);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 0 var(--radius-lg) 0 var(--radius-md);
}

.hero-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.hero-text {
    flex: 1;
}

.hero-subtitle {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: var(--space-xs);
}

.hero-points {
    font-size: 1.75rem;
    font-weight: 800;
}

.hero-points .remaining {
    color: var(--accent);
}

.hero-prize {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
}

.hero-prize img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-progress {
    margin-bottom: var(--space-md);
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.progress-bar.large {
    height: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--xmas-gold));
    border-radius: var(--radius-xl);
    transition: width var(--transition-slow);
}

.progress-fill.animated {
    animation: progressPulse 2s ease-in-out infinite;
}

@keyframes progressPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    margin-top: var(--space-xs);
    opacity: 0.8;
}

.hero-btn {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-sm);
}

/* ==========================================
   BUTTONS
   ========================================== */

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--accent), var(--accent-orange));
    color: var(--text);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-fast);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-sm);
}

.btn-primary:active {
    transform: scale(0.98);
    box-shadow: var(--shadow-sm);
}

.btn-secondary {
    width: 100%;
    background: var(--bg);
    color: var(--text);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid var(--border);
    transition: all var(--transition-fast);
}

.btn-secondary.btn-small {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.875rem;
}

.btn-text {
    background: none;
    color: var(--text-light);
    padding: var(--space-sm);
    font-size: 0.875rem;
    text-decoration: underline;
}

/* ==========================================
   PROMO TIMER
   ========================================== */

.promo-timer {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    background: linear-gradient(135deg, var(--xmas-red), #c0392b);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    color: var(--white);
    margin-bottom: var(--space-md);
}

.timer-icon {
    font-size: 1.5rem;
}

.timer-text {
    display: flex;
    flex-direction: column;
    font-size: 0.875rem;
}

.timer-countdown {
    font-size: 1.25rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

/* ==========================================
   STREAK CARD
   ========================================== */

.streak-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-md);
}

.streak-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.streak-icon {
    font-size: 1.5rem;
}

.streak-title {
    font-weight: 700;
}

.streak-progress {
    display: flex;
    gap: var(--space-xs);
    margin-bottom: var(--space-sm);
}

.streak-day {
    flex: 1;
    text-align: center;
    padding: var(--space-sm) var(--space-xs);
    background: var(--bg);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.streak-day.completed {
    background: var(--success);
    color: var(--white);
}

.streak-day.bonus {
    background: linear-gradient(135deg, var(--accent), var(--accent-orange));
    color: var(--text);
    display: flex;
    flex-direction: column;
    font-weight: 700;
}

.streak-day.bonus span {
    font-size: 0.625rem;
}

.streak-hint {
    font-size: 0.875rem;
    color: var(--text-light);
    text-align: center;
}

/* ==========================================
   QUICK ACTIONS
   ========================================== */

.quick-actions {
    margin-bottom: var(--space-lg);
}

.action-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    background: var(--bg-card);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}

.action-card:active {
    transform: scale(0.98);
}

.action-card.invite {
    background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
    border: 2px solid var(--success);
}

.action-icon {
    font-size: 2rem;
}

.action-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.action-title {
    font-weight: 700;
}

.action-subtitle {
    font-size: 0.875rem;
    color: var(--text-light);
}

.action-arrow {
    font-size: 1.25rem;
    color: var(--text-muted);
}

/* ==========================================
   SECTIONS
   ========================================== */

.section {
    margin-bottom: var(--space-lg);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.section-header h2,
.section-title {
    font-size: 1.125rem;
    font-weight: 700;
}

.see-all {
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
}

/* ==========================================
   PRIZES SCROLL (Horizontal)
   ========================================== */

.prizes-scroll {
    display: flex;
    gap: var(--space-md);
    overflow-x: auto;
    padding-bottom: var(--space-sm);
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.prizes-scroll::-webkit-scrollbar {
    display: none;
}

.prize-card {
    flex-shrink: 0;
    width: 160px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    scroll-snap-align: start;
    transition: all var(--transition-fast);
    position: relative;
}

.prize-card.touchable:active {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

.prize-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.prize-card h3 {
    padding: var(--space-sm) var(--space-sm) var(--space-xs);
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.prize-points {
    padding: 0 var(--space-sm) var(--space-sm);
    font-weight: 700;
    color: var(--primary);
}

.prize-timer {
    position: absolute;
    top: 40px;
    right: var(--space-xs);
    background: rgba(0, 0, 0, 0.7);
    color: var(--white);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 0.625rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* ==========================================
   PRIZE BADGES
   ========================================== */

.prize-badge {
    position: absolute;
    top: var(--space-sm);
    left: var(--space-sm);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
}

.prize-badge.available {
    background: var(--success);
    color: var(--white);
}

.prize-badge.almost {
    background: var(--accent);
    color: var(--text);
}

.prize-badge.scarce {
    background: var(--danger);
    color: var(--white);
}

.prize-badge.far {
    background: var(--text-muted);
    color: var(--white);
}

.prize-badge.new {
    background: var(--info);
    color: var(--white);
}

.prize-badge.pulse {
    animation: pulse 1s ease-in-out infinite;
}

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

/* ==========================================
   PRIZES GRID
   ========================================== */

.prizes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

.prize-card-grid {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
    position: relative;
}

.prize-card-grid.touchable:active {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

.prize-card-grid img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.prize-info {
    padding: var(--space-sm);
}

.prize-info h3 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.stock-bar {
    height: 4px;
    background: var(--border);
    margin: var(--space-sm);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.stock-fill {
    height: 100%;
    background: var(--danger);
    border-radius: var(--radius-xl);
}

.stock-text {
    display: block;
    font-size: 0.625rem;
    color: var(--danger);
    text-align: center;
    padding-bottom: var(--space-sm);
    font-weight: 600;
}

/* ==========================================
   FILTERS
   ========================================== */

.filters-scroll {
    display: flex;
    gap: var(--space-sm);
    overflow-x: auto;
    padding-bottom: var(--space-md);
    margin-bottom: var(--space-md);
    -webkit-overflow-scrolling: touch;
}

.filters-scroll::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    flex-shrink: 0;
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-xl);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-light);
    transition: all var(--transition-fast);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

/* ==========================================
   SHOP CARDS
   ========================================== */

.shop-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
    position: relative;
}

.shop-card.touchable:active {
    transform: scale(1.02);
}

.shop-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.shop-badge {
    position: absolute;
    top: var(--space-sm);
    left: var(--space-sm);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
}

.shop-badge.discount {
    background: var(--danger);
    color: var(--white);
}

.shop-badge.hot {
    background: var(--accent-orange);
    color: var(--white);
}

.shop-badge.last {
    background: var(--danger);
    color: var(--white);
}

.shop-info {
    padding: var(--space-sm);
}

.shop-info h3 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.shop-prices {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.shop-prices .old-price {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.shop-prices .new-price {
    font-weight: 700;
    color: var(--danger);
}

.your-price {
    margin-top: var(--space-xs);
    padding: var(--space-xs);
    background: var(--success);
    color: var(--white);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    display: flex;
    justify-content: space-between;
}

/* ==========================================
   LEADERBOARD
   ========================================== */

.leaderboard-preview {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.leader-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    border-bottom: 1px solid var(--border);
    position: relative;
}

.leader-item:last-child {
    border-bottom: none;
}

.leader-rank {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.875rem;
    background: var(--bg);
}

.leader-item.gold .leader-rank {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: var(--white);
}

.leader-item.silver .leader-rank {
    background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
    color: var(--white);
}

.leader-item.bronze .leader-rank {
    background: linear-gradient(135deg, #CD7F32, #B87333);
    color: var(--white);
}

.leader-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.leader-name {
    flex: 1;
    font-weight: 600;
}

.leader-score {
    font-size: 0.875rem;
    color: var(--text-light);
}

.leader-item.current-user {
    background: linear-gradient(135deg, #EDE7F6, #D1C4E9);
    flex-wrap: wrap;
}

.leader-hint {
    width: 100%;
    font-size: 0.75rem;
    color: var(--primary);
    margin-top: var(--space-xs);
    padding-left: calc(28px + var(--space-sm));
}

/* ==========================================
   PROFILE
   ========================================== */

.profile-header {
    text-align: center;
    padding: var(--space-xl) var(--space-md);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    margin: calc(-1 * var(--space-md));
    margin-bottom: var(--space-lg);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.profile-avatar {
    width: 100px;
    height: 100px;
    margin: 0 auto var(--space-md);
    position: relative;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-full);
    border: 4px solid var(--white);
    object-fit: cover;
}

.avatar-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 32px;
    height: 32px;
    background: var(--accent);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    border: 3px solid var(--white);
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: var(--space-md);
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
}

.stat-label {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* ==========================================
   ACHIEVEMENTS
   ========================================== */

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
}

.achievement {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-md);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    opacity: 0.5;
    filter: grayscale(1);
}

.achievement.earned {
    opacity: 1;
    filter: none;
    background: linear-gradient(135deg, #FFF9E6, #FFF3CD);
    border: 2px solid var(--accent);
}

.achievement-icon {
    font-size: 2rem;
    margin-bottom: var(--space-xs);
}

.achievement-name {
    font-size: 0.625rem;
    font-weight: 600;
    text-align: center;
    color: var(--text-light);
}

/* ==========================================
   ORDERS
   ========================================== */

.orders-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.order-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    background: var(--bg-card);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.order-item img {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.order-info {
    flex: 1;
}

.order-info h3 {
    font-size: 0.875rem;
    font-weight: 600;
}

.order-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.order-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

.order-status.delivered {
    background: #E8F5E9;
    color: var(--success);
}

.order-status.shipping {
    background: #FFF3E0;
    color: var(--accent-orange);
}

/* ==========================================
   SETTINGS
   ========================================== */

.settings-list {
    display: flex;
    flex-direction: column;
}

.setting-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    border-bottom: 1px solid var(--border);
}

.setting-icon {
    font-size: 1.25rem;
}

.setting-name {
    flex: 1;
    font-weight: 600;
}

.setting-arrow {
    color: var(--text-muted);
}

/* ==========================================
   BOTTOM NAVIGATION
   ========================================== */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    display: flex;
    background: var(--bg-card);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    z-index: 100;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-sm) 0;
    gap: 2px;
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.nav-item.active {
    color: var(--primary);
}

.nav-icon {
    font-size: 1.5rem;
}

.nav-label {
    font-size: 0.625rem;
    font-weight: 600;
}

/* ==========================================
   ACTIVITY TOAST
   ========================================== */

.activity-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-card);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    z-index: 200;
    opacity: 0;
    transition: all var(--transition-normal);
    max-width: 90%;
}

.activity-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
}

.toast-text {
    font-size: 0.875rem;
    font-weight: 600;
}

/* ==========================================
   MODALS
   ========================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    padding: var(--space-md);
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    text-align: center;
    max-width: 340px;
    width: 100%;
    transform: scale(0.9);
    transition: all var(--transition-normal);
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

/* ==========================================
   DAILY BONUS MODAL
   ========================================== */

.bonus-modal h2 {
    font-size: 1.5rem;
    margin-bottom: var(--space-sm);
}

.bonus-modal p {
    color: var(--text-light);
    margin-bottom: var(--space-md);
}

.bonus-box {
    width: 120px;
    height: 120px;
    margin: 0 auto var(--space-lg);
    position: relative;
    cursor: pointer;
}

.box-body {
    width: 100%;
    height: 80%;
    background: linear-gradient(135deg, var(--xmas-red), #c0392b);
    border-radius: var(--radius-md);
    position: absolute;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.box-lid {
    width: 110%;
    height: 30px;
    background: linear-gradient(135deg, #E74C3C, #C0392B);
    position: absolute;
    top: 10%;
    left: -5%;
    border-radius: var(--radius-sm);
    transition: all var(--transition-normal);
    z-index: 1;
}

.box-lid::after {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    background: var(--xmas-gold);
    border-radius: var(--radius-full);
}

.bonus-box.opened .box-lid {
    transform: translateY(-50px) rotate(-30deg);
    opacity: 0;
}

.gift-icon {
    font-size: 3rem;
}

.box-glow {
    position: absolute;
    width: 150%;
    height: 150%;
    top: -25%;
    left: -25%;
    background: radial-gradient(circle, rgba(253, 203, 110, 0.4) 0%, transparent 70%);
    opacity: 0;
    animation: glow 2s ease-in-out infinite;
}

.bonus-box.opened .box-glow {
    opacity: 1;
}

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

.bonus-result {
    display: none;
    flex-direction: column;
    align-items: center;
    margin-bottom: var(--space-md);
}

.bonus-result.show {
    display: flex;
    animation: popIn var(--transition-normal);
}

@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.bonus-coins {
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent);
}

/* ==========================================
   SUCCESS MODAL
   ========================================== */

.success-modal {
    position: relative;
    overflow: hidden;
}

.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    animation: confettiFall 3s linear forwards;
}

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

.success-icon {
    font-size: 4rem;
    margin-bottom: var(--space-md);
}

.success-modal h2 {
    font-size: 1.5rem;
    margin-bottom: var(--space-sm);
}

.success-prize {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg);
    border-radius: var(--radius-md);
    margin: var(--space-lg) 0;
}

.success-prize img {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.btn-share {
    margin-bottom: var(--space-sm);
}

/* ==========================================
   PRIZE DETAIL MODAL
   ========================================== */

.prize-detail-content {
    background: var(--bg-card);
    width: 100%;
    max-width: 430px;
    height: 100%;
    max-height: 90vh;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    transition: all var(--transition-normal);
    overflow-y: auto;
}

.modal-overlay.show .prize-detail-content {
    transform: translateX(-50%) translateY(0);
}

.close-detail {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.5);
    color: var(--white);
    border-radius: var(--radius-full);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.prize-gallery {
    position: relative;
}

.gallery-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.gallery-container::-webkit-scrollbar {
    display: none;
}

.gallery-container img {
    flex-shrink: 0;
    width: 100%;
    height: 300px;
    object-fit: cover;
    scroll-snap-align: start;
}

.gallery-dots {
    position: absolute;
    bottom: var(--space-md);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--space-xs);
}

.dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-full);
}

.dot.active {
    background: var(--white);
}

.prize-detail-info {
    padding: var(--space-lg);
}

.prize-detail-info h2 {
    font-size: 1.5rem;
    margin-bottom: var(--space-xs);
}

.prize-description {
    color: var(--text-light);
    margin-bottom: var(--space-md);
}

.price-block {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.points-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.price-block .old-price {
    color: var(--text-muted);
    text-decoration: line-through;
}

.detail-progress {
    margin-bottom: var(--space-lg);
}

.progress-text {
    margin-bottom: var(--space-xs);
    font-size: 0.875rem;
}

.btn-get-prize {
    margin-bottom: var(--space-lg);
}

.social-proof {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.avatars-row {
    display: flex;
}

.avatars-row img {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    border: 2px solid var(--white);
    margin-left: -8px;
}

.avatars-row img:first-child {
    margin-left: 0;
}

.proof-text {
    font-size: 0.875rem;
    color: var(--text-light);
}

.delivery-info {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--bg);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
}

/* ==========================================
   ORDER MODAL
   ========================================== */

.order-content {
    background: var(--bg-card);
    width: 100%;
    max-width: 430px;
    height: 100%;
    max-height: 90vh;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    transition: all var(--transition-normal);
    overflow-y: auto;
    padding: var(--space-lg);
}

.modal-overlay.show .order-content {
    transform: translateX(-50%) translateY(0);
}

.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-xl);
}

.step {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--border);
    color: var(--text-muted);
    border-radius: var(--radius-full);
    font-weight: 700;
}

.step.active {
    background: var(--primary);
    color: var(--white);
}

.step.completed {
    background: var(--success);
    color: var(--white);
}

.step-line {
    width: 40px;
    height: 2px;
    background: var(--border);
}

.order-step {
    animation: fadeIn var(--transition-normal);
}

.order-step.hidden {
    display: none;
}

.order-step h2 {
    font-size: 1.25rem;
    margin-bottom: var(--space-lg);
    text-align: center;
}

.confirm-prize {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.confirm-prize img {
    width: 150px;
    height: 150px;
    border-radius: var(--radius-md);
    object-fit: cover;
    margin: 0 auto var(--space-md);
}

.confirm-prize h3 {
    font-size: 1.125rem;
}

.saved-address {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg);
    border-radius: var(--radius-md);
    border: 2px solid var(--primary);
    margin-bottom: var(--space-md);
}

.address-icon {
    font-size: 1.5rem;
}

.address-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.address-text span {
    font-size: 0.875rem;
    color: var(--text-light);
}

.divider {
    text-align: center;
    margin: var(--space-md) 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--border);
}

.divider span {
    position: relative;
    background: var(--bg-card);
    padding: 0 var(--space-md);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
    color: var(--text-light);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: var(--space-md);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.hint {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
}

.order-summary {
    background: var(--bg);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-lg);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border);
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-row .label {
    color: var(--text-light);
}

.summary-row .value {
    font-weight: 600;
    text-align: right;
    max-width: 60%;
}

.summary-row.highlight {
    margin-top: var(--space-sm);
    padding-top: var(--space-md);
    border-top: 2px solid var(--border);
}

.summary-row .free {
    color: var(--success);
    font-size: 1.125rem;
}

.btn-confirm-order {
    background: linear-gradient(135deg, var(--success), #00A884);
}

/* ==========================================
   UTILITIES
   ========================================== */

.hidden {
    display: none !important;
}

/* ==========================================
   RESPONSIVE ADJUSTMENTS
   ========================================== */

@media (max-width: 360px) {
    :root {
        --space-md: 12px;
        --space-lg: 20px;
    }

    .hero-points {
        font-size: 1.5rem;
    }

    .prize-card {
        width: 140px;
    }

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

@media (min-width: 768px) {
    .app-container {
        max-width: 430px;
        box-shadow: var(--shadow-lg);
    }

    .bottom-nav {
        border-radius: var(--radius-xl);
        margin-bottom: var(--space-md);
    }
}

/* ==========================================
   SVG NAVIGATION ICONS
   ========================================== */

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-icon svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    transition: all var(--transition-fast);
}

.nav-item.active .nav-icon svg {
    stroke-width: 2.5;
}

/* ==========================================
   LEADERBOARD SCREEN
   ========================================== */

/* Live Indicator */
.live-indicator {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    background: rgba(0, 184, 148, 0.15);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-xl);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--success);
}

.live-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: var(--radius-full);
    animation: livePulse 1.5s ease-in-out infinite;
}

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

/* My Position Card */
.my-position-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    color: var(--white);
    margin-bottom: var(--space-md);
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: var(--shadow-lg);
}

.my-position-info {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.my-rank {
    font-size: 1.25rem;
    font-weight: 800;
    min-width: 50px;
}

.my-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    border: 3px solid var(--white);
}

.my-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.my-name {
    font-weight: 700;
    font-size: 1rem;
}

.my-city {
    font-size: 0.75rem;
    opacity: 0.8;
}

.my-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-md);
}

.my-invites {
    font-size: 1.25rem;
    font-weight: 800;
}

.my-label {
    font-size: 0.625rem;
    opacity: 0.8;
}

.my-progress-hint {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
}

.my-progress-hint strong {
    color: var(--accent);
}

/* Leaderboard Activity Feed */
.leaderboard-activity {
    margin-bottom: var(--space-md);
    min-height: 20px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-xl);
    font-size: 0.875rem;
    animation: slideInFade 0.3s ease-out;
    margin-bottom: var(--space-xs);
}

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

.activity-item .activity-icon {
    font-size: 1rem;
}

.activity-item .activity-text {
    flex: 1;
}

.activity-item .activity-text strong {
    color: var(--primary);
}

/* Podium */
.podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    padding: var(--space-md) 0;
}

.podium-place {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100px;
}

.podium-place.first {
    order: 2;
}

.podium-place.second {
    order: 1;
}

.podium-place.third {
    order: 3;
}

.crown {
    font-size: 1.5rem;
    margin-bottom: var(--space-xs);
    animation: crownBounce 2s ease-in-out infinite;
}

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

.podium-avatar-wrap {
    position: relative;
    margin-bottom: var(--space-xs);
}

.podium-avatar {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    border: 3px solid var(--white);
    box-shadow: var(--shadow-md);
}

.podium-place.first .podium-avatar {
    width: 70px;
    height: 70px;
    border-color: var(--xmas-gold);
}

.online-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: var(--success);
    border-radius: var(--radius-full);
    border: 2px solid var(--white);
}

.podium-name {
    font-weight: 700;
    font-size: 0.875rem;
    margin-bottom: 2px;
}

.podium-city {
    font-size: 0.625rem;
    color: var(--text-muted);
    margin-bottom: var(--space-xs);
}

.podium-score {
    font-weight: 800;
    color: var(--primary);
    margin-bottom: var(--space-xs);
}

.podium-bar {
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    font-weight: 800;
    color: var(--white);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    padding-top: var(--space-sm);
}

.podium-bar.gold {
    height: 80px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
}

.podium-bar.silver {
    height: 60px;
    background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
}

.podium-bar.bronze {
    height: 45px;
    background: linear-gradient(135deg, #CD7F32, #B87333);
}

/* Leaderboard List */
.leaderboard-list {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.leader-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition-fast);
}

.leader-row:last-child {
    border-bottom: none;
}

.leader-row:active {
    background: var(--bg);
}

.leader-row.highlight {
    background: linear-gradient(135deg, #EDE7F6, #D1C4E9);
    animation: highlightPulse 2s ease-in-out;
}

@keyframes highlightPulse {
    0% { background: linear-gradient(135deg, #C5CAE9, #B39DDB); }
    100% { background: linear-gradient(135deg, #EDE7F6, #D1C4E9); }
}

.row-rank {
    min-width: 30px;
    font-weight: 700;
    color: var(--text-muted);
    text-align: center;
}

.row-avatar-wrap {
    position: relative;
}

.row-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
}

.row-avatar-wrap .online-dot {
    width: 10px;
    height: 10px;
    bottom: 0;
    right: 0;
}

.row-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.row-name {
    font-weight: 600;
}

.row-city {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.row-score {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.row-invites {
    font-weight: 700;
    color: var(--primary);
}

.row-label {
    font-size: 0.625rem;
    color: var(--text-muted);
}

/* Load More Button */
.btn-load-more {
    width: 100%;
    padding: var(--space-md);
    background: var(--bg-card);
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    color: var(--text-light);
    font-weight: 600;
    margin-top: var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    transition: all var(--transition-fast);
}

.btn-load-more:active {
    background: var(--bg);
    border-color: var(--primary);
    color: var(--primary);
}

.load-arrow {
    animation: bounceDown 1s ease-in-out infinite;
}

@keyframes bounceDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(3px); }
}

/* ==========================================
   REFERRAL ROAD CARD
   ========================================== */

.referral-road-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    color: var(--white);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-bottom: var(--space-md);
}

.road-header {
    margin-bottom: var(--space-lg);
    margin-top: var(--space-md);
}

.road-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xs);
}

.road-title span:first-child {
    font-size: 1rem;
    opacity: 0.9;
}

.invite-count {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--accent);
}

.road-subtitle {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* Progress Road */
.progress-road {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: var(--space-lg) 0;
    margin-bottom: var(--space-lg);
}

.road-line {
    position: absolute;
    top: calc(var(--space-lg) + 16px);
    left: 5%;
    width: 90%;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-xl);
    z-index: 0;
}

.road-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--xmas-gold));
    border-radius: var(--radius-xl);
    transition: width var(--transition-slow);
}

/* Milestones */
.milestone {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
    flex: 1;
    max-width: 55px;
    position: relative;
}

.milestone-marker {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-xs);
    font-weight: 700;
    font-size: 0.75rem;
    border: 3px solid transparent;
    transition: all var(--transition-normal);
    color: var(--white);
}

.milestone.completed .milestone-marker {
    background: var(--success);
    border-color: var(--white);
}

.milestone.current .milestone-marker {
    background: var(--accent);
    border-color: var(--white);
    transform: scale(1.2);
    color: var(--text);
}

.milestone.current .milestone-marker.pulse {
    animation: milestonePulse 1.5s ease-in-out infinite;
}

@keyframes milestonePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(253, 203, 110, 0.7); }
    50% { box-shadow: 0 0 0 8px rgba(253, 203, 110, 0); }
}

.milestone-marker.final {
    background: linear-gradient(135deg, var(--xmas-gold), var(--accent-orange));
    width: 36px;
    height: 36px;
    font-size: 1rem;
}

.milestone-icon {
    font-size: 0.875rem;
}

.milestone-number {
    font-size: 0.75rem;
    font-weight: 800;
}

.milestone-prize {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: var(--space-xs);
    border: 2px solid rgba(255, 255, 255, 0.3);
    opacity: 0.6;
}

.milestone.completed .milestone-prize {
    opacity: 1;
    border-color: var(--success);
}

.milestone.current .milestone-prize.next {
    opacity: 1;
    border-color: var(--accent);
    animation: prizeGlow 2s ease-in-out infinite;
}

@keyframes prizeGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(253, 203, 110, 0.5); }
    50% { box-shadow: 0 0 8px 4px rgba(253, 203, 110, 0.3); }
}

.milestone-prize.grand {
    width: 36px;
    height: 36px;
    border-color: var(--xmas-gold);
}

.milestone-prize img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.milestone-label {
    font-size: 0.625rem;
    opacity: 0.8;
    white-space: nowrap;
}

.milestone-reward {
    font-size: 0.5rem;
    font-weight: 700;
    opacity: 0.6;
    text-align: center;
}

.milestone.completed .milestone-reward,
.milestone.current .milestone-reward {
    opacity: 1;
}

.milestone-reward.grand {
    color: var(--xmas-gold);
    font-size: 0.625rem;
}

.milestone-hint {
    position: absolute;
    bottom: -18px;
    background: var(--accent);
    color: var(--text);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 0.5rem;
    font-weight: 700;
    white-space: nowrap;
}

/* Big Invite Button */
.btn-invite-big {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    background: linear-gradient(135deg, var(--accent), var(--accent-orange));
    color: var(--text);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-fast);
}

.btn-invite-big:active {
    transform: scale(0.98);
}

.btn-invite-icon svg {
    stroke: var(--text);
}

.btn-invite-text {
    font-size: 1.125rem;
    font-weight: 800;
}

.btn-invite-bonus {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* ==========================================
   SPECIAL GAMES SECTION
   ========================================== */

.special-games-section {
    margin-top: var(--space-lg);
}

.games-unlock-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: rgba(255,255,255,0.1);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
}

.special-games-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.game-card {
    position: relative;
    background: var(--card);
    border-radius: var(--radius-xl);
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}

.game-card.locked .game-lock-overlay {
    display: flex;
}

.game-lock-overlay {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.85);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    z-index: 10;
    backdrop-filter: blur(4px);
}

.lock-icon {
    font-size: 2rem;
}

.game-lock-overlay span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.game-header {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.game-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text);
}

.game-badge.daily {
    font-size: 0.625rem;
    color: var(--accent);
    background: rgba(108, 92, 231, 0.2);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

/* ==========================================
   3D FORTUNE WHEEL
   ========================================== */

.fortune-wheel-container {
    position: relative;
    width: 130px;
    height: 130px;
    perspective: 500px;
}

.wheel-pointer {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    color: var(--accent);
    z-index: 5;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.fortune-wheel {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transform: rotateX(15deg);
    transform-style: preserve-3d;
    box-shadow:
        0 10px 30px rgba(0,0,0,0.4),
        inset 0 0 20px rgba(255,255,255,0.1);
    background: conic-gradient(
        from 0deg,
        #FF6B6B 0deg 45deg,
        #4ECDC4 45deg 90deg,
        #45B7D1 90deg 135deg,
        #96CEB4 135deg 180deg,
        #FFEAA7 180deg 225deg,
        #DDA0DD 225deg 270deg,
        #98D8C8 270deg 315deg,
        #FFD700 315deg 360deg
    );
}

.wheel-segment {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 8px;
    font-size: 0.75rem;
    font-weight: 800;
    color: #1a1a2e;
    text-shadow: 0 1px 2px rgba(255,255,255,0.5);
    transform: rotate(calc(var(--i) * 45deg + 22.5deg));
}

.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    background: var(--card);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 2;
}

.btn-spin {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: linear-gradient(135deg, var(--accent), #8B5CF6);
    color: var(--text);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 700;
    transition: all var(--transition-fast);
}

.btn-spin:active {
    transform: scale(0.95);
}

.btn-spin:disabled {
    background: var(--card-hover);
    opacity: 0.6;
}

.wheel-status {
    font-size: 0.625rem;
    color: var(--text-muted);
    text-align: center;
}

/* ==========================================
   3D MYSTERY BOX
   ========================================== */

.mystery-box-container {
    position: relative;
    width: 100px;
    height: 100px;
    perspective: 500px;
}

.mystery-box {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transform: rotateX(-10deg) rotateY(-20deg);
    transition: transform 0.5s ease;
}

.mystery-box:hover {
    transform: rotateX(-10deg) rotateY(-30deg);
}

.box-face {
    position: absolute;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 900;
    color: rgba(255,255,255,0.3);
    border: 2px solid rgba(255,255,255,0.1);
    backface-visibility: hidden;
}

.box-face.front {
    background: linear-gradient(135deg, #6C5CE7, #8B5CF6);
    transform: translateZ(40px);
}

.box-face.back {
    background: linear-gradient(135deg, #5B4CD6, #7A4CE5);
    transform: rotateY(180deg) translateZ(40px);
}

.box-face.left {
    background: linear-gradient(135deg, #5B4CD6, #7A4CE5);
    transform: rotateY(-90deg) translateZ(40px);
}

.box-face.right {
    background: linear-gradient(135deg, #7C6CF7, #9B6CF6);
    transform: rotateY(90deg) translateZ(40px);
}

.box-face.top {
    background: linear-gradient(135deg, #8B7CF7, #AB7CF6);
    transform: rotateX(90deg) translateZ(40px);
    font-size: 2.5rem;
}

.box-face.bottom {
    background: linear-gradient(135deg, #4B3CB6, #6B4CD5);
    transform: rotateX(-90deg) translateZ(40px);
}

.box-lid {
    position: absolute;
    width: 90px;
    height: 20px;
    left: -5px;
    top: -10px;
    transform-style: preserve-3d;
    transform: translateZ(40px);
    transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: bottom center;
}

.lid-top {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #9B8CF7, #BB8CF6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    border-radius: 4px 4px 0 0;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.2);
}

.box-glow {
    position: absolute;
    width: 120%;
    height: 120%;
    left: -10%;
    top: -10%;
    background: radial-gradient(circle, rgba(108, 92, 231, 0.3) 0%, transparent 70%);
    opacity: 0;
    animation: boxGlow 2s ease-in-out infinite;
}

@keyframes boxGlow {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

/* Mystery Box Opening Animation */
.mystery-box.opening {
    animation: boxShake 0.5s ease-in-out 3;
}

@keyframes boxShake {
    0%, 100% { transform: rotateX(-10deg) rotateY(-20deg); }
    25% { transform: rotateX(-10deg) rotateY(-25deg) rotateZ(2deg); }
    75% { transform: rotateX(-10deg) rotateY(-15deg) rotateZ(-2deg); }
}

.mystery-box.opened .box-lid {
    transform: translateZ(40px) rotateX(-120deg) translateY(-60px);
}

.mystery-box.opened .box-glow {
    opacity: 1;
    animation: boxGlowBurst 0.5s ease-out forwards;
}

@keyframes boxGlowBurst {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(2); opacity: 0; }
}

.btn-open-box {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: linear-gradient(135deg, #E17055, #FDCB6E);
    color: var(--bg);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 700;
    transition: all var(--transition-fast);
}

.btn-open-box:active {
    transform: scale(0.95);
}

.btn-open-box:disabled {
    background: var(--card-hover);
    color: var(--text-muted);
    opacity: 0.6;
}

.mystery-status {
    font-size: 0.625rem;
    color: var(--text-muted);
    text-align: center;
}

/* ==========================================
   PRIZE LEVELS CATALOG
   ========================================== */

.prizes-progress-card {
    background: linear-gradient(135deg, var(--accent), #8B5CF6);
    border-radius: var(--radius-xl);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.progress-label {
    font-size: 0.75rem;
    opacity: 0.8;
}

.progress-value {
    font-size: 1rem;
    font-weight: 800;
}

.progress-bar-mini {
    height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill-mini {
    height: 100%;
    background: var(--text);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.progress-next {
    font-size: 0.75rem;
    text-align: center;
}

.progress-next strong {
    color: var(--accent-gold);
}

/* Prize Level Section */
.prize-level-section {
    margin-bottom: var(--space-lg);
}

.level-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-sm);
    padding: 0 var(--space-xs);
}

.level-badge {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    background: var(--card);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    border: 2px solid var(--success);
}

.level-badge.unlocked {
    border-color: var(--success);
}

.level-badge.unlocked .level-icon {
    color: var(--success);
}

.level-badge.bronze {
    border-color: #CD7F32;
}

.level-badge.bronze .level-icon {
    color: #CD7F32;
}

.level-badge.silver {
    border-color: #C0C0C0;
}

.level-badge.silver .level-icon {
    color: #C0C0C0;
}

.level-badge.gold {
    border-color: var(--accent-gold);
}

.level-badge.gold .level-icon {
    color: var(--accent-gold);
}

.level-badge.almost {
    border-color: var(--accent-orange);
    animation: almostPulse 2s ease-in-out infinite;
}

@keyframes almostPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(253, 203, 110, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(253, 203, 110, 0); }
}

.level-badge.platinum {
    border-color: var(--accent-gold);
    background: linear-gradient(135deg, var(--card), rgba(255, 215, 0, 0.1));
}

.level-badge.platinum .level-icon {
    font-size: 1rem;
}

.level-icon {
    font-size: 0.875rem;
    font-weight: 800;
}

.level-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.level-status {
    font-size: 0.75rem;
    color: var(--success);
    font-weight: 600;
}

.level-status.almost {
    color: var(--accent-orange);
    animation: textPulse 1.5s ease-in-out infinite;
}

@keyframes textPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.level-status.locked {
    color: var(--text-muted);
}

/* Level Prizes Scroll */
.level-prizes-scroll {
    display: flex;
    gap: var(--space-sm);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: var(--space-xs);
}

.level-prizes-scroll::-webkit-scrollbar {
    display: none;
}

/* Level Prize Card */
.level-prize-card {
    flex: 0 0 140px;
    scroll-snap-align: start;
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: var(--space-sm);
    position: relative;
    transition: all var(--transition-fast);
    border: 1px solid rgba(255,255,255,0.05);
}

.level-prize-card:active {
    transform: scale(0.98);
}

.level-prize-card.claimed {
    opacity: 0.6;
}

.level-prize-card.claimed img {
    filter: grayscale(0.5);
}

.level-prize-card.locked img {
    filter: grayscale(0.8) brightness(0.7);
}

.level-prize-card.grand {
    border: 2px solid var(--accent-gold);
    background: linear-gradient(135deg, var(--card), rgba(255, 215, 0, 0.05));
}

.level-prize-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-xs);
}

.prize-status-badge {
    position: absolute;
    top: var(--space-xs);
    left: var(--space-xs);
    font-size: 0.625rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    z-index: 2;
}

.prize-status-badge.claimed {
    background: var(--text-muted);
    color: var(--bg);
}

.prize-status-badge.available {
    background: var(--success);
    color: var(--bg);
}

.prize-status-badge.locked {
    background: rgba(0,0,0,0.7);
    color: var(--text-muted);
}

.prize-status-badge.grand {
    background: linear-gradient(135deg, var(--accent-gold), #FFA500);
    color: var(--bg);
}

.prize-stock {
    position: absolute;
    top: var(--space-xs);
    right: var(--space-xs);
    font-size: 0.5rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    z-index: 2;
}

.prize-stock.scarce {
    background: var(--danger);
    color: var(--text);
    animation: stockPulse 1s ease-in-out infinite;
}

@keyframes stockPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

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

.level-prize-info h4 {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.prize-description {
    font-size: 0.625rem;
    color: var(--text-muted);
    line-height: 1.3;
}

/* Prizes CTA */
.prizes-cta {
    padding: var(--space-md) 0;
    margin-top: var(--space-md);
}

.btn-invite-prizes {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, var(--accent), var(--accent-orange));
    color: var(--text);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 700;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-fast);
}

.btn-invite-prizes:active {
    transform: scale(0.98);
}

.cta-hint {
    font-size: 0.75rem;
    opacity: 0.8;
    font-weight: 400;
}

/* ==========================================
   UZUM-STYLE SHOP
   ========================================== */

.shop-header {
    margin-bottom: var(--space-md);
}

.shop-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.shop-header-top h1 {
    font-size: 1.5rem;
    font-weight: 800;
}

.shop-header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.cart-btn {
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card);
    border-radius: var(--radius-lg);
    color: var(--text);
}

.cart-btn svg {
    stroke: var(--text);
}

.cart-count {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    background: var(--danger);
    color: var(--text);
    font-size: 0.625rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    padding: 0 4px;
}

/* Shop Categories */
.shop-categories {
    display: flex;
    gap: var(--space-sm);
    overflow-x: auto;
    padding: var(--space-xs) 0;
    margin-bottom: var(--space-md);
    -webkit-overflow-scrolling: touch;
}

.shop-categories::-webkit-scrollbar {
    display: none;
}

.category-item {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.category-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
    border: 2px solid transparent;
}

.category-icon svg {
    stroke: var(--text-secondary);
    transition: stroke var(--transition-fast);
}

.category-item span {
    font-size: 0.6875rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.category-item.active .category-icon {
    background: rgba(108, 92, 231, 0.2);
    border-color: var(--accent);
}

.category-item.active .category-icon svg {
    stroke: var(--accent);
}

.category-item.active span {
    color: var(--accent);
    font-weight: 600;
}

/* Shop Banner */
.shop-banner {
    background: linear-gradient(135deg, #2D1B69, #6C5CE7);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    position: relative;
    overflow: hidden;
}

.banner-content {
    position: relative;
    z-index: 2;
}

.banner-tag {
    display: inline-block;
    font-size: 0.75rem;
    background: rgba(255,255,255,0.2);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-xs);
}

.shop-banner h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.shop-banner p {
    font-size: 0.8125rem;
    opacity: 0.8;
}

.banner-decoration {
    position: absolute;
    right: 10px;
    bottom: -10px;
    font-size: 4rem;
    opacity: 0.3;
    transform: rotate(15deg);
}

/* Shop Grid */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

/* Product Card */
.product-card {
    background: var(--card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255,255,255,0.05);
}

.product-card:active {
    transform: scale(0.98);
}

.product-badges {
    position: absolute;
    top: var(--space-xs);
    left: var(--space-xs);
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    z-index: 2;
}

.product-badges .badge {
    font-size: 0.5625rem;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: var(--radius-sm);
}

.badge.discount {
    background: var(--danger);
    color: var(--text);
}

.badge.hit {
    background: var(--accent-orange);
    color: var(--bg);
}

.badge.new {
    background: var(--accent);
    color: var(--text);
}

.badge.last {
    background: var(--danger);
    color: var(--text);
    animation: badgePulse 1.5s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.wishlist-btn {
    position: absolute;
    top: var(--space-xs);
    right: var(--space-xs);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5);
    border-radius: var(--radius-full);
    z-index: 2;
    transition: all var(--transition-fast);
}

.wishlist-btn svg {
    stroke: var(--text);
    transition: all var(--transition-fast);
}

.wishlist-btn.active svg {
    fill: var(--danger);
    stroke: var(--danger);
}

.wishlist-btn:active {
    transform: scale(0.9);
}

.product-card > img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.product-info {
    padding: var(--space-sm);
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.product-info h3 {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
}

.stars {
    font-size: 0.625rem;
    color: var(--accent-gold);
    letter-spacing: -1px;
}

.reviews-count {
    font-size: 0.625rem;
    color: var(--text-muted);
}

.product-prices {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px;
}

.product-prices .old-price {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.product-prices .new-price {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text);
}

.product-info .your-price {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 184, 148, 0.1);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    margin-top: 2px;
}

.product-info .your-price span {
    font-size: 0.625rem;
    color: var(--success);
}

.product-info .your-price strong {
    font-size: 0.75rem;
    color: var(--success);
}

.btn-add-cart {
    width: 100%;
    padding: var(--space-sm);
    background: var(--accent);
    color: var(--text);
    font-size: 0.8125rem;
    font-weight: 700;
    border-radius: 0;
    transition: all var(--transition-fast);
}

.btn-add-cart:active {
    opacity: 0.8;
}

.btn-add-cart.in-cart {
    background: var(--success);
}

/* Load More Button */
.btn-load-more {
    width: 100%;
    padding: var(--space-md);
    background: var(--card);
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-xl);
    transition: all var(--transition-fast);
}

.btn-load-more:active {
    transform: scale(0.98);
}
