:root {
    --primary: #2563EB;
    --primary-hover: #1d4ed8;
    --accent: #10B981;
    --text: #0F172A;
    --text-muted: #64748b;
    --bg: #ffffff;
    --white: #ffffff;
    --border: #E2E8F0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navigation */
header {
    background: var(--white);
    padding: 1.25rem 0;
    position: sticky;
    top: 0;
    z-index: 50;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
}

.nav-links a.active {
    font-weight: 700;
    position: relative;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
}

.btn-signin {
    background: #f1f5f9;
    color: var(--text);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: none;
    font-weight: 600;
    font-size: 0.8125rem;
}

/* Hero & Prompt Card */
.hero {
    text-align: center;
    padding: 4rem 0 2rem;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}

.prompt-card {
    background: var(--white);
    border-radius: 1.5rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    padding: 1rem 1.25rem;
    max-width: 800px;
    margin: 0 auto;
    border: 1px solid #f1f5f9;
}

.prompt-card-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.25rem;
}

.prompt-icon {
    color: #94a3b8;
}

.prompt-input {
    flex: 1;
    border: none;
    font-size: 1.125rem;
    padding: 0.5rem 0;
    background: transparent;
    outline: none !important;
    font-weight: 400;
}

.prompt-input::placeholder {
    color: #94a3b8;
}

.prompt-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
}

.controls-left {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.pill-btn {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 0.75rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.375rem;
    cursor: pointer;
}

.pill-btn:hover {
    background: #f1f5f9;
}

.pill-select {
    background: transparent;
    border: none;
    font-size: 0.75rem;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    color: var(--text);
}

.controls-right {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.status-icon {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.btn-generate-main {
    background: #000000;
    color: var(--white);
    padding: 0.6rem 1.5rem;
    border-radius: 0.75rem;
    border: none;
    font-weight: 600;
    font-size: 0.8125rem;
}

.btn-generate-main:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Discovery Section */
.discovery {
    padding: 2rem 0;
}

.tabs {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 0.75rem;
}

.tab {
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
}

.tab.active {
    color: #000;
    font-weight: 600;
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -0.85rem;
    left: -2px;
    right: -2px;
    height: 2px;
    background: #000;
}

/* Nav Tabs Logic (Explore vs Your Prompts) */
.nav-tabs-container {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #f1f5f9;
}

.nav-tab {
    background: transparent;
    border: none;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    padding-bottom: 0.75rem;
    position: relative;
    transition: color 0.2s;
}

.nav-tab:hover {
    color: #0f172a;
}

.nav-tab.active {
    color: #0f172a;
    font-weight: 600;
}

.nav-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: #0f172a;
}

.gallery {
    column-count: 4;
    column-gap: 1.25rem;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 1.25rem;
    background: #f8fafc;
    border-radius: 0.75rem;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    display: block;
    transition: filter 0.2s;
}

/* Discovery Section Refinements */
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    color: white;
    font-size: 0.8125rem;
    font-weight: 500;
    text-align: center;
    opacity: 0;
    transition: opacity 0.2s;
    backdrop-filter: blur(4px);
}

.gallery-overlay span {
    line-height: 1.6;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Results Section */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding-bottom: 4rem;
}

.result-card {
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 150px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.result-text {
    font-size: 0.875rem;
    color: var(--text);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.result-footer {
    display: flex;
    justify-content: flex-end;
}

/* Status Message */
.status-msg {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    display: none;
}

.status-error {
    background: #FEF2F2;
    color: #991B1B;
}

/* Output Area */
.output-area {
    margin-top: 1rem;
    display: none;
}

.copy-btn {
    background: #000;
    color: #fff;
    border: none;
    padding: 0.4rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.6875rem;
    font-weight: 600;
    margin-left: 1rem;
}

/* Value Strip */
.value-strip {
    padding: 5rem 0;
    border-top: 1px solid #f1f5f9;
}

.value-grid {
    display: flex;
    justify-content: center;
    gap: 4rem;
    flex-wrap: wrap;
}

.value-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}


/* Shared Footer Styles */
footer {
    background: #f8fafc;
    padding: 5rem 0 2rem;
    border-top: 1px solid #e2e8f0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-column h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 1100px) {
    .gallery {
        column-count: 3;
    }
}

@media (max-width: 768px) {
    .gallery {
        column-count: 2;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .tabs {
        overflow-x: auto;
        padding-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .gallery {
        column-count: 1;
    }

    .prompt-card-bottom {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .controls-right {
        width: 100%;
        justify-content: space-between;
    }
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    background: #0f172a;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 600;
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28), opacity 0.3s;
    opacity: 0;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Button Variants */
.danger-btn {
    border: 1px solid #fee2e2 !important;
    color: #ef4444 !important;
}

.danger-btn:hover {
    background: #fee2e2 !important;
}

.action-btn {
    background: #000 !important;
    color: #fff !important;
    border: none !important;
}

.action-btn:hover {
    background: #1e293b !important;
}

/* Empty State */
.empty-state {
    text-align: center;
    color: #94a3b8;
    padding: 4rem 0;
    font-size: 1rem;
    font-weight: 500;
    grid-column: 1 / -1;
}

/* Guide/Blog Cards */
.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
    padding-bottom: 4rem;
}

.guide-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.guide-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: #cbd5e1;
}

.guide-image-wrapper {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.guide-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.guide-card:hover .guide-image {
    transform: scale(1.05);
}

.guide-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.guide-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.guide-tag {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary);
    background: #eff6ff;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.guide-read-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.guide-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    color: var(--text);
    letter-spacing: -0.01em;
}

.guide-excerpt {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex: 1;
}

.guide-link {
    color: var(--text);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
    margin-top: auto;
    transition: gap 0.2s;
}

.guide-card:hover .guide-link {
    color: var(--primary);
    gap: 0.75rem;
}

/* Home Page Expansion */
.features-section {
    padding: 8rem 0;
    background: #fff;
}

.section-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #eff6ff;
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 2rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 5rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.feature-card {
    padding: 2.5rem;
    border-radius: 1.5rem;
    background: #fff;
    border: 1px solid var(--border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.05), 0 8px 10px -6px rgb(0 0 0 / 0.05);
    border-color: var(--primary);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: #f8fafc;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 1.5rem;
    transition: all 0.3s;
}

.feature-card:hover .feature-icon {
    background: var(--primary);
    color: white;
}

/* How It Works Visual */
.how-it-works-section {
    padding: 8rem 0;
    background: #f8fafc;
}

.steps-container {
    display: flex;
    justify-content: space-between;
    gap: 3rem;
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.step-item {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 60px;
    height: 60px;
    background: #fff;
    border: 2px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.25rem;
    margin: 0 auto 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

.step-item:hover .step-number {
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(1.1);
}

/* Stats Counter */
.stats-section {
    padding: 6rem 0;
    background: var(--text);
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 4rem;
    text-align: center;
}

.stat-value {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 0.875rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

/* Final CTA */
.final-cta {
    padding: 10rem 0;
    background: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)), url('https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?q=80&w=1920&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    text-align: center;
}

.cta-box {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-radius: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
}

.cta-box h2 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.cta-box p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

@media (max-width: 1100px) {
    .steps-container {
        flex-direction: column;
        gap: 4rem;
    }
}