* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background: #000;
    color: #fff;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Particle.js background */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(45deg, #0a0a0a, #1a1a2e, #16213e);
}

/* Screen Management */
.screen {
    display: none;
    min-height: 100vh;
    padding: 20px;
}

.screen.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Input Screen */
.title-container {
    text-align: center;
    margin-bottom: 40px;
}

.main-title {
    font-family: 'Orbitron', monospace;
    font-size: 4rem;
    font-weight: 900;
    background: linear-gradient(45deg, #ff0080, #00ff80, #0080ff, #ff8000);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: rainbow 3s ease-in-out infinite;
    text-shadow: 0 0 50px rgba(255, 0, 128, 0.5);
    margin-bottom: 20px;
}

@keyframes rainbow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.subtitle {
    font-size: 1.8rem;
    color: #ff6b6b;
    font-weight: 300;
    opacity: 0.9;
}

.input-container {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    align-items: center;
}

#tickerInput {
    font-size: 1.5rem;
    padding: 20px 30px;
    border: 3px solid transparent;
    border-radius: 15px;
    background: linear-gradient(45deg, #1a1a2e, #16213e) padding-box,
                linear-gradient(45deg, #ff0080, #00ff80) border-box;
    color: #fff;
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    width: 350px;
    text-align: center;
    transition: all 0.3s ease;
}

#tickerInput:focus {
    outline: none;
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255, 0, 128, 0.5);
}

.analyze-btn {
    position: relative;
    padding: 20px 40px;
    font-size: 1.5rem;
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    border: none;
    border-radius: 15px;
    background: linear-gradient(45deg, #ff0080, #ff4080);
    color: #fff;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.analyze-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 40px rgba(255, 0, 128, 0.8);
}

.btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.analyze-btn:hover .btn-glow {
    left: 100%;
}

.warning-text {
    font-size: 1.2rem;
    color: #ffeb3b;
    animation: blink 2s infinite;
    font-weight: 500;
    margin-bottom: 30px;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.5; }
}

.nav-buttons {
    display: flex;
    gap: 20px;
}

.nav-btn {
    padding: 12px 25px;
    background: linear-gradient(45deg, #0080ff, #40a0ff);
    border: none;
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    transition: all 0.3s ease;
    font-family: 'Orbitron', monospace;
}

.nav-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 128, 255, 0.5);
}

/* Loading Screen */
.loading-container {
    width: 100%;
    max-width: 1200px;
    text-align: center;
}

.scanner-line {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #00ff80, transparent);
    animation: scan 2s linear infinite;
    z-index: 1000;
}

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

.loading-title {
    font-family: 'Orbitron', monospace;
    font-size: 3rem;
    margin-bottom: 40px;
    color: #00ff80;
    text-shadow: 0 0 20px rgba(0, 255, 128, 0.5);
}

.loading-progress {
    margin-bottom: 60px;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff0080, #00ff80, #0080ff);
    border-radius: 10px;
    width: 0%;
    transition: width 0.3s ease;
    animation: pulse 1s infinite alternate;
}

@keyframes pulse {
    0% { opacity: 0.7; }
    100% { opacity: 1; }
}

.loading-text {
    font-size: 1.5rem;
    color: #ff6b6b;
    font-weight: 300;
}

