:root {
    --primary: #006bf5;
    --primary-dark: #0053c2;
    --secondary: #1a1a1a;
    --bg-body: #ffffff;
    --bg-light: #f4f6f8;
    --text-main: #222222;
    --text-muted: #666666;
    --accent: #00e5ff;
    --success: #27ae60;
    --danger: #e74c3c;
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background: var(--bg-body);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 15px 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Brand */
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--secondary);
}

.brand-icon {
    color: var(--primary);
    font-size: 1.4rem;
}

.brand-text {
    letter-spacing: -0.5px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Buttons & Icons */
.btn {
    padding: 14px 30px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 5px 15px rgba(0, 107, 245, 0.2);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 107, 245, 0.3);
}

.btn-secondary {
    background: white;
    color: var(--secondary);
    border: 1px solid #e1e4e8;
}

.btn-secondary:hover {
    border-color: var(--secondary);
    background: #fafafa;
}

.btn-nav {
    background: var(--secondary);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-nav:hover {
    background: var(--primary);
    transform: translateY(-1px);
}

/* Flags IMG */
.lang-switch {
    display: flex;
    gap: 10px;
    align-items: center;
}

.flag-img {
    width: 25px;
    height: 25px;
    object-fit: cover;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: block;
}

.lang-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 2px;
    opacity: 0.6;
    transition: all 0.2s;
}

.lang-btn:hover,
.lang-btn.active {
    opacity: 1;
    transform: scale(1.15);
    filter: brightness(1.1);
}

/* Hero */
.hero {
    padding: 160px 0 100px;
    text-align: center;
    background: radial-gradient(circle at top, rgba(0, 107, 245, 0.03), transparent 60%);
}

.badge-new {
    background: #eef4ff;
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
    border: 1px solid rgba(0, 107, 245, 0.1);
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 25px;
    color: var(--secondary);
    letter-spacing: -1.5px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 40px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Sections */
.section {
    padding: 100px 0;
}

.bg-light {
    background: var(--bg-light);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 15px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Cards & Grid */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: white;
    padding: 40px;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    transition: all 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
}

.icon-box {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 25px;
}

.icon-box.red {
    background: #fee2e2;
    color: var(--danger);
}

.icon-box.blue {
    background: #eef4ff;
    color: var(--primary);
}

.icon-box.green {
    background: #d1fae5;
    color: var(--success);
}

.card h3 {
    margin-bottom: 12px;
    font-size: 1.3rem;
}

.check-list {
    list-style: none;
    margin-top: 20px;
}

.check-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    color: var(--text-muted);
}

.check-list i {
    color: var(--success);
}

/* Comparison Table */
.comparison-wrapper {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    padding: 40px;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
}

.comparison-table th {
    text-align: left;
    padding: 20px;
    color: var(--text-muted);
    font-weight: 500;
    border-bottom: 2px solid #edf2f7;
}

.comparison-table td {
    padding: 20px;
    border-bottom: 1px solid #edf2f7;
    color: var(--text-main);
    font-size: 1.05rem;
}

.col-highlight {
    color: var(--primary);
    font-weight: 700;
    background: #f8fbff;
    border-radius: 12px 12px 0 0;
}

.cell-good {
    color: var(--success);
    font-weight: 600;
}

.cell-bad {
    color: var(--text-muted);
    opacity: 0.7;
}

/* Architecture Section (Light Theme) */
.arch-section {
    background: white;
    padding: 100px 0;
    color: var(--text-main);
    border-top: 1px solid #edf2f7;
}

.arch-section h2 {
    color: var(--secondary) !important;
}

.line.purple {
    background: var(--primary);
    width: 60px;
    height: 4px;
    margin: 15px auto 0;
    border-radius: 2px;
}

.arch-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-top: 60px;
}

.arch-content h3 {
    font-size: 1.5rem;
    color: var(--secondary);
    margin-bottom: 20px;
}

