/* ===== CSS VARIABLES & RESET ===== */
:root {
    /* Colors - Dark Theme with Vibrant Accents */
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --bg-tertiary: #1a1a1a;
    --bg-elevated: #202020;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-success: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-tertiary: #707070;

    /* Accent Colors */
    --accent-purple: #667eea;
    --accent-pink: #f093fb;
    --accent-blue: #4facfe;
    --accent-green: #43e97b;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
    transition: all var(--transition-normal);
}

.nav-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-icon-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-normal);
}

.nav-link:hover::after {
    width: 100%;
}

.cta-button {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 2rem 4rem;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: var(--gradient-primary);
    top: -200px;
    left: -200px;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--gradient-secondary);
    top: 50%;
    right: -150px;
    animation-delay: -7s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: var(--gradient-accent);
    bottom: -100px;
    left: 50%;
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    text-align: center;
}

.hero-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.title-line {
    display: block;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.primary-button {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-normal);
}

.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.5);
}

.secondary-button {
    background: var(--glass-bg);
    color: white;
    border: 1px solid var(--glass-border);
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all var(--transition-normal);
}

.secondary-button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.hero-showcase {
    position: relative;
    z-index: 1;
    margin-top: 4rem;
}

.showcase-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-xl);
}

.showcase-image-placeholder {
    width: 100%;
    max-width: 600px;
    aspect-ratio: 16/9;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.placeholder-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    height: 100%;
    background: #000;
}

.grid-tile {
    background: var(--gradient-primary);
}

/* ===== STYLES GALLERY ===== */
.styles-section {
    padding: 6rem 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.8rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

.styles-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.style-card {
    background: var(--glass-bg);
    border: 2px solid transparent;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    backdrop-filter: blur(12px);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.2);
    transform: translateY(0);
}

.style-card:hover {
    border-color: var(--accent-purple);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.25);
}

.style-card.selected {
    border-color: var(--accent-purple) !important;
    box-shadow: 0 0 35px rgba(102, 126, 234, 0.6), 0 20px 40px rgba(0, 0, 0, 0.4) !important;
    transform: translateY(-4px);
    background: rgba(102, 126, 234, 0.08);
}

.style-preview {
    width: 100%;
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    border: 1px solid var(--glass-border);
    overflow: hidden;
}

.style-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
    transition: all 0.4s ease;
}

.style-card:hover .style-img {
    transform: scale(1.12);
}

.style-card.selected .style-img {
    filter: brightness(1.3) drop-shadow(0 0 20px rgba(102, 126, 234, 0.8));
    transform: scale(1.08);
}

.style-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-align: center;
}

.style-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    text-align: center;
}

/* ===== GENERATOR SECTION ===== */
.generator-section {
    padding: 4rem 2rem;
    background: var(--bg-secondary);
}

.generator-container {
    max-width: 1400px;  
    margin: 0 auto;
}

.generator-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.generator-left {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.generator-right {
    position: sticky;
    top: 100px;
}

/* Make result container always visible */
#resultPreview {
    margin-top: 0 !important;
    display: block !important;
    min-height: 400px;
}

/* Responsive: stack on mobile */
@media (max-width: 1024px) {
    .generator-content {
        grid-template-columns: 1fr;
    }
    
    .generator-right {
        position: relative;
        top: 0;
    }
}

.upload-area {
    background: var(--glass-bg);
    border: 2px dashed var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.upload-area:hover {
    border-color: var(--accent-purple);
    background: rgba(102, 126, 234, 0.05);
}

.upload-icon-img {
    width: 72px;
    height: 72px;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.upload-placeholder h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.upload-placeholder p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.upload-hint {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.controls-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.control-group {
    margin-bottom: 1.5rem;
}

.control-group:last-child {
    margin-bottom: 0;
}

.control-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

/* ===== SLIDERS - FULLY FIXED ===== */
.slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--bg-tertiary);
    outline: none;
    cursor: pointer;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gradient-primary);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    border: none;
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gradient-primary);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.select-input {
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.select-input:focus {
    outline: none;
    border-color: var(--accent-purple);
}

.generate-button {
    width: 100%;
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
    transition: all var(--transition-normal);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.generate-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.5);
}

.generate-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.button-loader {
    position: absolute;
}

.loader-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.preview-container {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 2rem;
    backdrop-filter: blur(10px);
}

/* ===== EXAMPLES & FOOTER ===== */
.examples-section {
    padding: 6rem 2rem;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.example-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
    cursor: pointer;
}

.example-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.example-image {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.example-placeholder {
    width: 100%;
    height: 100%;
}

.example-info {
    padding: 1.5rem;
}

.example-tag {
    display: inline-block;
    background: var(--gradient-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.example-desc {
    color: var(--text-secondary);
}

.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--glass-border);
    padding: 4rem 2rem 2rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-section a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color var(--transition-fast);
}

.footer-section a:hover {
    color: var(--text-primary);
}

.footer-desc {
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .styles-gallery {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
    
    .examples-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        display: none;
    }
}
