:root {
    --primary-bg: #0f172a;
    --secondary-bg: #1e293b;
    --accent-bg: #334155;
    --primary-blue: #3b82f6;
    --secondary-blue: #1d4ed8;
    --neon-cyan: #00F5FF;
    --neon-purple: #8A2BE2;
    --neon-gold: #FFD700;
    --accent-cyan: #06b6d4;
    --accent-emerald: #10b981;
    --accent-amber: #f59e0b;
    --accent-rose: #f43f5e;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border-color: #475569;
    --glass-bg: rgba(30, 41, 59, 0.8);
    --glass-border: rgba(148, 163, 184, 0.2);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, var(--primary-bg) 0%, #1e293b 50%, #0f172a 100%);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Background Effects */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.grid-pattern {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
            linear-gradient(rgba(59, 130, 246, 0.1) 1px, transparent 1px),
            linear-gradient(90deg, rgba(59, 130, 246, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

.floating-orbs {
    position: absolute;
    width: 100%;
    height: 100%;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(1px);
    animation: float 15s infinite linear;
}

.orb:nth-child(1) {
    width: 4px;
    height: 4px;
    background: var(--primary-blue);
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.orb:nth-child(2) {
    width: 6px;
    height: 6px;
    background: var(--accent-cyan);
    top: 60%;
    left: 80%;
    animation-delay: -5s;
}

.orb:nth-child(3) {
    width: 3px;
    height: 3px;
    background: var(--accent-emerald);
    top: 80%;
    left: 20%;
    animation-delay: -10s;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

@keyframes float {
    0% { transform: translate(0, 0) scale(0.8); opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 0.8; }
    100% { transform: translate(100vw, -100vh) scale(1.2); opacity: 0; }
}

/* Warning Bar */
.warning-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(90deg, var(--accent-amber), #f97316);
    color: #000;
    text-align: center;
    padding: 12px 20px;
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 1001;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Main Container */
.main-container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    margin-top: 50px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.content-wrapper {
    padding: 1.5rem 1.5rem; /* Increased top padding slightly */
    min-height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
}

/* AI Image */
.ai-image {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
}

/* Typography */
.main-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-cyan), var(--accent-emerald));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease-in-out infinite;
    text-align: center;
    line-height: 1.0;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    color: var(--accent-emerald);
    font-weight: 600;
    text-align: center;
    margin-bottom: 0.8rem;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.description {
    font-size: clamp(0.9rem, 2vw, 1rem);
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.4;
    max-width: 600px;
    margin-bottom: 1rem;
}

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

/* Input Section */
.input-section {
    width: 100%;
    max-width: 500px;
    margin-bottom: 1rem;
}

.input-field {
    width: 100%;
    padding: 1.2rem 1.5rem;
    font-size: 1.1rem;
    background: var(--glass-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.input-field::placeholder {
    color: var(--text-muted);
}

.input-field:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
}

.action-button {
    width: 100%;
    padding: 1.2rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.action-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.action-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
}

.action-button:hover::before {
    left: 100%;
}

/* Video Section */
.video-section {
    width: 100%;
    max-width: 500px;
    margin-bottom: 1rem;
}

.ai-avatar-module {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--neon-cyan), var(--neon-purple));
    padding: 3px;
    margin-bottom: 1.2rem;
    animation: avatarGlow 2s ease-in-out infinite alternate;
}

.video-container {
    position: relative;
    width: 100%;
    height: 200px;
    background: var(--glass-bg);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.video-loading {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--secondary-bg);
    z-index: 1;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-blue);
    animation: spin 1s linear infinite;
}

.featured-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Stats Section */
.stats-section {
    width: 100%;
    max-width: 800px;
    margin-bottom: 1rem;
}

.stats-title {
    color: var(--accent-cyan);
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.8rem;
    text-shadow: 0 0 15px rgba(6, 182, 212, 0.5);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
}

.stat-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.8rem;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(59, 130, 246, 0.2);
    border-color: var(--primary-blue);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
    display: block;
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--accent-amber);
    margin-bottom: 0.5rem;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.stat-label {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Recommended Stocks Section */
.recommended-stocks-section,
.market-overview-section { /* Applied common styles for stock sections */
    width: 100%;
    max-width: 800px; /* Increased max-width for better 3-column layout */
    margin: 0 auto 1.5rem auto; /* Centered and added bottom margin */
    text-align: center;
}

.recommended-stocks-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-emerald);
    margin-bottom: 1rem;
    text-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
}


/* Stock Cards (reused for both sections) */
.stocks-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
    width: 100%; /* Take full width of parent section */
    margin: 0 auto; /* Center the grid within its parent if it doesn't fill 100% */
}

.stock-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.stock-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.2);
    border-color: var(--primary-blue);
}

.stock-symbol {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent-cyan);
    margin-bottom: 0.3rem;
}

.stock-name {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.stock-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-amber);
    margin-bottom: 0.3rem;
}

