@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;700&display=swap');

:root {
    --bg-dark: #050505;
    --bg-darker: #000000;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #6366f1;
    /* Indigo */
    --accent-hover: #4f46e5;
    --accent-secondary: #a855f7;
    /* Purple */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --gradient-glow: linear-gradient(135deg, rgba(99, 102, 241, 0.4) 0%, rgba(168, 85, 247, 0.4) 100%);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
span,
div {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

body.dark-theme,
html {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    position: relative;
    overscroll-behavior-x: none;
}

/* Base utilities & backgrounds */
.ambient-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    top: -200px;
    left: -200px;
    z-index: -1;
    pointer-events: none;
}

.ambient-glow.right {
    background: radial-gradient(circle, rgba(168, 85, 247, 0.1) 0%, rgba(0, 0, 0, 0) 70%);
    top: 200px;
    left: auto;
    right: -200px;
}

/* Glassmorphism utilities */
.glass-effect {
    background: rgba(10, 10, 12, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

.glass-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.glass-card:hover {
    transform: translateY(-10px);
    border-color: rgba(168, 85, 247, 0.4);
    box-shadow: 0 15px 40px -5px rgba(168, 85, 247, 0.15);
}

/* Typography Enhancements */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1.2rem 0;
}

.nav-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.5px;
}

.logo i {
    color: var(--accent);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--text-main);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.8rem;
    color: var(--text-main);
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0.5rem;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.75rem;
    border-radius: 99px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white !important;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 25px rgba(168, 85, 247, 0.5);
    transform: translateY(-2px);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main) !important;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-main);
}

/* Layout Utilities */
.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 4rem;
    align-items: center;
    min-height: 75vh;
    padding-bottom: 4rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
}

.footer-grid {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 4rem;
}

/* Animations for premium feel */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-up {
    animation: fadeInUp 0.8s ease backwards;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.3s;
}

.delay-3 {
    animation-delay: 0.5s;
}

/* Responsive details */
@media (max-width: 992px) {
    .nav-container {
        padding: 0 1.5rem;
        position: relative;
    }

    .mobile-menu-btn {
        display: flex;
        position: absolute;
        right: 1.5rem;
        top: 50%;
        transform: translateY(-50%);
        z-index: 10000 !important;
    }

    .hero-grid,
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding-top: 0rem;
    }

    /* Dezactivam blur-urile ambientale pe mobil pt ca depaseau ecranul fizic stanga-dreapta */
    .ambient-glow {
        display: none !important;
    }

    /* Force all major containers to stay within viewport and add padding */
    div[style*="max-width: 1300px"] {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Center text alignments for hero */
    .hero-grid>div:first-child {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-grid .hero-actions {
        justify-content: center;
        width: 100%;
    }

    .dashboard-grid>div:first-child {
        position: static !important;
    }

    h1.text-gradient {
        font-size: 1.8rem !important;
        line-height: 1.2 !important;
        letter-spacing: -1px !important;
        white-space: normal !important;
    }

    p[style*="1.15rem"] {
        font-size: 1rem !important;
        text-align: center !important;
    }

    /* Fix the stats overlapping */
    div[style*="margin-top: -4rem"] {
        margin-top: 2rem !important;
        flex-direction: column;
        gap: 2rem !important;
        align-items: center;
    }

    .glass-card {
        max-width: 100% !important;
        overflow: hidden !important;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(10, 10, 12, 0.98);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        padding: 2rem;
        gap: 2rem;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        z-index: 9999;
        margin: 0;
    }

    .nav-links a {
        font-size: 1.4rem;
        font-weight: 700;
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
}

/* Rich Text Content Formatting */
.rich-text-content {
    color: var(--text-muted);
    line-height: 1.8;
    font-size: 1.05rem;
}

.rich-text-content p {
    margin-bottom: 1.2rem;
}

.rich-text-content h1,
.rich-text-content h2,
.rich-text-content h3,
.rich-text-content h4,
.rich-text-content h5,
.rich-text-content h6 {
    color: white;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.rich-text-content h1 { font-size: 2.2rem; }
.rich-text-content h2 { font-size: 1.8rem; }
.rich-text-content h3 { font-size: 1.5rem; }

.rich-text-content strong, 
.rich-text-content b {
    color: white;
    font-weight: 700;
}

.rich-text-content ul, 
.rich-text-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

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

.rich-text-content a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

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

.rich-text-content blockquote {
    border-left: 4px solid var(--accent);
    background: rgba(255,255,255,0.02);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 10px 10px 0;
    font-style: italic;
}

.rich-text-content pre,
.rich-text-content code {
    font-family: 'JetBrains Mono', monospace;
    background: rgba(0,0,0,0.3);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.9em;
    color: #a855f7;
}

.rich-text-content pre {
    padding: 1.5rem;
    overflow-x: auto;
    border: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.rich-text-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.5rem 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}