/* Global Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #0d1117;
    color: #c9d1d9;
    line-height: 1.6;
    min-height: 100vh;
}

/* Container and Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1 {
    margin-top: 0;
    font-size: 3.2rem;
    font-weight: 800;
    color: #64ffda;
    background: linear-gradient(90deg, #64ffda, #4fd1c5);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2.2rem;
    color: #64ffda;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

h3 {
    font-size: 1.5rem;
    color: #81e6d9;
    margin-bottom: 1rem;
    font-weight: 600;
}

p {
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
    color: #8b949e;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 6rem 0 4rem;
    background: linear-gradient(135deg, #16213e 0%, #0f3460 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(100, 255, 218, 0.1) 0%, transparent 70%);
    z-index: 0;
}

.hero-section > .container {
    position: relative;
    z-index: 1;
}

.subtitle {
    max-width: 800px;
    margin: 0 auto 2rem;
    font-size: 1.2rem;
    color: #a5b4fc;
}

/* Input Section */
.input-container {
    max-width: 700px;
    margin: 0 auto 3rem;
}

.input-wrap {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

input[type="text"] {
    flex: 1 1 360px;
    height: 60px;
    padding: 0 1.5rem;
    font-size: 18px;
    border-radius: 12px;
    border: 2px solid rgba(100, 255, 218, 0.2);
    background: rgba(15, 17, 23, 0.8);
    color: #f0f6fc;
    outline: none;
    transition: all 0.3s ease;
}

input[type="text"]:focus {
    border-color: #64ffda;
    background: rgba(15, 17, 23, 1);
    box-shadow: 0 0 0 3px rgba(100, 255, 218, 0.1);
}

input::placeholder {
    color: #484f58;
}

/* Buttons */
.btn-main {
    background: linear-gradient(90deg, #64ffda, #4fd1c5);
    color: #0d1117;
    font-size: 18px;
    font-weight: 700;
    padding: 16px 40px;
    min-width: 200px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 10px 25px -5px rgba(100, 255, 218, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: all 0.6s ease;
}

.btn-main:hover::before {
    left: 100%;
}

.btn-main:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 30px -5px rgba(100, 255, 218, 0.4);
}

.btn-main:active {
    transform: translateY(-1px);
    box-shadow: 0 10px 25px -5px rgba(100, 255, 218, 0.3);
}

.example-tickers {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    color: #8b949e;
    font-size: 0.95rem;
}

.example-btn {
    background: rgba(100, 255, 218, 0.1);
    border: 1px solid rgba(100, 255, 218, 0.2);
    color: #81e6d9;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.example-btn:hover {
    background: rgba(100, 255, 218, 0.2);
    border-color: #81e6d9;
    color: #b2f5ea;
}

/* Progress Bar */
.progress-container {
    max-width: 600px;
    margin: 0 auto;
}

.progress-rail {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 0.8rem;
    position: relative;
}

.progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #64ffda, #4fd1c5);
    transition: width 0.6s ease;
    border-radius: 999px;
    box-shadow: 0 0 15px rgba(100, 255, 218, 0.4);
}

.status {
    font-size: 1rem;
    color: #8b949e;
    text-align: center;
    transition: all 0.3s ease;
}

.status.error {
    color: #f85149;
}

/* Features Section */
.features-section {
    padding: 5rem 0;
    background: #0d1117;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: rgba(22, 33, 62, 0.5);
    border: 1px solid rgba(100, 255, 218, 0.2);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
    border-color: rgba(100, 255, 218, 0.4);
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(100, 255, 218, 0.2) 0%, rgba(79, 209, 197, 0.2) 100%);
    position: relative;
}

.feature-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="%2364ffda" viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z"/></svg>') no-repeat center center;
    background-size: contain;
}

.market-icon::before {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="%2364ffda" viewBox="0 0 24 24"><path d="M11.8 10.9c-2.27-.59-3-1.2-3-2.15 0-1.09 1.01-1.85 2.7-1.85 1.78 0 2.44.85 2.5 2.1h2.21c-.07-1.72-1.12-3.3-3.21-3.81V3h-3v2.16c-1.94.42-3.5 1.68-3.5 3.61 0 2.31 1.91 3.46 4.7 4.13 2.5.6 3 1.48 3 2.41 0 .69-.49 1.79-2.7 1.79-2.06 0-2.87-.92-2.98-2.1h-2.2c.12 2.19 1.76 3.42 3.68 3.83V21h3v-2.15c1.95-.37 3.5-1.5 3.5-3.55 0-2.84-2.43-3.81-4.7-4.4z"/></svg>');
}

.chart-icon::before {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="%2364ffda" viewBox="0 0 24 24"><path d="M3.5 18.49l6-6.01 4 4L22 6.92l-1.41-1.41-7.09 7.97-4-4L2 16.99l1.5 1.5z"/></svg>');
}

