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

:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-card: #1a2232;
    --bg-card-hover: #1f2937;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.3);
    --success: #22c55e;
    --warning: #eab308;
    --error: #ef4444;
    --border: #1e293b;
    --radius: 8px;
    --radius-lg: 12px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.nav-brand {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    font-size: 1.6rem;
}

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

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent-light);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

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

.btn-primary:hover {
    background: var(--accent-light);
    box-shadow: 0 0 20px var(--accent-glow);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 0.4rem 1rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent-light);
}

.btn-lg {
    padding: 0.8rem 2rem;
    font-size: 1rem;
}

.btn-full {
    width: 100%;
    padding: 0.8rem;
    font-size: 1rem;
}

/* Hero */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    padding: 6rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent), #a855f7, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 480px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* Code block */
.code-block {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.code-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ef4444; }
.dot.yellow { background: #eab308; }
.dot.green { background: #22c55e; }

.code-title {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: 0.5rem;
}

.code-content {
    padding: 1.5rem;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.85rem;
    line-height: 1.8;
    color: var(--text-secondary);
    overflow-x: auto;
}

.prompt { color: var(--accent-light); }
.output { color: var(--text-muted); }
.success { color: var(--success); }

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all 0.3s;
}

.feature-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-version {
    margin-top: 0.5rem;
    font-size: 0.75rem;
}

/* Auth pages */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: var(--bg-primary);
}

.auth-container {
    width: 100%;
    max-width: 420px;
    padding: 2rem;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header .logo-icon {
    font-size: 2.5rem;
}

.auth-header h1 {
    font-size: 1.5rem;
    margin: 0.5rem 0;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

.form-group input {
    width: 100%;
    padding: 0.7rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.auth-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.auth-footer code {
    background: var(--bg-primary);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--accent-light);
}

/* Alerts */
.alert {
    padding: 0.8rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--error);
}

/* Dashboard */
.dashboard {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem;
}

.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    font-size: 1.8rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
}

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

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

/* Badges */
.user-badge {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.user-badge.admin {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.user-badge.developer {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-light);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.user-badge.viewer {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-badge {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.active {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.status-badge.archived {
    background: rgba(100, 116, 139, 0.15);
    color: var(--text-muted);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

thead {
    background: var(--bg-secondary);
}

th, td {
    padding: 0.8rem 1.2rem;
    text-align: left;
    font-size: 0.9rem;
}

th {
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

td {
    border-top: 1px solid var(--border);
}

.projects-table {
    margin-bottom: 2rem;
}

/* Info box */
.info-box {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 1rem;
}

/* Admin section */
.admin-section {
    margin-bottom: 2rem;
}

.admin-section h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.secret-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.secret-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.secret-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    color: var(--success);
    background: rgba(34, 197, 94, 0.08);
    padding: 0.8rem 1rem;
    border-radius: var(--radius);
    border: 1px solid rgba(34, 197, 94, 0.2);
    word-break: break-all;
}

/* Error page */
.error-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.error-container {
    text-align: center;
    max-width: 500px;
    padding: 2rem;
}

.error-code {
    font-size: 6rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--error), #f97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.error-container h2 {
    margin-bottom: 1rem;
}

.error-container p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.error-container code {
    background: var(--bg-card);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    color: var(--accent-light);
}

.error-container .btn {
    margin-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr;
        padding: 3rem 1.5rem;
        gap: 2rem;
    }
    .hero h1 { font-size: 2rem; }
    .features { grid-template-columns: 1fr; padding: 2rem 1.5rem; }
    .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
    .navbar { padding: 0.8rem 1rem; }
    .nav-links { gap: 0.8rem; }
}
