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

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #22d3ee;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Background Animation */
.bg-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    width: 400px;
    height: 400px;
    background: var(--primary);
    filter: blur(80px);
    opacity: 0.15;
    border-radius: 50%;
    animation: move 20s infinite alternate;
}

.blob-1 {
    top: -100px;
    left: -100px;
    background: var(--primary);
}

.blob-2 {
    bottom: -100px;
    right: -100px;
    background: var(--accent);
    animation-delay: -5s;
}

@keyframes move {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(100px, 50px) scale(1.1);
    }
}

/* Glassmorphism Classes */
.glass {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Navigation */
nav {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(15, 23, 42, 0.8);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 500;
    transition: color 0.3s;
}

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

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

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-main);
}

.btn-outline:hover {
    background: var(--glass-border);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

th {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.875rem;
    text-transform: uppercase;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid var(--success);
    color: #6ee7b7;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid var(--danger);
    color: #fca5a5;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

input,
select,
textarea {
    width: 100%;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: white;
    font-family: inherit;
}

input:focus {
    outline: none;
    border-color: var(--primary);
}

/* SQL Editor Placeholder */
#editor-container {
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
    border: 1px solid var(--glass-border);
}

/* Result Table */
.result-container {
    overflow-x: auto;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1rem;
}

.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: 1fr 1fr;
}

/* Dashboard Cards */
.stat-card {
    padding: 1.5rem;
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Badge */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-pending {
    background: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
}

.badge-active {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.81rem;
}