/* CSS Variables for main colors */
:root {
    --primary-color: #00c8ff;
    --secondary-color: #0066cc;
    --success-color: #00ff88;
    --danger-color: #ff6666;
    --background-dark: #0a0a0a;
    --background-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --container-radius: 20px;
    --input-radius: 12px;
    --btn-radius: 25px;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: var(--background-dark);
    color: #ffffff;
    overflow-x: hidden;
}

/* ===================
   Background & Effects
   =================== */
.tech-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}
.tech-bg video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
}
.tech-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}
.tech-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(90deg, var(--primary-color)1a 1px, transparent 1px),
        linear-gradient(var(--primary-color)1a 1px, transparent 1px);
    background-size: 50px 50px;
    animation: techGrid 20s linear infinite;
    z-index: -1;
}
@keyframes techGrid {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}
.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 1; }
    50% { transform: translateY(-100px) rotate(180deg); opacity: 0.5; }
}

/* ===================
   Layout & Containers
   =================== */
.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    position: relative;
}
.header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    width: 100%;
}
.logo {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-color)80;
    letter-spacing: 2px;
    position: relative;
    padding: 10px 30px;
}
.logo::before,
.logo::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: var(--primary-color);
    top: 50%;
    transform: translateY(-50%);
}
.logo::before { left: 0; }
.logo::after { right: 0; }

/* ===================
   Main Content
   =================== */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 20px;
}
.title {
    font-size: 42px;
    font-weight: bold;
    margin-bottom: 20px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color), #00ffcc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px var(--primary-color)4d;
    animation: glow 2s ease-in-out infinite alternate;
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
}
.title::after {
    content: 'AI STOCK ANALYSIS';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    color: var(--primary-color);
    letter-spacing: 3px;
    text-shadow: none;
    -webkit-text-fill-color: var(--primary-color);
}
@keyframes glow {
    from { text-shadow: 0 0 20px var(--primary-color)4d; }
    to { text-shadow: 0 0 40px var(--primary-color)99; }
}
.subtitle {
    font-size: 18px;
    color: #cccccc;
    margin-bottom: 60px;
    line-height: 1.8;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ===================
   Input & Buttons
   =================== */
.input-section {
    width: 100%;
    max-width: 400px;
    margin-bottom: 40px;
    position: relative;
}
.input-container {
    position: relative;
    margin-bottom: 30px;
}
.stock-input {
    width: 100%;
    padding: 18px 20px;
    padding-left: 50px;
    font-size: 18px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--primary-color)4d;
    border-radius: var(--input-radius);
    color: #ffffff;
    outline: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}
.input-container::before {
    content: '\1F50D';
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    opacity: 0.7;
}
.stock-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px var(--primary-color)66;
}
.stock-input::placeholder {
    color: #888888;
}
.stock-examples {
    position: absolute;
    bottom: -25px;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}
.stock-examples span {
    margin: 0 5px;
    cursor: pointer;
    color: var(--primary-color);
}
.stock-examples span:hover {
    text-decoration: underline;
}
.analyze-btn {
    width: 100%;
    padding: 18px 20px;
    font-size: 18px;
    font-weight: bold;
    color: #ffffff;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: var(--input-radius);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    animation: breathe 2s ease-in-out infinite;
}
@keyframes breathe {
    0%, 100% { box-shadow: 0 0 20px var(--primary-color)66; }
    50% { box-shadow: 0 0 40px var(--primary-color)cc; }
}
.analyze-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--primary-color)99;
}
.analyze-btn:active {
    transform: translateY(0);
}

/* ===================
   Modal & Analysis
   =================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--background-gradient);
    padding: 40px;
    border-radius: var(--container-radius);
    text-align: center;
    max-width: 500px;
    width: 90%;
    border: 1px solid var(--primary-color)4d;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}
.analyzing {
    margin: 30px 0;
}
.progress-container {
    width: 100%;
    margin: 20px 0;
}
.progress-step {
    display: flex;
    align-items: center;
    margin: 15px 0;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}
.progress-step.active {
    opacity: 1;
}
.progress-icon {
    width: 30px;
    height: 30px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    position: relative;
}
.progress-icon.done {
    background: var(--primary-color);
}
.progress-icon.done::after {
    content: '\2713';
    color: #fff;
}
.progress-text {
    flex: 1;
    font-size: 14px;
    color: #fff;
}
.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--primary-color)33;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 10px;
}
.progress-bar-fill {
    height: 100%;
    background: var(--primary-color);
    width: 0;
    transition: width 0.3s ease;
}
.result {
    display: none;
}
.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}
.result-label {
    font-weight: bold;
    color: #cccccc;
}
.result-value {
    font-weight: bold;
    color: var(--primary-color);
}
.result-value.positive {
    color: var(--success-color);
}
.result-value.negative {
    color: var(--danger-color);
}
.line-prompt {
    margin-top: 30px;
    padding: 20px;
    background: var(--primary-color)1a;
    border-radius: 15px;
    border: 1px solid var(--primary-color)4d;
}
.line-btn {
    margin-top: 15px;
    padding: 12px 30px;
    background: #00c851;
    color: white;
    border: none;
    border-radius: var(--btn-radius);
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}
.line-btn:hover {
    background: #00a844;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 200, 81, 0.4);
}
.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: #cccccc;
    font-size: 24px;
    cursor: pointer;
    transition: color 0.3s ease;
}
.close-btn:hover {
    color: #ffffff;
}

/* ===================
   Responsive Design
   =================== */
@media (max-width: 768px) {
    .title {
        font-size: 36px;
    }
    .subtitle {
        font-size: 16px;
    }
    .modal-content {
        padding: 30px 20px;
    }
}
