:root {
    --bg-color: #030303;
    --text-color: #ffffff;
    --accent-green: #30d158;
    --accent-red: #ff453a;
    --accent-blue: #0a84ff;
    --accent-gray: #8e8e93;
    --glass-bg: rgba(28, 28, 30, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-green: rgba(48, 209, 88, 0.4);
    --shadow-red: rgba(255, 69, 58, 0.4);
}

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

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(circle at 50% -20%, #1a1a1a 0%, #030303 100%);
    color: var(--text-color);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
}

#app {
    width: 100%;
    max-width: 440px;
    height: 100%;
    position: relative;
    background: transparent;
}

/* Page Transitions */
.page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 24px;
    padding-top: max(60px, env(safe-area-inset-top));
    padding-bottom: max(120px, calc(100px + env(safe-area-inset-bottom)));
    overflow-y: auto;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    transform: scale(0.98) translateY(10px);
}

.page.active {
    opacity: 1;
    pointer-events: all;
    transform: scale(1) translateY(0);
}

/* Header */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo h1 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.icon-bulb {
    font-size: 24px;
    background: linear-gradient(135deg, #FFD60A 0%, #FF9F0A 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 5px rgba(255, 214, 10, 0.5));
}

/* Signal Component */
.signal-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 40px 0;
}

.glow-circle {
    width: 260px;
    height: 260px;
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.glow-circle::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    z-index: 1;
}

.glow-circle.neutral {
    box-shadow: 0 0 60px rgba(255, 255, 255, 0.05);
    animation: loading-pulse 2s infinite alternate ease-in-out;
}

@keyframes loading-pulse {
    0% { transform: scale(0.98); opacity: 0.4; }
    100% { transform: scale(1.02); opacity: 0.7; }
}

.loading-dots::after {
    content: '...';
    display: inline-block;
    width: 20px;
    text-align: left;
    animation: dots 2s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

.glow-circle.go {
    box-shadow: 0 0 100px var(--shadow-green);
    animation: bounce-pulse-green 4s infinite alternate ease-in-out;
}

.glow-circle.wait {
    box-shadow: 0 0 100px var(--shadow-red);
    animation: bounce-pulse-red 4s infinite alternate ease-in-out;
}

@keyframes bounce-pulse-green {
    0% { transform: scale(1); box-shadow: 0 0 60px var(--shadow-green), inset 0 0 20px var(--shadow-green); }
    100% { transform: scale(1.03); box-shadow: 0 0 120px var(--shadow-green), inset 0 0 40px var(--shadow-green); }
}

@keyframes bounce-pulse-red {
    0% { transform: scale(1); box-shadow: 0 0 60px var(--shadow-red), inset 0 0 20px var(--shadow-red); }
    100% { transform: scale(1.03); box-shadow: 0 0 120px var(--shadow-red), inset 0 0 40px var(--shadow-red); }
}

.status-text {
    text-align: center;
    z-index: 10;
}

.status-text span {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    opacity: 0.6;
    margin-bottom: 8px;
    display: block;
}

.status-text h2 {
    font-size: 44px;
    font-weight: 800;
    letter-spacing: -1px;
}

/* Cards */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.prediction-card {
    position: relative;
    overflow: hidden;
}

.prediction-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    animation: shine 6s infinite linear;
}

@keyframes shine {
    to { left: 100%; }
}

.prediction-card p {
    font-size: 17px;
    line-height: 1.5;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
}

.disclaimer-text {
    font-size: 11px;
    opacity: 0.4;
    margin-top: 12px;
    text-align: center;
    font-weight: 400;
}

/* List Items */
.win-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: rgba(255,255,255,0.03);
    border-radius: 18px;
    margin-bottom: 10px;
    transition: transform 0.2s;
}

.win-item:active { transform: scale(0.98); }

.win-info h4 { font-size: 16px; margin-bottom: 2px; }
.win-info p { font-size: 13px; opacity: 0.5; }

.win-amount {
    font-size: 17px;
    font-weight: 700;
    color: var(--accent-green);
    background: rgba(48, 209, 88, 0.1);
    padding: 6px 12px;
    border-radius: 12px;
}

/* Nav */
.bottom-nav {
    position: fixed;
    bottom: max(30px, env(safe-area-inset-bottom));
    left: 24px;
    right: 24px;
    display: flex;
    justify-content: center;
    z-index: 100;
}

.nav-btn {
    background: var(--text-color);
    color: var(--bg-color);
    border: none;
    padding: 16px 32px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-btn:hover { transform: translateY(-2px); box-shadow: 0 15px 30px rgba(0,0,0,0.5); }
.nav-btn:active { transform: scale(0.95); }

/* Switch */
.switch {
    width: 52px;
    height: 32px;
    background: #333;
    border-radius: 16px;
    position: relative;
    cursor: pointer;
    transition: 0.3s;
}

.switch::after {
    content: '';
    position: absolute;
    width: 26px;
    height: 26px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.switch.checked { background: var(--accent-green); }
.switch.checked::after { left: 23px; }

/* Legal Footer */
.legal-footer {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: auto;
    padding-top: 20px;
}

.legal-footer a {
    color: var(--accent-gray);
    font-size: 13px;
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.legal-footer a:hover { opacity: 1; }

/* Chart Mock */
.chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 100px;
    width: 100%;
}

.bar {
    flex: 1;
    background: var(--accent-blue);
    border-radius: 4px 4px 0 0;
    opacity: 0.6;
    transition: height 1s ease-out;
}

.bar.active { opacity: 1; background: var(--accent-green); }

/* Utilities */
.hidden { display: none; }

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 32px;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: var(--accent-gray);
    cursor: pointer;
    line-height: 1;
    z-index: 10;
}

.close-modal:hover {
    color: white;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
