/* Modern Professional Mobile Game Design - Number Game */

/* ========== RESET & BASE ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
    overflow-x: hidden;
    overscroll-behavior-y: none; /* Prevents rubber-banding/refresh drag */
    touch-action: manipulation; /* Disables double-tap zoom */
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #F8F9FA;
    color: #1A1A1A;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-variant-numeric: tabular-nums;
    -webkit-text-size-adjust: 100%; /* Prevent font scaling on resize */
}

/* ========== COLOR VARIABLES ========== */
:root {
    /* Primary Brand Colors - Professional Purple-Blue Palette */
    --primary: #667EEA;
    --primary-dark: #5568D3;
    --primary-light: #818CF8;
    
    /* Secondary & Accent Colors */
    --secondary: #764BA2;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #3B82F6;
    
    /* Neutral Colors - Professional Gray Scale */
    --bg: #F8F9FA;
    --bg-dark: #E5E7EB;
    --bg-light: #FAFBFC;
    --white: #FFFFFF;
    --black: #1A1A1A;
    --text: #374151;
    --text-light: #6B7280;
    --text-lighter: #9CA3AF;
    --border: #E5E7EB;
    --border-light: #F3F4F6;
    
    /* Consistent Brand Gradients - All use same color family */
    --gradient-primary: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
    --gradient-secondary: linear-gradient(135deg, #764BA2 0%, #667EEA 100%);
    --gradient-success: linear-gradient(135deg, #10B981 0%, #059669 100%);
    --gradient-warning: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    --gradient-danger: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    --gradient-info: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    
    /* Consistent Shadows - Professional depth */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
    --shadow-colored: 0 10px 30px -5px rgba(102, 126, 234, 0.25);
    
    /* Enhanced Shadows for Hover States */
    --shadow-hover: 0 12px 20px -3px rgba(0, 0, 0, 0.12), 0 6px 8px -2px rgba(0, 0, 0, 0.06);
    --shadow-colored-hover: 0 15px 35px -5px rgba(102, 126, 234, 0.35);
    
    /* Spacing System - Consistent spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 12px;
    --spacing-lg: 16px;
    --spacing-xl: 20px;
    --spacing-2xl: 24px;
    
    /* Border Radius - Consistent roundness */
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
    
    /* Transition Timings - Smooth animations */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    --transition-bounce: 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ========== MOBILE CONTAINER ========== */
.mobile-container {
    max-width: 428px;
    margin: 0 auto;
    background: var(--white);
    min-height: 100vh;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.page {
    background: var(--bg);
    min-height: 100vh;
    padding-bottom: 100px;
}

/* ========== TYPOGRAPHY ========== */
h1, h2, h3, h4, h5, h6 {
    color: var(--black);
    font-weight: 700;
    letter-spacing: -0.02em;
}

h1 { font-size: 26px; line-height: 1.2; } /* Increased from 24px */
h2 { font-size: 22px; line-height: 1.3; } /* Increased from 20px */
h3 { font-size: 18px; line-height: 1.4; }
h4 { font-size: 16px; line-height: 1.4; }
h5 { font-size: 14px; line-height: 1.5; }
h6 { font-size: 12px; line-height: 1.5; }

p {
    margin-bottom: 12px;
    line-height: 1.6;
}

/* ========== HEADER ========== */
.header {
    background: var(--white);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.back-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--bg);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
}

.back-btn:hover {
    background: var(--bg-dark);
    transform: translateX(-2px);
}

.back-btn i {
    font-size: 20px;
    color: var(--text);
}

.header-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--black);
    letter-spacing: -0.01em;
}

.header-icons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--bg);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    color: var(--text);
}

.icon-btn:hover {
    background: var(--bg-dark);
    transform: translateY(-2px);
}

.icon-btn i {
    font-size: 20px;
}

.notification-badge {
    position: absolute !important;
    top: 4px !important;
    right: 4px !important;
    background: var(--gradient-danger) !important;
    color: var(--white) !important;
    min-width: 14px !important;
    height: 14px !important;
    padding: 0 2px !important;
    border-radius: 50% !important;
    font-size: 8px !important;
    font-weight: 800 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1.5px solid var(--white) !important;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.4) !important;
    z-index: 10 !important;
    line-height: 1 !important;
}

/* ========== CONTENT ========== */
.content {
    padding: 20px;
}

/* ========== BUTTONS ========== */
.btn {
    padding: 14px 24px;
    border-radius: var(--radius-lg);
    font-size: 15px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: var(--shadow-colored);
}

.btn-primary:hover {
    box-shadow: var(--shadow-colored-hover);
}

.btn-secondary {
    background: var(--bg);
    color: var(--text);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-dark);
    border-color: var(--primary);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-sm {
    padding: 10px 18px;
    font-size: 14px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
}

/* ========== CARDS ========== */
.card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all var(--transition-base);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.card-header {
    margin-bottom: 16px;
}

.card-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--black);
    margin-bottom: 4px;
}

.card-subtitle {
    font-size: 14px;
    color: var(--text-light);
}

.card-body {
    margin-bottom: 16px;
}

.card-footer {
    padding-top: 16px;
    border-top: 2px solid var(--bg);
}

/* ========== INPUTS ========== */
input, textarea, select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: inherit;
    transition: all var(--transition-base);
    background: var(--white);
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