.loading-messages {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.chaos-message {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.chaos-message.active {
    background: linear-gradient(45deg, #ff0080, #ff4080);
    border-color: #ff0080;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 0, 128, 0.5);
}

/* Results Screen */
.results-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.results-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.stock-symbol {
    font-family: 'Orbitron', monospace;
    font-size: 3rem;
    margin-bottom: 10px;
    color: #00ff80;
}

.stock-name {
    font-size: 1.5rem;
    opacity: 0.8;
    margin-bottom: 20px;
}

/* Crazy Go Again Button */
.go-again-btn {
    position: relative;
    padding: 15px 35px;
    font-size: 1.4rem;
    font-family: 'Orbitron', monospace;
    font-weight: 900;
    border: 3px solid transparent;
    border-radius: 20px;
    background: linear-gradient(45deg, #ff0080, #ff4080, #8b5cf6, #06d6a0) padding-box,
                linear-gradient(45deg, #ff0080, #00ff80, #0080ff, #ff8000) border-box;
    color: #fff;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    animation: crazy-pulse 2s infinite;
}

@keyframes crazy-pulse {
    0%, 100% { 
        transform: scale(1) rotate(0deg);
        box-shadow: 0 0 20px rgba(255, 0, 128, 0.5);
    }
    25% { 
        transform: scale(1.05) rotate(1deg);
        box-shadow: 0 0 30px rgba(0, 255, 128, 0.7);
    }
    50% { 
        transform: scale(1.1) rotate(0deg);
        box-shadow: 0 0 40px rgba(0, 128, 255, 0.8);
    }
    75% { 
        transform: scale(1.05) rotate(-1deg);
        box-shadow: 0 0 30px rgba(255, 128, 0, 0.7);
    }
}

.go-again-btn:hover {
    transform: scale(1.2) rotate(5deg);
    animation: crazy-shake 0.5s infinite;
    box-shadow: 0 0 50px rgba(255, 0, 255, 1);
}

@keyframes crazy-shake {
    0% { transform: scale(1.2) rotate(3deg) translateX(-2px); }
    25% { transform: scale(1.25) rotate(-2deg) translateX(2px); }
    50% { transform: scale(1.2) rotate(4deg) translateX(-1px); }
    75% { transform: scale(1.22) rotate(-3deg) translateX(1px); }
    100% { transform: scale(1.2) rotate(2deg) translateX(0px); }
}

.btn-chaos {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.4), 
        rgba(255, 0, 255, 0.3),
        transparent
    );
    transition: left 0.8s ease;
    animation: chaos-sweep 3s infinite;
}

@keyframes chaos-sweep {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: -100%; }
}

/* Summary Stats */
.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.stat-card.beats {
    background: linear-gradient(45deg, rgba(0, 255, 128, 0.1), rgba(0, 255, 128, 0.05));
    border-color: #00ff80;
}

.stat-card.misses {
    background: linear-gradient(45deg, rgba(255, 0, 128, 0.1), rgba(255, 0, 128, 0.05));
    border-color: #ff0080;
}

.stat-card.beat-rate {
    background: linear-gradient(45deg, rgba(0, 128, 255, 0.1), rgba(0, 128, 255, 0.05));
    border-color: #0080ff;
}

.stat-card.avg-move {
    background: linear-gradient(45deg, rgba(255, 128, 0, 0.1), rgba(255, 128, 0, 0.05));
    border-color: #ff8000;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.stat-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    font-family: 'Orbitron', monospace;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.8;
    font-weight: 600;
}

/* Charts */
.charts-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.chart-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chart-container h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
    color: #00ff80;
    text-align: center;
}

.chart-container canvas {
    max-height: 300px;
}

/* Streak Tracker */
.streak-tracker {
    padding: 20px 0;
}

.streak-timeline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
}

.streak-item {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.streak-item.beat {
    background: linear-gradient(45deg, #00ff80, #40ff80);
    color: #000;
    box-shadow: 0 0 15px rgba(0, 255, 128, 0.5);
}

.streak-item.miss {
    background: linear-gradient(45deg, #ff0080, #ff4080);
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 0, 128, 0.5);
}

.streak-item:hover {
    transform: scale(1.2);
    z-index: 10;
}

.streak-tooltip {
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.streak-item:hover .streak-tooltip {
    opacity: 1;
    visibility: visible;
}

.streak-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.streak-stat {
    text-align: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.streak-stat-number {
    font-size: 1.5rem;
    font-weight: bold;
    font-family: 'Orbitron', monospace;
    margin-bottom: 5px;
}

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

.current-streak {
    color: #00ff80;
}

.longest-streak {
    color: #ff8000;
}

/* Earnings Table */
.earnings-table-section {
    margin-bottom: 40px;
}

.earnings-table-section h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    text-align: center;
    color: #ff6b6b;
    font-family: 'Orbitron', monospace;
}

.table-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    overflow-x: auto;
}

.earnings-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Orbitron', monospace;
}

.earnings-table th {
    background: linear-gradient(45deg, #ff0080, #ff4080);
    color: #fff;
    padding: 15px 10px;
    text-align: center;
    font-weight: bold;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.earnings-table td {
    padding: 12px 10px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.earnings-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.beat-row {
    background: linear-gradient(90deg, rgba(0, 255, 128, 0.1), transparent);
}

.miss-row {
    background: linear-gradient(90deg, rgba(255, 0, 128, 0.1), transparent);
}

.surprise-positive {
    color: #00ff80;
    font-weight: bold;
}

.surprise-negative {
    color: #ff0080;
    font-weight: bold;
}

.move-positive {
    color: #00ff80;
    font-weight: bold;
}

.move-negative {
    color: #ff0080;
    font-weight: bold;
}

.verdict-beat {
    background: linear-gradient(45deg, #00ff80, #40ff80);
    color: #000;
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: bold;
}

.verdict-miss {
    background: linear-gradient(45deg, #ff0080, #ff4080);
    color: #fff;
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: bold;
}

/* Risk Warning */
.risk-warning {
    background: linear-gradient(45deg, #ff4444, #ff6b6b);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 40px;
    border: 2px solid #ff0000;
    animation: warning-pulse 2s infinite;
}

@keyframes warning-pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 0, 0, 0.5); }
    50% { box-shadow: 0 0 40px rgba(255, 0, 0, 0.8); }
}

.risk-warning h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    font-family: 'Orbitron', monospace;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-title {
        font-size: 3rem;
    }
    
    .input-container {
        flex-direction: column;
    }
    
    #tickerInput {
        width: 100%;
        max-width: 300px;
    }
    
    .charts-section {
        grid-template-columns: 1fr;
    }
    
    .summary-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .earnings-table {
        font-size: 0.8rem;
    }
    
    .earnings-table th,
    .earnings-table td {
        padding: 8px 5px;
    }
}