.arch-content p {
    color: var(--text-muted);
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.arch-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.arch-icon {
    width: 60px;
    height: 60px;
    background: #f0f7ff;
    color: var(--primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 107, 245, 0.1);
}

.arch-item h4 {
    font-size: 1.15rem;
    margin-bottom: 5px;
    color: var(--secondary);
    font-weight: 600;
}

.arch-item p {
    margin-bottom: 0;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.arch-img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    border: 1px solid #edf2f7;
}

/* Demo & Terminal */
.demo-section {
    background: #111;
    color: white;
    padding: 100px 0;
}

.demo-section h2,
.demo-section p {
    color: white !important;
}

.badge-demo {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    display: inline-block;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.demo-container {
    display: flex;
    gap: 40px;
    margin-top: 50px;
    align-items: stretch;
}

.terminal-window {
    flex: 1;
    background: #1e1e1e;
    border-radius: 12px;
    border: 1px solid #333;
    font-family: var(--font-mono);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.terminal-header {
    background: #252526;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #333;
    font-size: 0.9rem;
}

.terminal-body {
    padding: 25px;
    height: 500px;
    overflow-y: auto;
    font-size: 0.95rem;
    color: #ddd;
    flex: 1;
}

.terminal-controls {
    padding: 15px;
    background: #222;
    border-top: 1px solid #333;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.btn-control {
    height: 44px;
    min-width: 44px;
    border-radius: 22px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: 0.2s;
    font-size: 1rem;
}

.btn-control.primary {
    background: var(--primary);
    color: white;
    padding: 0 25px;
    gap: 8px;
}

.btn-control.secondary {
    background: #333;
    color: #aaa;
    width: 44px;
}

.btn-control:hover {
    filter: brightness(1.2);
}

.step-entry {
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid var(--primary);
}

.command {
    font-family: var(--font-mono);
    color: #fff;
    display: block;
    margin-bottom: 8px;
}

.prompt {
    color: var(--primary);
    margin-right: 8px;
}

.output {
    color: #aaa;
    white-space: pre-wrap;
    line-height: 1.5;
    font-size: 0.9rem;
}

.visual-state {
    flex: 1;
    background: #1e1e1e;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #333;
    font-family: var(--font-mono);
}

.state-header {
    color: #888;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.state-header.secure {
    color: #2ecc71;
    margin-top: 30px;
}

.db-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.db-table th {
    text-align: left;
    color: #666;
    padding: 12px;
    border-bottom: 1px solid #333;
}

.db-table td {
    padding: 12px;
    border-bottom: 1px solid #333;
    color: #eee;
}

.row-deleted {
    text-decoration: line-through;
    color: #e74c3c;
    opacity: 0.5;
}

.row-modified {
    color: #f1c40f;
}

.row-restored {
    color: #2ecc71;
    animation: flashGreen 1s;
}

@keyframes flashGreen {
    0% {
        background: rgba(46, 204, 113, 0.2);
    }

    100% {
        background: transparent;
    }
}

/* Contact Block */
.contact-section {
    padding: 120px 0;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
}

.big-card {
    background: linear-gradient(135deg, #006bf5, #0048a5);
    color: white;
    padding: 80px 40px;
    border-radius: 24px;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: 0 30px 60px rgba(0, 107, 245, 0.25);
    position: relative;
    overflow: hidden;
}

.big-card h2 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.big-card p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    margin-bottom: 50px;
}

.contact-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.btn-white {
    background: white;
    color: var(--primary);
    padding: 16px 40px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.btn-white:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.btn-outline-white {
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 14px 40px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    transition: all 0.3s;
}

.btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

.trust-badges {
    display: flex;
    justify-content: center;
    gap: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 30px;
    margin-top: 40px;
}

.trust-badges span {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Footer */
footer {
    background: white;
    padding: 10px 0;
    border-top: 1px solid #f0f0f0;
}

.footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    height: 100px;
    opacity: 1;
}

.copyright {
    color: #999;
    margin-left: 1px;
    font-size: 0.9rem;
}

.footer-right {
    display: flex;
    gap: 20px;
}

.footer-right a {
    color: #999;
    font-size: 1.2rem;
    transition: color 0.2s;
}

.footer-right a:hover {
    color: var(--primary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- RESPONSIVE DESIGN (MOBILE) --- */
@media (max-width: 900px) {

    /* Architecture Stacking */
    .arch-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .arch-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    /* Hero Text Size */
    .hero h1 {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        padding: 0 15px;
    }

    /* Navbar: simplified for mobile */
    .nav-content {
        flex-direction: column;
        gap: 15px;
        padding-bottom: 5px;
    }

    .nav-links {
        display: flex;
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
        padding: 0;
        margin: 0;
    }

    .nav-links li {
        margin: 0;
    }

    .nav-actions {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        margin-top: 10px;
    }

    .lang-switch {
        margin-bottom: 10px;
    }

    .brand {
        margin-bottom: 5px;
    }

    /* Demo Section Stacking */
    .demo-container {
        flex-direction: column;
    }

    .terminal-body {
        height: 350px;
    }

    /* Grid Stacking */
    .grid-3 {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }

    /* Contact Actions Stack */
    .contact-actions {
        flex-direction: column;
        align-items: center;
        width: 100%;
        padding: 0 20px;
        gap: 15px;
    }

    .btn-white,
    .btn-outline-white {
        width: 100%;
        justify-content: center;
    }

    .trust-badges {
        flex-direction: column;
        gap: 15px;
    }

    /* Footer */
    .footer-row {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }

    .copyright {
        margin: 10px 0 0 0;
        display: block;
    }

    /* Comparison Table Horizontal Scroll */
    .comparison-wrapper {
        padding: 20px;
        overflow-x: auto;
    }

    .comparison-table {
        min-width: 700px;
        /* Ensure it doesn't squash */
    }
}

@media (max-width: 480px) {
    .hero {
        padding-top: 280px;
        /* Increased from 180px to avoid Navbar overlap */
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        padding: 0 20px;
    }

    /* Modal on small screens */
    .modal-content {
        padding: 25px;
        width: 95%;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
}

.close-modal:hover {
    color: var(--danger);
}

.modal-content h2 {
    margin-bottom: 10px;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-content p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-main);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 107, 245, 0.1);
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

.btn-block {
    width: 100%;
    justify-content: center;
    margin-top: 10px;
}