:root {
    /* Colors */
    --bg-dark: #06090e;
    --bg-card: rgba(10, 16, 26, 0.7);
    --bg-card-hover: rgba(15, 23, 42, 0.8);
    --color-indigo: #6366f1;
    --color-cyan: #06b6d4;
    --color-pink: #ec4899;
    --color-green: #10b981;
    --color-orange: #f59e0b;
    --color-red: #ef4444;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-dark: #1f2937;
    --border-light: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(99, 102, 241, 0.3);

    /* Typography */
    --font-sans: 'Plus Jakarta Sans', 'Inter', sans-serif;
    --font-display: 'Outfit', sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 45%),
        radial-gradient(at 100% 0%, rgba(6, 182, 212, 0.12) 0px, transparent 40%),
        radial-gradient(at 50% 100%, rgba(236, 72, 153, 0.08) 0px, transparent 45%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typography Utilities */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 800;
    line-height: 1.2;
}

.text-gradient {
    background: linear-gradient(to right, var(--color-indigo), var(--color-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-muted { color: var(--text-muted); }

/* Layout Utilities */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

.section {
    padding: 5rem 0;
}

main {
    flex: 1;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

@media (max-width: 768px) {
    .grid-3, .grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Components */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-light);
    border-radius: 1.5rem;
    padding: 2rem;
    transition: all 0.3s ease;
}

.card:hover {
    border-color: var(--border-highlight);
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.card-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.btn-primary {
    background: linear-gradient(to right, var(--color-indigo), #4f46e5);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    background: linear-gradient(to right, #4f46e5, #4338ca);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: white;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

/* Form Inputs */
.input-field {
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.75rem;
    padding: 1rem;
    color: white;
    font-family: inherit;
    font-size: 0.875rem;
    outline: none;
    transition: all 0.3s ease;
}

.input-field:focus {
    border-color: var(--color-cyan);
    box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Navigation Header */
.nav-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(6, 9, 14, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.nav-logo-icon {
    width: 2rem;
    height: 2rem;
    background: linear-gradient(to top right, var(--color-indigo), var(--color-cyan));
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 1.125rem;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

.nav-logo-text {
    font-size: 1.25rem;
    font-weight: 800;
    font-family: var(--font-display);
    color: white;
}

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

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: white;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-icon {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-menu-icon span {
    display: block;
    width: 20px;
    height: 2px;
    background-color: var(--text-main);
    transition: all 0.3s ease;
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(6, 9, 14, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .mobile-menu-btn { display: block; }
    .mobile-menu.active { display: flex; }
}

/* Footer */
.site-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: #04060a;
    padding: 3.5rem 0;
    text-align: center;
    margin-top: auto;
}

.footer-brand {
    font-size: 1.125rem;
    font-weight: 800;
    font-family: var(--font-display);
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.75rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

/* Code Blocks */
pre {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: #e5e7eb;
}

code {
    font-family: var(--font-mono);
    background: rgba(255, 255, 255, 0.1);
    padding: 0.1rem 0.3rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
}

pre code {
    background: transparent;
    padding: 0;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: rgba(10, 16, 26, 0.95);
    border: 1px solid var(--color-indigo);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 9999;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success { border-color: var(--color-green); }
.toast.error { border-color: var(--color-red); }

/* Custom utilities */
.text-center { text-align: center; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-16 { margin-bottom: 4rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.p-8 { padding: 2rem; }
.w-full { width: 100%; }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.hidden { display: none !important; }

/* Pricing specific */
.pricing-card.popular {
    border: 2px solid var(--color-indigo);
    background: #0b0f19;
    position: relative;
}
.pricing-price {
    font-size: 3rem;
    font-weight: 800;
    font-family: var(--font-display);
}
.pricing-features {
    list-style: none;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}
.pricing-features li {
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Playground specific */
.playground-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 1.5rem;
    overflow: hidden;
    background: var(--bg-card);
    min-height: 600px;
}

@media (max-width: 1024px) {
    .playground-container { grid-template-columns: 1fr; }
}

.workspace-panel {
    padding: 2rem;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
}

.trace-panel {
    padding: 2rem;
    background: rgba(0, 0, 0, 0.2);
}

.tabs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.tabs-nav {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.02);
    padding: 0.25rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tab-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted);
    transition: all 0.3s;
}

.tab-btn.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.25);
    color: white;
}

.tab-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.drop-zone {
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.01);
}

.drop-zone:hover {
    border-color: var(--color-indigo);
    background: rgba(99, 102, 241, 0.05);
}

.chat-box {
    flex: 1;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 1rem;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
    max-height: 400px;
}

.chat-bubble {
    max-width: 80%;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    font-size: 0.875rem;
}

.chat-bubble.system {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-bubble.user {
    align-self: flex-end;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: #e0e7ff;
}

.trace-step {
    display: flex;
    gap: 1rem;
    position: relative;
    margin-bottom: 1.5rem;
}

.trace-step::before {
    content: '';
    position: absolute;
    left: 0.75rem;
    top: 2rem;
    bottom: -1.5rem;
    width: 2px;
    background: rgba(255, 255, 255, 0.05);
}

.trace-step:last-child::before {
    display: none;
}

.trace-icon {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: #111827;
    border: 2px solid #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    font-weight: bold;
    z-index: 1;
    transition: all 0.3s;
}

.trace-icon.active {
    background: var(--color-green);
    border-color: var(--color-green);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
    color: white;
}

.trace-content {
    flex: 1;
}

.trace-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 0.5rem;
    padding: 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    max-height: 150px;
    overflow-y: auto;
}

/* Legal Pages */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
}

.legal-content h1 { margin-bottom: 2rem; }
.legal-content h2 { margin-top: 2.5rem; margin-bottom: 1rem; font-size: 1.5rem; }
.legal-content p { margin-bottom: 1rem; color: var(--text-muted); }
.legal-content ul { margin-bottom: 1rem; padding-left: 1.5rem; color: var(--text-muted); }
.legal-content li { margin-bottom: 0.5rem; }

/* Admin Dashboard Specific */
.admin-header {
    background: rgba(10, 16, 26, 0.9);
    border-bottom: 1px solid var(--border-light);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 1rem;
}
.stat-value {
    font-size: 2rem;
    font-weight: 800;
    font-family: var(--font-display);
    margin: 0.5rem 0;
}
.table-container {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    overflow: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.875rem;
}
th {
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.01);
}
.action-btn {
    background: none;
    border: none;
    color: var(--color-red);
    cursor: pointer;
    font-size: 0.875rem;
}
.action-btn:hover { text-decoration: underline; }
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.modal.active { display: flex; }
.modal-content {
    background: #0f172a;
    border: 1px solid var(--border-light);
    border-radius: 1rem;
    padding: 2rem;
    width: 100%;
    max-width: 400px;
}
