/* Custom CSS for Mag7 Stock Analyzer */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --info-color: #17a2b8;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.1)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.1)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.chart-container {
    position: relative;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

/* Navigation */
.navbar {
    backdrop-filter: blur(10px);
    background: rgba(44, 62, 80, 0.95) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link:hover {
    transform: translateY(-2px);
}

/* Cards */
.stats-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.15);
}

.strategy-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.strategy-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.15);
}

.strategy-card .card-header {
    border-radius: 15px 15px 0 0 !important;
    padding: 1.5rem;
}

.company-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
}

.company-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.15);
}

.news-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.news-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* Buttons */
.btn {
    border-radius: 25px;
    padding: 10px 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(45deg, var(--secondary-color), var(--info-color));
    border: none;
}

.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.8);
}

/* Sections */
section {
    padding: 80px 0;
}

section:nth-child(even) {
    background-color: #f8f9fa;
}

/* Company Analysis */
.company-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    margin-bottom: 15px;
}

.apple { background: linear-gradient(45deg, #000000, #333333); }
.microsoft { background: linear-gradient(45deg, #0078d4, #40e0d0); }
.google { background: linear-gradient(45deg, #4285f4, #34a853); }
.amazon { background: linear-gradient(45deg, #ff9900, #ff6600); }
.meta { background: linear-gradient(45deg, #1877f2, #42a5f5); }
.tesla { background: linear-gradient(45deg, #cc0000, #ff3333); }
.nvidia { background: linear-gradient(45deg, #76b900, #90ee90); }

/* News Section */
.news-source {
    font-size: 0.9rem;
    color: #666;
}

.news-time {
    font-size: 0.8rem;
    color: #999;
}

/* Education Section */
.education-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
}

.education-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.15);
}

.calculator-section {
    background: linear-gradient(135deg, var(--light-color), #ffffff);
    border-radius: 15px;
    padding: 30px;
    margin-top: 30px;
}

/* Charts */
.chart-wrapper {
    position: relative;
    height: 300px;
    margin: 20px 0;
}

/* Risk Assessment */
.risk-meter {
    height: 20px;
    background: linear-gradient(to right, var(--success-color), var(--warning-color), var(--danger-color));
    border-radius: 10px;
    position: relative;
    margin: 10px 0;
}

.risk-indicator {
    position: absolute;
    top: -5px;
    width: 30px;
    height: 30px;
    background: white;
    border: 3px solid var(--dark-color);
    border-radius: 50%;
    transform: translateX(-50%);
    transition: all 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        min-height: 80vh;
        padding: 50px 0;
    }
    
    .chart-container {
        height: 300px;
        margin-top: 30px;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    section {
        padding: 50px 0;
    }
    
    .strategy-card, .company-card {
        margin-bottom: 20px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Footer */
footer {
    background: var(--dark-color);
    color: white;
    padding: 40px 0;
    text-align: center;
}

footer a {
    color: var(--secondary-color);
    text-decoration: none;
}

footer a:hover {
    color: white;
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(45deg, var(--secondary-color), var(--info-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-custom {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.border-custom {
    border: 2px solid var(--secondary-color);
    border-radius: 15px;
}