/* Custom Styles for DeepEcon.ai */

:root {
    --primary-color: #0EA5E9;
    --secondary-color: #A855F7;
    --accent-color: #F59E0B;
    --text-color: #212529;
    --light-bg: #f8f9fa;
    --hero-gradient-start: #0F172A;
    --hero-gradient-end: #1E1B4B;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-color);
}

/* Full-Screen Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 100%);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

/* Animated Canvas Background */
#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

.hero-title {
    font-size: 5rem;
    font-weight: 700;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    font-size: 2.5rem;
    font-weight: 300;
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-description {
    font-size: 1.25rem;
    font-weight: 300;
    max-width: 800px;
    margin: 0 auto;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-content .btn-light {
    animation: fadeInUp 1s ease-out 0.6s both;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.hero-content .btn-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    animation: bounce 2s infinite;
    cursor: pointer;
    z-index: 3;
}

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

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

/* Navbar */
.navbar-brand {
    font-size: 1.5rem;
}

.nav-link {
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

.nav-link.active {
    color: var(--primary-color) !important;
}

/* Feature Cards */
.feature-card {
    transition: all 0.3s ease;
    border-radius: 12px;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.15) !important;
}

.feature-icon-large {
    font-size: 3rem;
}

/* Cards */
.hover-shadow {
    transition: box-shadow 0.3s ease;
}

.hover-shadow:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Content Blocks */
.content-block {
    padding: 2rem;
    background: white;
    border-radius: 12px;
    height: 100%;
    transition: all 0.3s ease;
}

.content-block:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.content-icon {
    opacity: 0.8;
}

/* Note Content Styling */
.note-content {
    line-height: 1.8;
}

.note-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.note-content h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid #dee2e6;
}

.note-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.note-content p {
    margin-bottom: 1rem;
}

.note-content ul, .note-content ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.note-content li {
    margin-bottom: 0.5rem;
}

.note-content a {
    color: var(--primary-color);
    text-decoration: none;
}

.note-content a:hover {
    text-decoration: underline;
}

/* Code Blocks - Improved Styling */
.note-content pre {
    background-color: #1e1e1e;
    border-radius: 8px;
    padding: 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.note-content code {
    font-family: 'Fira Code', 'Monaco', 'Consolas', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
    line-height: 1.6;
}

/* Inline code */
.note-content p code,
.note-content li code,
.note-content td code {
    background-color: #f0f0f0;
    color: #d73a49;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-size: 0.9em;
    border: 1px solid #e1e4e8;
}

/* Code block code */
.note-content pre code {
    background-color: transparent;
    padding: 0;
    color: #d4d4d4;
    border: none;
    display: block;
    font-size: 0.95em;
}

/* Syntax Highlighting */
.highlight {
    background-color: #1e1e1e;
    border-radius: 8px;
    padding: 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.highlight pre {
    background-color: transparent;
    padding: 0;
    margin: 0;
    color: #d4d4d4;
}

/* Syntax Highlighting Colors (VS Code Dark Theme) */
.highlight .k,   /* Keywords */
.highlight .kd,  /* Keyword Declaration */
.highlight .kn   /* Keyword Namespace */
{
    color: #569cd6;
    font-weight: bold;
}

.highlight .s,   /* String */
.highlight .s1,  /* String Single */
.highlight .s2   /* String Double */
{
    color: #ce9178;
}

.highlight .n,   /* Name */
.highlight .nx   /* Name Other */
{
    color: #9cdcfe;
}

.highlight .nf   /* Name Function */
{
    color: #dcdcaa;
}

.highlight .nc   /* Name Class */
{
    color: #4ec9b0;
}

.highlight .mi,  /* Number Integer */
.highlight .mf   /* Number Float */
{
    color: #b5cea8;
}

.highlight .c,   /* Comment */
.highlight .c1,  /* Comment Single */
.highlight .cm   /* Comment Multiline */
{
    color: #6a9955;
    font-style: italic;
}

.highlight .o    /* Operator */
{
    color: #d4d4d4;
}

.highlight .nb   /* Name Builtin */
{
    color: #4ec9b0;
}

.highlight .bp   /* Builtin Pseudo */
{
    color: #569cd6;
}

/* Language label for code blocks */
.note-content pre[class*="language-"]::before {
    content: attr(data-lang);
    position: absolute;
    top: 0;
    right: 0;
    padding: 0.25rem 0.75rem;
    background-color: #333;
    color: #d4d4d4;
    font-size: 0.75rem;
    border-bottom-left-radius: 4px;
    border-top-right-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Scrollbar for code blocks */
.note-content pre::-webkit-scrollbar,
.highlight::-webkit-scrollbar {
    height: 8px;
}

.note-content pre::-webkit-scrollbar-track,
.highlight::-webkit-scrollbar-track {
    background: #2d2d2d;
    border-radius: 4px;
}

.note-content pre::-webkit-scrollbar-thumb,
.highlight::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

.note-content pre::-webkit-scrollbar-thumb:hover,
.highlight::-webkit-scrollbar-thumb:hover {
    background: #666;
}

/* Tables */
.note-content table {
    width: 100%;
    margin-bottom: 1rem;
    border-collapse: collapse;
}

.note-content table th,
.note-content table td {
    padding: 0.75rem;
    border: 1px solid #dee2e6;
}

.note-content table thead th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* Blockquotes */
.note-content blockquote {
    padding-left: 1rem;
    border-left: 4px solid var(--primary-color);
    margin: 1rem 0;
    color: var(--secondary-color);
    font-style: italic;
}

/* Math Equations */
.katex-display {
    overflow-x: auto;
    overflow-y: hidden;
}

/* Comments Section */
.comments-section {
    margin-top: 3rem;
}

.comments-list .card {
    transition: box-shadow 0.2s;
}

.comments-list .card:hover {
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1) !important;
}

/* Footer */
footer {
    margin-top: auto;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Section Spacing */
section {
    position: relative;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .hero-title {
        font-size: 3.5rem;
    }

    .hero-subtitle {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.5rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .note-content h1 {
        font-size: 2rem;
    }

    .note-content h2 {
        font-size: 1.5rem;
    }

    .note-content h3 {
        font-size: 1.25rem;
    }

    .note-content pre,
    .highlight {
        font-size: 0.875rem;
    }

    .content-block {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }
}
