:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #ec4899;
    --accent: #8b5cf6;
    --dark: #0f172a;
    --light: #f8fafc;
    --glass: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --radius: 16px;
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.2);
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: radial-gradient(circle at top left, #a78bfa, transparent 40%),
        radial-gradient(circle at bottom right, #f472b6, transparent 40%),
        #f1f5f9;
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.6;
}

/* Glassmorphism Utilities */
.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.ring-offset {
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.5);
    border-color: var(--primary);
}

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

/* Typography */
h1,
h2,
h3 {
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--dark);
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 99px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    text-decoration: none;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: white;
    color: var(--text-main);
    border: 1px solid var(--text-muted);
}

.btn-secondary:hover {
    background: var(--light);
}

.btn-danger {
    background: #ffeff0;
    color: var(--danger);
}

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

/* Inputs */
.input-field,
.api-select,
input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    background: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    margin-bottom: 1rem;
    transition: border-color 0.2s;
}

.input-field:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Auth Pages */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
}

/* Dashboard */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    background: white;
    padding: 1.5rem 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    border: 1px solid transparent;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.project-card h3 {
    margin-bottom: 0.5rem;
    color: var(--dark);
}

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

.card-actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: flex-end;
}

/* Builder UI */
.builder-layout {
    display: flex;
    height: calc(100vh - 4rem);
    gap: 1.5rem;
    margin-top: 1rem;
}

.sidebar {
    width: 250px;
    display: flex;
    flex-direction: column;
}

.canvas-area {
    flex: 1;
    position: relative;
    overflow: auto;
    background: rgba(255, 255, 255, 0.5);
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius);
    padding: 2rem;
}

.model-node {
    background: white;
    width: 300px;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.model-header {
    background: linear-gradient(to right, var(--primary), var(--accent));
    padding: 1rem;
    color: white;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.model-fields {
    padding: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.field-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.field-name {
    font-weight: 600;
    color: var(--dark);
}

.field-type {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
}

.badge-req {
    color: var(--danger);
    font-weight: bold;
    margin-left: 4px;
}

.model-footer {
    background: #f8fafc;
    padding: 0.75rem;
    border-top: 1px solid #e2e8f0;
}

.api-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.api-select {
    width: auto;
    margin-bottom: 0;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    width: 100%;
    max-width: 500px;
    animation: scaleIn 0.2s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    margin-top: 4rem;
    font-size: 1.2rem;
}

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

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
}

.btn-icon:hover {
    color: white;
}

.text-danger:hover {
    color: #fee2e2;
}

/* Landing Page Sections */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.section-title p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.how-it-works {
    padding: 6rem 2rem;
    background: white;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.step-card {
    text-align: center;
    padding: 2rem;
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 auto 1.5rem;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

.tech-stack {
    padding: 6rem 2rem;
    background: var(--light);
    text-align: center;
}

.tech-badges {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 3rem;
}

.tech-badge {
    background: white;
    padding: 1rem 2rem;
    border-radius: 99px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    font-weight: 600;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer {
    background: var(--dark);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}

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