input::placeholder, textarea::placeholder {
    color: var(--text-lighter);
}

/* ========== BADGES ========== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.badge-primary {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary);
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* ========== BOTTOM NAVIGATION ========== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 428px;
    background: var(--white);
    display: flex;
    justify-content: space-around;
    padding: 12px 0 16px;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text-light);
    font-size: 12px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.nav-item:hover {
    background: var(--bg);
    transform: translateY(-2px);
}

.nav-item.active {
    color: var(--primary);
}

.nav-item.active .nav-icon {
    color: var(--primary);
}

.nav-icon {
    font-size: 24px;
    transition: all var(--transition-base);
}

/* ========== QUICK ACTIONS ========== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.quick-action {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 16px 12px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all var(--transition-base);
}

.quick-action:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-hover);
}

.quick-action-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 8px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--white);
}

.quick-action-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
}

/* ========== TABS ========== */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
    display: none;
}

.tab {
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 700;
    background: var(--bg);
    color: var(--text);
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-base);
}

.tab:hover {
    background: var(--bg-dark);
    transform: translateY(-1px);
}

.tab.active {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: var(--shadow-colored);
}

/* ========== SECTION TITLE ========== */
.section-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--black);
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

/* ========== UTILITIES ========== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }

/* ========== ANIMATIONS ========== */
/* ========== ANIMATIONS ========== */
/* Animations disabled as per user request */
.fade-in, .slide-up, .scale-in {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
}

@keyframes fadeIn { from { opacity: 1; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 1;transform: none; } to { opacity: 1;transform: none; } }
@keyframes scaleIn { from { opacity: 1;transform: none; } to { opacity: 1;transform: none; } }

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* ========== RESPONSIVE ========== */
/* ========== RESPONSIVE & SAFE AREA ========== */
/* iPhone X+ and modern Android Safe Areas */
:root {
    --safe-top: env(safe-area-inset-top);
    --safe-bottom: env(safe-area-inset-bottom);
    --safe-left: env(safe-area-inset-left);
    --safe-right: env(safe-area-inset-right);
}

.mobile-container {
    max-width: 480px; /* Slightly wider for modern phones */
    width: 100%;
    margin: 0 auto;
    background: var(--white);
    min-height: 100vh;
    box-shadow: var(--shadow-lg);
    position: relative;
    padding-bottom: calc(80px + var(--safe-bottom)); /* Ensure content clears bottom nav */
}

/* Header Safe Area */
.header {
    padding-top: max(16px, var(--safe-top));
    padding-left: max(20px, var(--safe-left));
    padding-right: max(20px, var(--safe-right));
}

/* Bottom Nav Safe Area */
.bottom-nav {
    padding-bottom: max(16px, var(--safe-bottom));
    padding-left: var(--safe-left);
    padding-right: var(--safe-right);
    height: auto;
}

/* Breakpoint: Small Phones (SE, 5S) - < 360px */
@media (max-width: 359px) {
    .header-title { font-size: 16px; }
    .card-title { font-size: 16px; }
    .btn { padding: 12px 16px; font-size: 14px; }
    
    /* Adjust grids for tiny screens */
    .quick-actions {
        grid-template-columns: repeat(3, 1fr) !important; /* Force 3 cols instead of 4 */
    }
    
    .numbers-grid {
        grid-template-columns: repeat(3, 1fr) !important; /* In Play.vue context */
        gap: 8px !important;
    }

    .content { padding: 12px; }
}

/* Breakpoint: Standard Mobile - < 428px */
@media (max-width: 428px) {
    .mobile-container {
        max-width: 100%;
        box-shadow: none;
    }
}

/* Landscape Mode */
@media (orientation: landscape) and (max-height: 600px) {
    .mobile-container {
        min-height: auto;
    }
}

/* ========== LOADING SPINNER ========== */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spinner {
    animation: spin 1s linear infinite;
}

/* ========== PRIORITY 1 UX ENHANCEMENTS ========== */

/* Transition Utilities */
.transition-all { transition: all var(--transition-base); }
.transition-fast { transition: all var(--transition-fast); }
.transition-slow { transition: all var(--transition-slow); }
.transition-bounce { transition: all var(--transition-bounce); }

/* Elevation System */
.elevation-0 { box-shadow: none; }
.elevation-1 { box-shadow: var(--shadow-sm); }
.elevation-2 { box-shadow: var(--shadow); }
.elevation-3 { box-shadow: var(--shadow-md); }
.elevation-4 { box-shadow: var(--shadow-lg); }

/* Interactive States */
.interactive {
    cursor: pointer;
    transition: all var(--transition-base);
}

.interactive:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-hover);
}

.interactive:active {
    transform: translateY(0) scale(0.98);
}

/* Focus Glow Effect */
.focus-glow:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
}

/* Ripple Effect Container */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Skeleton Loading States */
.skeleton {
    background: linear-gradient(90deg, var(--bg) 25%, var(--bg-dark) 50%, var(--bg) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Glassmorphism Effect */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Number Typography */
.tabular-nums {
    font-variant-numeric: tabular-nums;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Selection Color */
::selection {
    background: var(--primary-light);
    color: var(--white);
}

::-moz-selection {
    background: var(--primary-light);
    color: var(--white);
}
