/* Modern Mobile App Styling */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-primary: #1A1A2E;
    --bg-secondary: #16213E;
    --bg-tertiary: #0F3460;
    --accent: #5D8BF4;
    --accent-light: #80A4FF;
    --accent-dark: #3D5FB0;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-tertiary: #757575;
    --success: #4CAF50;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Global styles */
h1,
h2,
h3 {
    font-weight: 700;
    line-height: 1.3;
}

h1 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, var(--text-primary), var(--accent-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 1.8rem;
}

h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.hidden {
    display: none !important;
}

/* Header */
header {
    padding: 1.5rem;
    background: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(90deg, #ffffff, var(--accent-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
}

.logo img {
    height: 42px;
    margin-right: 8px;
    border-radius: 8px;
    border: 3px solid black;
}

.highlight {
    color: var(--accent);
    -webkit-text-fill-color: var(--accent);
}

/* Main content */
main {
    padding: 0;
    max-width: 500px;
    margin: 0 auto;
}

section {
    padding: 0 1.5rem 2rem;
    animation: fadeIn 0.5s ease;
}

/* Remove top padding specifically for the generators section */
#generators {
    padding-top: 0;
}

/* Intro section - Removed */
/*
#intro {
    height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(to bottom, var(--bg-primary), var(--bg-secondary));
    text-align: center;
    padding-bottom: 5rem;
}
*/

/* Buttons */
.btn-primary {
    background: var(--accent);
    color: var(--text-primary);
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(93, 139, 244, 0.3);
    display: inline-block;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 1rem auto;
}

/* Add styles for the generation counter */
#generation-counter-container {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

#generation-count {
    font-weight: 600;
    color: var(--accent-light);
}

.btn-primary:hover,
.btn-primary:active {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(93, 139, 244, 0.4);
}

/* Generators section */
.generators-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}

.generator-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: var(--shadow);
    cursor: pointer;
    border: 1px solid rgba(93, 139, 244, 0.1);
}

.generator-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(93, 139, 244, 0.3);
}

/* Add styles for disabled cards */
.generator-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    /* Prevents click events */
}

.generator-card.disabled:hover {
    transform: none;
    /* Remove hover effect */
    box-shadow: var(--shadow);
    /* Reset shadow */
    border: 1px solid rgba(93, 139, 244, 0.1);
    /* Reset border */
}

.generator-preview {
    height: 180px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.generator-preview::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to top, var(--bg-secondary), transparent);
}

.generator-info {
    padding: 1.5rem;
}

.tag {
    display: inline-block;
    background: var(--bg-tertiary);
    color: var(--accent-light);
    font-size: 0.8rem;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    border: 1px solid var(--accent-dark);
}

/* Generator interface */
.back-button {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.back-button:hover {
    color: var(--accent);
}

.back-button svg {
    margin-right: 0.5rem;
}

/* Tutorial */
.progress-bar {
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.progress-indicator {
    height: 100%;
    background: var(--accent);
    width: 20%;
    /* Will be updated by JS */
    transition: width 0.3s ease;
}

.navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

.nav-btn {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: var(--bg-tertiary);
}

.nav-btn.next {
    background: var(--accent);
    color: var(--text-primary);
}

.nav-btn.next:hover {
    background: var(--accent-light);
}

/* Gradio container */
#gradio-container {
    overflow: hidden;
    margin: 0 -1.75rem;
}


gradio-app {
    display: block;
    width: 100%;
    min-height: 600px;
    background: var(--bg-secondary);
}

/* Custom class for each gradio model */
.gradio-sansa-sprint {
    --gradio-primary-color: var(--accent);
    --gradio-secondary-color: var(--accent-dark);
    --gradio-accent-color: var(--accent-light);
}


/* CSS to override Gradio styles */
:root.gradio-stable-diffusion {
    --body-background-fill: var(--bg-secondary) !important;
    --background-fill-primary: var(--bg-secondary) !important;
    --background-fill-secondary: var(--bg-tertiary) !important;
    --color-accent: var(--accent) !important;
    --color-accent-soft: var(--accent-dark) !important;
    --button-primary-background-fill: var(--accent) !important;
    --button-primary-background-fill-hover: var(--accent-light) !important;
    --button-primary-text-color: var(--bg-primary) !important;
}

:root.gradio-midjourney {
    --body-background-fill: var(--bg-secondary) !important;
    --background-fill-primary: var(--bg-secondary) !important;
    --background-fill-secondary: var(--bg-tertiary) !important;
    --color-accent: #9B59B6 !important;
    --color-accent-soft: #8E44AD !important;
    --button-primary-background-fill: #9B59B6 !important;
    --button-primary-background-fill-hover: #AF7AC5 !important;
    --button-primary-text-color: var(--text-primary) !important;
}

:root.gradio-dalle {
    --body-background-fill: var(--bg-secondary) !important;
    --background-fill-primary: var(--bg-secondary) !important;
    --background-fill-secondary: var(--bg-tertiary) !important;
    --color-accent: #3498DB !important;
    --color-accent-soft: #2980B9 !important;
    --button-primary-background-fill: #3498DB !important;
    --button-primary-background-fill-hover: #5DADE2 !important;
    --button-primary-text-color: var(--text-primary) !important;
}

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

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

/* Tutorial styling */
.example {
    margin: 1.5rem 0;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.bad,
.good {
    padding: 1rem;
}

.bad {
    background: rgba(231, 76, 60, 0.2);
    border-left: 3px solid #e74c3c;
}

.good {
    background: rgba(93, 139, 244, 0.1);
    border-left: 3px solid var(--accent);
}

@media (min-width: 480px) {
    h1 {
        font-size: 2.5rem;
    }
}

/* Tutorial section styling */
.tutorial-image {
    width: 100%;
    border-radius: var(--radius-sm);
    margin: 1rem 0;
    box-shadow: var(--shadow);
}

.example-prompt {
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    padding: 0.8rem;
    font-family: monospace;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-left: 3px solid var(--accent);
}

.comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}

.comparison img {
    margin: 0;
}

.comparison p {
    text-align: center;
    margin: 0.5rem 0 1rem;
    font-size: 0.9rem;
}

.skip-intro-option {
    margin-top: 1.5rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.skip-intro-option input {
    margin-right: 0.5rem;
}

#finish-tutorial {
    display: block;
    margin: 2rem auto 0;
}

.section-title {
    text-align: center;
    margin: 1.5rem 0 0 0;
    color: var(--accent-light);
    font-size: 1.6rem;
    font-weight: 600;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--accent);
    margin: 0.5rem auto 0;
    margin-bottom: -0.5rem;
    border-radius: 2px;
}

/* ———————————————————————
   Reserve space for AdSense
   ——————————————————————— */
.ad-slot {
    display: block;
    width: 100%;
    max-width: 336px;
    /* your slot's max width */
    min-height: 280px;
    /* your slot's min height */
    margin: 1rem auto;
    /* optional placeholder background while loading */
    background: var(--bg-secondary);
}