:root {
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --bg: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.05);
    --success: #10b981;
    --error: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

.background-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% -20%, #312e81 0%, transparent 40%),
        radial-gradient(circle at 0% 100%, #1e1b4b 0%, transparent 40%);
    z-index: -1;
    pointer-events: none;
}

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

/* Nav */
.glass-nav {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 800;
}

.logo-text {
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 600;
    transition: color 0.2s;
}

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

/* Hero */
.hero-section {
    text-align: center;
    padding: 4rem 1rem;
}

h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.gradient-text {
    background: linear-gradient(135deg, #818cf8 0%, #c084fc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Grid & Cards */
.generator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

@media (max-width: 968px) {
    .generator-grid {
        grid-template-columns: 1fr;
    }
}

.card {
    border-radius: 1.5rem;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    min-height: 600px;
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.badge {
    background: rgba(139, 92, 246, 0.1);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

/* Form Styles */
.input-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.875rem;
}

textarea,
input[type="text"] {
    width: 100%;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    color: #fff;
    font-size: 1rem;
    transition: all 0.2s;
}

textarea:focus,
input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.params-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    background: var(--border);
    border-radius: 5px;
    outline: none;
    accent-color: var(--primary);
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-zone:hover {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.05);
}

.upload-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.upload-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
    margin-top: 0.5rem;
}

.preview-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.preview-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

/* Output Area */
.result-placeholder {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: rgba(0, 0, 0, 0.2);
}

.placeholder-content {
    text-align: center;
    color: var(--text-muted);
}

.placeholder-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.result-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 1rem;
    background: #000;
}

.result-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Buttons */
.primary-btn {
    width: 100%;
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 1rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.primary-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(139, 92, 246, 0.4);
}

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

.secondary-btn {
    background: rgba(139, 92, 246, 0.1);
    color: var(--primary);
    border: 1px solid rgba(139, 92, 246, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.secondary-btn:hover {
    background: rgba(139, 92, 246, 0.2);
}

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

/* Utilities */
.hidden {
    display: none !important;
}

.notice {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 1rem;
}

.error-box {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(239, 64, 64, 0.1);
    border: 1px solid rgba(239, 64, 64, 0.2);
    border-radius: 0.75rem;
    color: var(--error);
    font-size: 0.875rem;
    text-align: center;
}

/* Loader */
.loader {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

footer {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

footer a {
    color: var(--primary);
    text-decoration: none;
}