* {
    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, #2d1b69, #0f3460);
}

/* 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, #9d4edd, #c77dff, #7209b7, #f72585);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: mystic-glow 3s ease-in-out infinite;
    text-shadow: 0 0 50px rgba(157, 78, 221, 0.8);
    margin-bottom: 20px;
}

@keyframes mystic-glow {
    0% { 
        background-position: 0% 50%; 
        filter: drop-shadow(0 0 20px rgba(157, 78, 221, 0.8));
    }
    50% { 
        background-position: 100% 50%; 
        filter: drop-shadow(0 0 40px rgba(247, 37, 133, 0.8));
    }
    100% { 
        background-position: 0% 50%; 
        filter: drop-shadow(0 0 20px rgba(157, 78, 221, 0.8));
    }
}

.subtitle {
    font-size: 1.8rem;
    color: #c77dff;
    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, #9d4edd, #c77dff) 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(157, 78, 221, 0.7);
}

.predict-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, #9d4edd, #7209b7);
    color: #fff;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: mystical-pulse 2s infinite;
}

@keyframes mystical-pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(157, 78, 221, 0.5); }
    50% { box-shadow: 0 0 40px rgba(114, 9, 183, 0.8); }
}

.predict-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 60px rgba(157, 78, 221, 1);
}

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

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

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

@keyframes mystical-blink {
    0%, 70% { opacity: 1; }
    71%, 100% { opacity: 0.3; }
}

.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, #9d4edd, transparent);
    animation: mystical-scan 3s linear infinite;
    z-index: 1000;
}

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

.crystal-ball {
    font-size: 8rem;
    margin-bottom: 20px;
    animation: float-crystal 4s ease-in-out infinite;
    filter: drop-shadow(0 0 30px rgba(157, 78, 221, 0.8));
}

@keyframes float-crystal {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-20px) scale(1.1); }
}

.loading-title {
    font-family: 'Orbitron', monospace;
    font-size: 3rem;
    margin-bottom: 40px;
    color: #c77dff;
    text-shadow: 0 0 20px rgba(199, 125, 255, 0.8);
}

.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, #9d4edd, #c77dff, #7209b7);
    border-radius: 10px;
    width: 0%;
    transition: width 0.3s ease;
    animation: mystical-pulse-bar 1.5s infinite alternate;
}

@keyframes mystical-pulse-bar {
    0% { opacity: 0.7; filter: brightness(1); }
    100% { opacity: 1; filter: brightness(1.3); }
}

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

.criteria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    max-width: 1000px;
    margin: 0 auto;
}

.criteria-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(157, 78, 221, 0.3);
    border-radius: 10px;
    padding: 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.criteria-item.analyzing {
    background: linear-gradient(45deg, #9d4edd, #7209b7);
    border-color: #c77dff;
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(157, 78, 221, 0.7);
    animation: mystical-glow-item 1s infinite alternate;
}

@keyframes mystical-glow-item {
    0% { filter: brightness(1); }
    100% { filter: brightness(1.4); }
}

.criteria-item.complete {
    background: linear-gradient(45deg, #c77dff, #9d4edd);
    border-color: #c77dff;
    color: #000;
    font-weight: bold;
}

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

.prediction-section {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    backdrop-filter: blur(15px);
    border: 2px solid rgba(157, 78, 221, 0.3);
}

.prediction-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.crystal-ball-result {
    font-size: 8rem;
    animation: result-float 3s ease-in-out infinite;
    filter: drop-shadow(0 0 40px rgba(157, 78, 221, 0.9));
}

@keyframes result-float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

.prediction-text {
    font-family: 'Orbitron', monospace;
    font-size: 4rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 10px;
}

.prediction-text.beat {
    background: linear-gradient(45deg, #00ff80, #40ff80);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(0, 255, 128, 0.7);
    animation: victory-glow 2s infinite alternate;
}

.prediction-text.miss {
    background: linear-gradient(45deg, #ff0080, #ff4080);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(255, 0, 128, 0.7);
    animation: doom-glow 2s infinite alternate;
}

@keyframes victory-glow {
    0% { filter: drop-shadow(0 0 10px rgba(0, 255, 128, 0.5)); }
    100% { filter: drop-shadow(0 0 30px rgba(0, 255, 128, 1)); }
}

@keyframes doom-glow {
    0% { filter: drop-shadow(0 0 10px rgba(255, 0, 128, 0.5)); }
    100% { filter: drop-shadow(0 0 30px rgba(255, 0, 128, 1)); }
}

.prediction-subtext {
    font-size: 1.5rem;
    opacity: 0.8;
    font-weight: 300;
    color: #c77dff;
}

.confidence-score {
    font-size: 2rem;
    font-weight: bold;
    padding: 15px 30px;
    border-radius: 25px;
    background: rgba(157, 78, 221, 0.2);
    border: 2px solid rgba(199, 125, 255, 0.5);
    font-family: 'Orbitron', monospace;
}

.next-earnings-date {
    font-size: 1.3rem;
    padding: 10px 20px;
    border-radius: 15px;
    background: linear-gradient(45deg, rgba(255, 215, 0, 0.2), rgba(255, 165, 0, 0.2));
    border: 1px solid rgba(255, 215, 0, 0.5);
    color: #ffd700;
    font-weight: 600;
    font-family: 'Orbitron', monospace;
}

/* Go Again Button */
.go-again-top {
    text-align: center;
    margin-bottom: 30px;
}

