* {
    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;
}

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

.nav-buttons {
    display: flex;
    gap: 20px;
    margin-top: 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;
}

.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(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
    cursor: help;
}

.criteria-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 128, 0.2);
}

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

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

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

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

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

.verdict-icon {
    font-size: 8rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    60% { transform: translateY(-10px); }
}

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

.verdict-text.positive {
    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.5);
}

.verdict-text.negative {
    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.5);
}

.verdict-subtext {
    font-size: 1.5rem;
    opacity: 0.8;
    font-weight: 300;
}

.confidence-score {
    font-size: 2rem;
    font-weight: bold;
    padding: 15px 30px;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.market-cap-projection {
    font-size: 1.3rem;
    margin-top: 15px;
    padding: 12px 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;
}

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

.go-again-top-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-top-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%; }
}

.go-again-top-btn:active {
    transform: scale(0.95) rotate(0deg);
    animation: none;
}

.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: #00ff80;
}

.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;
}

.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: 400px;
}

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

.analysis-section h3 {
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
    color: #ff6b6b;
}

.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;
}

.criteria-result {
    position: relative;
    cursor: help;
}

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

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

.criteria-result.good {
    border-left-color: #ffeb3b;
    background: rgba(255, 235, 59, 0.1);
}

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

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

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

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

.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;
}

.analyze-again-btn {
    display: block;
    margin: 0 auto;
    padding: 15px 30px;
    font-size: 1.2rem;
    background: linear-gradient(45deg, #0080ff, #40a0ff);
    border: none;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    text-transform: uppercase;
}

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

/* 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;
    }
    
    .verdict-text {
        font-size: 2.5rem;
    }
    
    .verdict-icon {
        font-size: 5rem;
    }
    
    .criteria-grid {
        grid-template-columns: 1fr;
    }
}

/* Special Effects */
.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.glow {
    animation: glow 1s infinite alternate;
}

@keyframes glow {
    from { filter: drop-shadow(0 0 10px currentColor); }
    to { filter: drop-shadow(0 0 20px currentColor); }
}

/* Tooltip Styles */
.tooltip {
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(45deg, #1a1a2e, #16213e);
    border: 2px solid #00ff80;
    border-radius: 15px;
    padding: 20px;
    width: 320px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    line-height: 1.4;
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 10px solid transparent;
    border-top-color: #00ff80;
}

.criteria-item:hover .tooltip,
.criteria-result:hover .tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-10px);
}

.tooltip-title {
    color: #00ff80;
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tooltip-description {
    color: #fff;
    margin-bottom: 12px;
}

.tooltip-context {
    color: #ff6b6b;
    font-style: italic;
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 10px;
}

/* Responsive tooltip positioning */
@media (max-width: 768px) {
    .tooltip {
        width: 280px;
        bottom: 110%;
        font-size: 0.8rem;
        padding: 15px;
    }
}