:root {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #1e293b;
    --accent-color: #8b5cf6;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-family: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    color: white;
}

body {
    background-color: var(--bg-color);
    font-family: var(--font-family);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
    padding: 0;
}

/* Navbar */
.navbar {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo a {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: #94a3b8;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.field-inputs input {
    height: 2.5em;
    border-radius: 8px;
    border-width: 0;
    padding: 1em;
    font-size: 100%;
    color: #222;
}

.add-field-btn {
    font-size: 100%;
    cursor: pointer;
    padding: 1em;
}

.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    border-width: 0;
    font-weight: bold;
}

.section {
    line-height: 2;
    max-width: 700px;
    margin: 0 auto;
}

.btn-primary {
    background: var(--primary-color);
    color: white !important;
    font-size: 110%;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

/* Main Content */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 5rem 1rem;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.25rem;
    color: #94a3b8;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Cards */
.card {
    background: var(--secondary-color);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 2rem;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

/* Forms */
.form-container {
    max-width: 400px;
    margin: 3rem auto;
    background: var(--secondary-color);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--glass-border);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #94a3b8;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid var(--glass-border);
    background: #0f172a;
    color: white;
    outline: none;
}

.form-group input:focus {
    border-color: var(--primary-color);
}



/* Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
}

.tool-area {
    background: var(--secondary-color);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--glass-border);
}

.field-item {
    background: #0f172a;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.field-inputs {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.add-field-btn {
    width: 100%;
    margin-top: 1rem;
    background: var(--secondary-color);
    border: 1px dashed var(--glass-border);
    color: #94a3b8;
}

.add-field-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Flash Messages */
.flash-messages {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 2000;
}

.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    background: var(--primary-color);
    color: white;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Footer */
.footer {
    background: var(--secondary-color);
    border-top: 1px solid var(--glass-border);
    padding: 3rem 2rem 1rem;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-section p {
    color: #94a3b8;
    font-size: 0.9rem;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #94a3b8;
    font-size: 0.9rem;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
    text-align: center;
    color: #64748b;
    font-size: 0.8rem;
}

/* Hamburger button (hidden on desktop by default) */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
    background: transparent;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 1.5rem;
    height: 2px;
    background: #e5e7eb;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Transform lines into an "X" when open */
.nav-toggle.open span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* MOBILE STYLES */
@media (max-width: 768px) {
    .navbar .container {
        padding: 0.75rem 1rem;
    }

    .container {
        padding: 1rem;
        max-width: 100%;
    }

    .nav-links {
        position: absolute;
        top: 60px;
        /* just below the navbar */
        right: 1rem;
        background: var(--secondary-color);
        border: 1px solid var(--glass-border);
        border-radius: 0.75rem;
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        display: none;
        /* hidden by default on mobile */
        min-width: 180px;
    }

    .nav-links.nav-open {
        display: flex;
    }

    .nav-toggle {
        display: flex;
        /* show hamburger on mobile */
    }

    .dashboard-grid {
        max-width: 100%;
        grid-template-columns: 1fr;
    }
}

@media (min-width: 768px) {
    .home .dashboard-grid {
        margin-top: 4rem;
        grid-template-columns: 1fr 1fr 1fr;
    }
}