:root {
    --bg-dark: #0f0f13;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --primary-neon: #00f2ea;
    --secondary-neon: #ff0050;
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;
    --card-radius: 16px;
    --transition: 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background Animation */
.background-globes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.globe {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: drift 10s infinite alternate;
}

.globe-1 {
    width: 300px;
    height: 300px;
    background: var(--primary-neon);
    top: -50px;
    left: -50px;
}

.globe-2 {
    width: 400px;
    height: 400px;
    background: var(--secondary-neon);
    bottom: -100px;
    right: -100px;
    animation-delay: 2s;
}

.globe-3 {
    width: 200px;
    height: 200px;
    background: #7000ff;
    top: 40%;
    left: 40%;
    animation-duration: 15s;
}

@keyframes drift {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(30px, 30px);
    }
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-neon), #7000ff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.highlight {
    color: var(--primary-neon);
}

/* Layout */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Glassmorphism Components */
.glass-nav {
    background: rgba(15, 15, 19, 0.7);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--card-radius);
    padding: 30px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: var(--transition);
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

/* Global Buttons */
.primary-btn,
.secondary-btn,
.calculate-btn,
.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: var(--font-heading);
}

.primary-btn {
    background: linear-gradient(90deg, var(--primary-neon), #00c2bb);
    color: var(--bg-dark);
}

.primary-btn:hover {
    box-shadow: 0 0 15px var(--primary-neon);
}

.secondary-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-main);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 100px 20px;
}

.badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--primary-neon);
    border: 1px solid var(--primary-neon);
    display: inline-block;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Info Section */
.info-section {
    padding: 50px 0;
}

.bad-ingredients {
    margin-top: 20px;
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: 12px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0;
}

.tag {
    padding: 5px 12px;
    border-radius: 8px;
    background: rgba(255, 0, 80, 0.15);
    color: var(--secondary-neon);
    font-size: 0.9rem;
    border: 1px solid rgba(255, 0, 80, 0.3);
}

.note {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Calculator Section */
.calculator-section {
    padding: 50px 0;
}

.calculator-card {
    max-width: 700px;
    margin: 0 auto;
}

.input-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.input-group label {
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.input-group input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 12px;
    border-radius: 8px;
    font-family: var(--font-body);
    transition: var(--transition);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-neon);
}

.grid-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.divider {
    display: flex;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 20px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--glass-border);
}

.divider span {
    padding: 0 10px;
}

.calculate-btn {
    width: 100%;
    justify-content: center;
    background: var(--primary-neon);
    color: black;
}

/* Result Box */
.result-box {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--glass-border);
    text-align: center;
}

.result-box.hidden {
    display: none;
}

.result-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}

.score-ring {
    position: relative;
    width: 80px;
    height: 80px;
}

.score-ring svg {
    width: 80px;
    height: 80px;
    transform: rotate(-90deg);
}

.score-ring circle {
    fill: none;
    stroke-width: 6;
    stroke: rgba(255, 255, 255, 0.1);
}

#scoreCircle {
    stroke-dasharray: 226;
    stroke-dashoffset: 226;
    /* Full circle */
    stroke: var(--primary-neon);
    transition: stroke-dashoffset 1s ease;
}

.score-ring span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 700;
    font-size: 1.2rem;
}

/* AI Section */
.ai-section {
    padding: 50px 0;
}

.ai-cards {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 30px;
}

.ai-card {
    flex: 1;
    min-width: 250px;
    text-align: center;
}

.ai-icon {
    font-size: 2.5rem;
    color: var(--text-main);
    margin-bottom: 15px;
}

.copy-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.9rem;
    padding: 8px 16px;
    margin-top: 15px;
    width: 100%;
    justify-content: center;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.prompt-preview {
    margin-top: 30px;
    background: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-radius: 8px;
    border-left: 3px solid var(--primary-neon);
}

.prompt-preview code {
    font-family: monospace;
    color: #e0e0e0;
}

/* Footer */
footer {
    border-top: 1px solid var(--glass-border);
    padding: 40px 0;
    text-align: center;
    margin-top: 50px;
    background: rgba(0, 0, 0, 0.2);
}

.disclaimer {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 10px;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--primary-neon);
    color: black;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    opacity: 0;
    transition: 0.3s ease;
    z-index: 200;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Hamburger Menu (Hidden on Desktop) */
.hamburger {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 101;
}

/* Responsive */
@media (max-width: 768px) {

    /* Navbar Adjustments */
    .glass-nav {
        padding: 15px 20px;
    }

    .hamburger {
        display: block;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: fixed;
        top: 0;
        right: -100%;
        /* Hidden off-screen */
        width: 100%;
        height: 100vh;
        background: rgba(15, 15, 19, 0.95);
        backdrop-filter: blur(20px);
        transition: right 0.4s ease;
        z-index: 100;
        gap: 30px;
    }

    .nav-links.active {
        right: 0;
        /* Slide in */
    }

    .nav-links a {
        font-size: 1.5rem;
        color: var(--text-main);
        text-decoration: none;
        font-weight: 600;
    }

    /* Hero Section */
    .hero {
        padding: 120px 20px 60px;
        /* More top padding for fixed nav */
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .primary-btn,
    .secondary-btn {
        width: 100%;
        justify-content: center;
    }

    /* Sections */
    .info-section,
    .calculator-section,
    .ai-section {
        padding: 40px 0;
    }

    .glass-card {
        padding: 20px;
    }

    /* Calculator Grid */
    .grid-inputs {
        grid-template-columns: 1fr;
        /* Stack inputs vertically */
        gap: 15px;
    }

    /* AI Cards */
    .ai-cards {
        flex-direction: column;
    }

    .ai-card {
        width: 100%;
    }

    /* Footer */
    footer {
        padding: 30px 0;
    }

    .logo {
        position: relative;
        z-index: 102;
        /* Ensure logo stays above menu if needed, though menu background covers it usually. Let's keep it simple. */
        font-size: 1.2rem;
    }
}