/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
    --glass: rgba(30, 41, 59, 0.7);
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --radius: 12px;
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Textarea Specific Scrollbar */
textarea::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
}

textarea::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Background Blobs */
.bg-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    width: 400px;
    height: 400px;
    background: var(--primary);
    filter: blur(120px);
    opacity: 0.15;
    border-radius: 50%;
    animation: blobMove 20s infinite alternate-reverse ease-in-out;
}

.blob-1 { top: -100px; right: -100px; background: var(--primary); }
.blob-2 { bottom: -150px; left: -150px; background: var(--secondary); opacity: 0.1; width: 500px; height: 500px; }
.blob-3 { top: 40%; left: 20%; width: 300px; height: 300px; opacity: 0.08; }

@keyframes blobMove {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0, 0) scale(1); }
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 2rem 4rem;
    flex-grow: 1;
}

/* Navbar */
.navbar {
    position: fixed; top: 0; left: 0; width: 100%;
    padding: 1rem 2rem;
    display: flex; justify-content: space-between; align-items: center;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    z-index: 100;
    border-bottom: 1px solid var(--glass-border);
}
.nav-logo { font-size: 1.5rem; font-weight: 700; background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary), white 30%)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { display: flex; gap: 2rem; }
.nav-link { font-weight: 500; color: var(--text-muted); }
.nav-link:hover { color: var(--primary); }

.burger { display: none; font-size: 1.5rem; background: none; border: none; color: var(--text-main); cursor: pointer; }

/* AI Generator Styles */
.form-container {
    margin-top: 1.5rem;
}

.input-group {
    display: none;
}

.input-group.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

.input-group label {
    display: block;
    margin-bottom: 0.4rem;
    margin-top: 0.8rem;
    font-weight: 500;
}

.input-group label:first-child {
    margin-top: 0;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tab-btn {
    padding: 0.6rem 1rem;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-main);
    border-radius: var(--radius);
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-btn i {
    font-size: 1rem;
}

.tab-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.tab-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}
/* Mobile Sidebar */
.sidebar {
    position: fixed; top: 0; right: 0; width: 280px; height: 100%;
    background: var(--bg-card);
    padding: 5rem 2rem;
    transform: translateX(100%);
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 99;
    border-left: 1px solid var(--border);
}
.sidebar.active { transform: translateX(0); }
.sidebar .nav-links { flex-direction: column; }
.overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); opacity: 0; pointer-events: none; transition: 0.3s; z-index: 98; }
.overlay.active { opacity: 1; pointer-events: auto; }

/* Main Container */
.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 8rem 1.5rem 4rem; 
    flex: 1;
    width: 100%;
}

/* Header */
.hero { text-align: center; margin-bottom: 4rem; }
.hero h1 { font-size: 3.5rem; font-weight: 800; margin-bottom: 1rem; line-height: 1.2; }
.hero h1 span { color: var(--primary); }
.hero p { color: var(--text-muted); font-size: 1.25rem; max-width: 600px; margin: 0 auto; }

/* Generator Card */
.ai-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2rem;
    box-shadow: var(--shadow);
    max-width: 1000px;
    margin: 0 auto 4rem;
}

.input-section h3 { margin-bottom: 1rem; font-size: 1.1rem; }
.tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 2rem; }
.tab-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    display: flex; align-items: center; gap: 0.5rem;
}
.tab-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.form-group { margin-bottom: 1rem; }
.form-control {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    padding: 0.8rem 1rem;
    border-radius: 8px;
    color: var(--text-main);
    font-family: inherit;
}
.form-control:focus { outline: none; border-color: var(--primary); }

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.3s;
    text-align: center;
}
.btn:hover {
    background: var(--primary-hover);
}
.btn-block {
    display: block;
    width: 100%;
}

.btn-generate {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
    transition: 0.3s;
    display: flex; justify-content: center; align-items: center; gap: 0.5rem;
}
.btn-generate:hover { background: var(--primary-hover); }

/* AI Preview */
.result-column {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.preview-section {
    background: var(--input-bg);
    border-radius: var(--radius);
    display: flex; 
    flex-direction: column;
    align-items: center; 
    justify-content: center;
    padding: 2rem;
    flex-grow: 1; /* Stretch to fill column height */
    position: relative;
    color: var(--text-main);
    border: 1px solid var(--glass-border);
    overflow: hidden;
    min-height: 400px;
}

/* Remove padding when image is shown */
.preview-section:has(.ai-result-image:not([style*="display: none"])) {
    padding: 0;
}

.ai-placeholder { color: #ccc; font-size: 5rem; }

.ai-result-image { 
    width: 100%; 
    height: 100%; 
    object-fit: cover;
    border-radius: var(--radius);
    display: none;
    position: absolute;
    top: 0;
    left: 0;
}
.btn-download {
    background: var(--primary);
    color: #fff;
    padding: 0.9rem 2.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}
.btn-download:hover { 
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* Content Sections */
.content-section { max-width: 800px; margin: 0 auto 4rem; }
.content-section h2 { font-size: 2rem; margin-bottom: 1.5rem; color: var(--text-main); }
.content-section p { margin-bottom: 1rem; color: var(--text-muted); }

/* Get Inspired Gallery */
.inspo-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.inspo-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 9/16;
    cursor: pointer;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
}

.inspo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.inspo-item:hover img {
    transform: scale(1.1);
}

.inspo-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1rem;
}

.inspo-item:hover .inspo-overlay {
    opacity: 1;
}

.inspo-prompt-preview {
    color: white;
    font-size: 0.75rem;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.click-to-use {
    align-self: flex-end;
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (max-width: 992px) {
    .inspo-gallery { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .inspo-gallery { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 0.75rem; /* Tighter gap on small screens */
    }
}


/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    background: #ff4d4d;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(255, 77, 77, 0.3);
    font-size: 0.95rem;
    font-weight: 500;
    pointer-events: auto;
    animation: toastIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    max-width: 450px;
}

.toast.fade-out {
    animation: toastOut 0.5s ease forwards;
}

.toast i { font-size: 1.2rem; }

@keyframes toastIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes toastOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* Footer */
footer {
    background: var(--bg-card);
    padding: 2rem 1.5rem;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    margin-top: auto;
    width: 100%;
}
.footer-links { display: flex; justify-content: center; gap: 2rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.footer-links a { color: var(--text-muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--primary); }
.copyright { color: var(--text-muted); font-size: 0.8rem; }

/* Responsive */
@media (max-width: 768px) {
    .burger { display: block; }
    .navbar .nav-links { display: none; }
    .ai-card { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2.5rem; }
    .container { padding: 80px 1.5rem 2rem; }
}