.news-icon::before {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="%2364ffda" viewBox="0 0 24 24"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zM7 10h2v7H7zm4-3h2v10h-2zm4 6h2v4h-2z"/></svg>');
}

/* Market Insights Section */
.market-insights {
    padding: 5rem 0;
    background: linear-gradient(135deg, #0d1117 0%, #16213e 100%);
}

.insights-subtitle {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
    color: #8b949e;
}

.insights-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.insights-panel {
    background: rgba(22, 33, 62, 0.6);
    border-radius: 20px;
    padding: 2.5rem;
    border: 1px solid rgba(100, 255, 218, 0.15);
    backdrop-filter: blur(10px);
}

/* Stock Cards Grid */
.stocks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.stock-card {
    background: rgba(22, 33, 62, 0.8);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(100, 255, 218, 0.2);
    transition: all 0.3s ease;
}

.stock-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    border-color: rgba(100, 255, 218, 0.4);
}

.stock-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.stock-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #64ffda;
}

.stock-change {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
}

.stock-change.positive {
    background: rgba(34, 197, 94, 0.2);
    color: #34d399;
}

.stock-change.negative {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.stock-change.neutral {
    background: rgba(148, 163, 184, 0.2);
    color: #94a3b8;
}

.stock-price {
    font-size: 1.6rem;
    font-weight: 700;
    color: #f0f6fc;
    margin-bottom: 0.5rem;
}

.stock-info {
    font-size: 0.85rem;
    color: #8b949e;
    margin-bottom: 0.5rem;
}

.stock-signal {
    font-size: 0.8rem;
    color: #64ffda;
    background: rgba(100, 255, 218, 0.1);
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
}

/* Table Styles */
.insights-table-container {
    overflow-x: auto;
    margin-top: 1.5rem;
}

.insights-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.insights-table th {
    background: rgba(100, 255, 218, 0.1);
    color: #81e6d9;
    text-align: left;
    padding: 1rem 1.2rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(100, 255, 218, 0.2);
}

.insights-table td {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #c9d1d9;
}

.insights-table tbody tr:hover {
    background: rgba(100, 255, 218, 0.05);
}

.insights-table .positive {
    color: #34d399;
    font-weight: 500;
}

.insights-table .negative {
    color: #f87171;
    font-weight: 500;
}

.insights-table .neutral {
    color: #8b949e;
}

/* Market Indicators */
.indicators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.indicator-card {
    background: rgba(22, 33, 62, 0.8);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(100, 255, 218, 0.2);
    text-align: center;
}

.indicator-title {
    font-size: 0.9rem;
    color: #8b949e;
    margin-bottom: 0.8rem;
}

.indicator-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #f0f6fc;
    margin-bottom: 0.5rem;
}

.indicator-change {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    display: inline-block;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #0f3460 0%, #16213e 100%);
    padding: 5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(100, 255, 218, 0.15) 0%, transparent 70%);
    z-index: 0;
}

.cta-section > .container {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.cta-input {
    max-width: 700px;
    margin: 2rem auto 0;
}

/* Footer */
footer {
    background: #0d1117;
    padding: 3rem 0;
    border-top: 1px solid rgba(100, 255, 218, 0.1);
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto 2rem;
}

.footer-info {
    margin-bottom: 2rem;
}

.disclaimer {
    max-width: 800px;
    margin: 0 auto 2rem;
    font-size: 0.9rem;
    color: #484f58;
    text-align: center;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: #81e6d9;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #b2f5ea;
}

.copyright {
    text-align: center;
    font-size: 0.85rem;
    color: #484f58;
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2.4rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .hero-section,
    .cta-section {
        padding: 4rem 0 3rem;
    }
    
    .features-section,
    .market-insights {
        padding: 3rem 0;
    }
    
    .input-wrap {
        align-items: stretch;
    }
    
    .btn-main {
        min-width: auto;
    }
    
    .insights-panel {
        padding: 1.5rem;
    }
    
    .stocks-grid,
    .indicators-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    input[type="text"] {
        font-size: 16px; /* Prevent iOS zoom on focus */
    }
    
    .insights-table th,
    .insights-table td {
        padding: 0.8rem 0.6rem;
        font-size: 0.85rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.features-grid > div,
.stocks-grid > div,
.indicators-grid > div {
    animation: fadeInUp 0.6s ease-out;
}

.features-grid > div:nth-child(2) {
    animation-delay: 0.2s;
}

.features-grid > div:nth-child(3) {
    animation-delay: 0.4s;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .feature-card,
    .stock-card,
    .indicator-card,
    .insights-panel {
        border: 2px solid currentColor;
    }
}