.price-change {
    font-size: 0.9rem;
    font-weight: 600;
}

.price-change.positive {
    color: var(--accent-emerald);
}

.price-change.negative {
    color: var(--accent-rose);
}

/* Footer Links */
.footer-links {
    margin-top: 0.5rem;
    text-align: center;
}

.footer-link {
    color: var(--accent-cyan);
    text-decoration: none;
    margin: 0 1rem;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--accent-amber);
    text-decoration: underline;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    max-width: 450px;
    width: 90%;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.progress-container {
    margin-bottom: 1.5rem;
}

.progress-text {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--secondary-bg);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-emerald));
    width: 0%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.stage-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-style: italic;
}

.completion-message {
    color: var(--accent-emerald);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.completion-note {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.whatsapp-button {
    background: linear-gradient(45deg, #25D366, #128C7E);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}

.whatsapp-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
}

/* Chart Container */
.chart-container {
    width: 100%;
    height: 200px;
    background: var(--secondary-bg);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--border-color);
}

.chart-title {
    color: var(--accent-cyan);
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.chart-display {
    width: 100%;
    height: 150px;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    padding: 0 10px;
}

.chart-bar {
    width: 12px;
    background: linear-gradient(to top, var(--accent-emerald), var(--accent-cyan));
    border-radius: 6px 6px 0 0;
    position: relative;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
    animation: barGrow 1.5s ease-out forwards;
}

.chart-bar:nth-child(1) { height: 60px; animation-delay: 0.1s; }
.chart-bar:nth-child(2) { height: 45px; animation-delay: 0.2s; }
.chart-bar:nth-child(3) { height: 80px; animation-delay: 0.3s; }
.chart-bar:nth-child(4) { height: 70px; animation-delay: 0.4s; }
.chart-bar:nth-child(5) { height: 90px; animation-delay: 0.5s; }

@keyframes barGrow {
    0% { height: 0; opacity: 0; }
    100% { opacity: 1; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .warning-bar {
        padding: 8px 15px;
        font-size: 0.8rem;
    }

    .main-container {
        margin: 40px 8px 15px;
        border-radius: 16px;
    }

    .content-wrapper {
        padding: 1rem 1rem; /* Adjusted top padding for small screens */
    }

    .main-title {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
        margin-bottom: 0.3rem;
    }

    .subtitle {
        font-size: clamp(0.9rem, 3vw, 1.2rem);
        margin-bottom: 0.5rem;
    }

    .description {
        font-size: clamp(0.8rem, 2.5vw, 0.95rem);
        margin-bottom: 0.8rem;
        line-height: 1.3;
    }

    .input-section {
        margin-bottom: 0.8rem;
    }

    .input-field {
        padding: 1rem 1.2rem;
        font-size: 1rem;
        margin-bottom: 0.8rem;
    }

    .action-button {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }

    .video-section {
        margin-bottom: 0.8rem;
    }

    .video-container {
        height: 180px;
    }

    .stats-section {
        margin-bottom: 0.8rem;
    }

    .stats-title {
        font-size: 1.2rem;
        margin-bottom: 0.6rem;
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.6rem;
    }

    .stat-card {
        padding: 0.6rem 0.3rem;
    }

    .stat-icon {
        font-size: 1.5rem;
        margin-bottom: 0.3rem;
    }

    .stat-value {
        font-size: 1.2rem;
        margin-bottom: 0.2rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    .recommended-stocks-section,
    .market-overview-section { /* Adjusted margin for mobile */
        margin-bottom: 1rem;
    }

    .recommended-stocks-title {
        font-size: 1.3rem;
        margin-bottom: 0.8rem;
    }

    .stocks-grid { /* Applies to both recommended and market overview */
        grid-template-columns: repeat(2, 1fr); /* Changed to 2 columns on mobile */
        gap: 0.6rem;
    }

    .stock-card {
        padding: 0.6rem 0.3rem;
    }

    .stock-symbol {
        font-size: 1.1rem;
        margin-bottom: 0.2rem;
    }

    .stock-name {
        font-size: 0.7rem;
        margin-bottom: 0.3rem;
    }

    .stock-price {
        font-size: 0.9rem;
        margin-bottom: 0.2rem;
    }

    .price-change {
        font-size: 0.75rem;
    }

    .footer-links {
        margin-top: 0.3rem;
    }

    .footer-link {
        font-size: 0.8rem;
        margin: 0 0.5rem;
    }

    .modal-content {
        padding: 1.5rem 1rem;
    }

    .ai-avatar-module {
        width: 110px;
        height: 110px;
        margin-bottom: 1rem;
    }
}

.avatar-inner-frame {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-image: url('23230﹖7x9Fk2pQ4rT1vL8mN3sZ6yW5bH0c.J4dA.gif');
    background-size: cover;
    background-position: center;
    border: 2px solid var(--cosmic-primary);
}