.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, #9d4edd, #7209b7, #c77dff, #f72585) padding-box,
                linear-gradient(45deg, #9d4edd, #c77dff, #7209b7, #f72585) 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: mystical-chaos-pulse 2s infinite;
}

@keyframes mystical-chaos-pulse {
    0%, 100% { 
        transform: scale(1) rotate(0deg);
        box-shadow: 0 0 20px rgba(157, 78, 221, 0.5);
    }
    25% { 
        transform: scale(1.05) rotate(1deg);
        box-shadow: 0 0 30px rgba(199, 125, 255, 0.7);
    }
    50% { 
        transform: scale(1.1) rotate(0deg);
        box-shadow: 0 0 40px rgba(114, 9, 183, 0.8);
    }
    75% { 
        transform: scale(1.05) rotate(-1deg);
        box-shadow: 0 0 30px rgba(247, 37, 133, 0.7);
    }
}

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

@keyframes mystical-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(157, 78, 221, 0.3),
        transparent
    );
    animation: mystical-chaos-sweep 3s infinite;
}

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

.stock-info {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
}

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

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

.current-price {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.price {
    font-size: 3rem;
    font-weight: bold;
    font-family: 'Orbitron', monospace;
}

.change {
    font-size: 1.5rem;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: bold;
}

.change.positive {
    background: rgba(0, 255, 128, 0.2);
    color: #00ff80;
    border: 1px solid #00ff80;
}

.change.negative {
    background: rgba(255, 0, 128, 0.2);
    color: #ff0080;
    border: 1px solid #ff0080;
}

/* Chart */
.chart-section {
    margin-bottom: 40px;
}

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

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

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

/* Analysis */
.analysis-section {
    margin-bottom: 40px;
}

.analysis-section h3 {
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
    color: #c77dff;
    font-family: 'Orbitron', monospace;
}

.criteria-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.criteria-result {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    border-left: 5px solid;
    transition: transform 0.3s ease;
    position: relative;
    cursor: help;
}

.criteria-result:hover {
    transform: translateY(-5px);
}

.criteria-result.beat-signal {
    border-left-color: #00ff80;
    background: rgba(0, 255, 128, 0.1);
}

.criteria-result.miss-signal {
    border-left-color: #ff0080;
    background: rgba(255, 0, 128, 0.1);
}

.criteria-result.neutral {
    border-left-color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
}

.criteria-name {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.criteria-prediction {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 10px;
    font-family: 'Orbitron', monospace;
}

.criteria-reasoning {
    font-size: 0.9rem;
    opacity: 0.8;
    line-height: 1.4;
}

/* Accuracy Section */
.accuracy-section {
    margin-bottom: 40px;
    padding: 30px;
    background: rgba(157, 78, 221, 0.1);
    border-radius: 15px;
    border: 1px solid rgba(199, 125, 255, 0.3);
}

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

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

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

.accuracy-number {
    font-size: 2.5rem;
    font-weight: bold;
    font-family: 'Orbitron', monospace;
    color: #c77dff;
    margin-bottom: 10px;
}

.accuracy-label {
    font-size: 1rem;
    opacity: 0.8;
}

/* Risk Warning */
.risk-warning {
    background: linear-gradient(45deg, #7209b7, #9d4edd);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 40px;
    border: 2px solid #c77dff;
    animation: mystical-warning-pulse 3s infinite;
}

@keyframes mystical-warning-pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(157, 78, 221, 0.5); }
    50% { box-shadow: 0 0 40px rgba(114, 9, 183, 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;
    }
    
    .prediction-text {
        font-size: 2.5rem;
    }
    
    .crystal-ball-result,
    .crystal-ball {
        font-size: 5rem;
    }
    
    .criteria-grid {
        grid-template-columns: 1fr;
    }
}