/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
    --primary-color: #8A2BE2;
    --primary-gradient: linear-gradient(135deg, #8A2BE2 0%, #FF0080 100%);
    --bg-color: #F8F9FD;
    --card-bg: #FFFFFF;
    --text-main: #1F2937;
    --text-muted: #6B7280;
    --border-color: #E5E7EB;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    background-image:
        radial-gradient(at 0% 0%, rgba(138, 43, 226, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(255, 0, 128, 0.05) 0px, transparent 50%);
    color: var(--text-main);
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Modern Navbar */
.main-nav {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.75rem;
}

.logo-text {
    background: linear-gradient(90deg, #111827, #4B5563);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.nav-link {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.2s;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-btn {
    background: var(--text-main);
    color: white;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.nav-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Main Content */
.container {
    max-width: 900px;
    margin: 3rem auto;
    padding: 0 1.5rem;
    flex-grow: 1;
}

.hero-title {
    text-align: center;
    font-family: 'Outfit', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 2.5rem;
    background: linear-gradient(135deg, #1F2937 0%, #4B5563 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

/* Generator Card */
.generator-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.6);
    position: relative;
    overflow: hidden;
}

/* Form Elements */
.form-group {
    margin-bottom: 2rem;
}

.form-label {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    color: var(--text-main);
}

textarea,
input[type="text"],
input[type="email"],
select {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    min-height: 50px;
    transition: all 0.2s;
    background: #F9FAFB;
    color: var(--text-main);
}

textarea:focus,
input:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(138, 43, 226, 0.1);
}

/* Custom Select Styling */
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236B7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.5rem;
    cursor: pointer;
}

/* Vibe Grid */
.vibe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.vibe-option {
    display: none;
}

.vibe-card {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    background: white;
}

.vibe-card:hover {
    border-color: #D1D5DB;
    transform: translateY(-2px);
}

.vibe-option:checked+.vibe-card {
    border-color: var(--primary-color);
    background-color: rgba(138, 43, 226, 0.03);
    box-shadow: 0 0 0 1px var(--primary-color);
}

.vibe-icon {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.vibe-title {
    font-weight: 700;
    font-size: 0.95rem;
    display: block;
    margin-bottom: 0.25rem;
    font-family: 'Outfit', sans-serif;
}

.vibe-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Length Selector */
.length-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    background: #F3F4F6;
    padding: 0.5rem;
    border-radius: var(--radius-md);
}

.length-option {
    display: none;
}

.length-card {
    padding: 0.75rem;
    text-align: center;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all 0.2s;
    font-weight: 500;
    color: var(--text-muted);
}

.length-option:checked+.length-card {
    background: white;
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
    font-weight: 600;
}

/* Generate Button */
.btn-generate {
    width: 100%;
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 1.125rem;
    border-radius: var(--radius-full);
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 1.5rem;
    box-shadow: 0 4px 6px rgba(138, 43, 226, 0.25);
    letter-spacing: 0.02em;
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(138, 43, 226, 0.3);
}

.btn-generate:active {
    transform: translateY(0);
}

.btn-generate:disabled {
    filter: grayscale(1);
    opacity: 0.7;
    cursor: not-allowed;
}

/* Result Area */
#result-container {
    margin-top: 2.5rem;
    display: none;
    animation: fadeIn 0.5s ease-out;
}

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

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

.result-box {
    background: #F9FAFB;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem;
    margin-bottom: 1rem;
    white-space: pre-wrap;
    font-size: 1rem;
    color: var(--text-main);
    line-height: 1.6;
}

/* Footer */
footer {
    background: white;
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    margin-top: auto;
}

/* Responsive */
@media (max-width: 640px) {
    .length-grid {
        grid-template-columns: 1fr;
        padding: 0;
        background: transparent;
        gap: 0.5rem;
    }

    .length-card {
        border: 1px solid var(--border-color);
        background: white;
    }

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

    .main-nav {
        padding: 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }
}