/* =========================================
   Nano Banana Premium UI
   ========================================= */

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 5px var(--nb-yellow-glow);
    }

    50% {
        box-shadow: 0 0 20px var(--nb-yellow-glow), 0 0 10px var(--nb-yellow);
    }

    100% {
        box-shadow: 0 0 5px var(--nb-yellow-glow);
    }
}

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

/* --- Background Animation --- */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 10s infinite ease-in-out alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: var(--nb-yellow);
    animation-duration: 25s;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: var(--nb-accent);
    animation-duration: 30s;
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 40%;
    width: 400px;
    height: 400px;
    background: purple;
    animation-duration: 20s;
    animation-delay: -10s;
}

/* --- Layout Components --- */
#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: var(--nb-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--nb-yellow);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* --- Wizard Container --- */
.step-section {
    display: none;
    padding: 60px 20px;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
    flex: 1;
}

.step-section.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-content {
    background: var(--nb-glass);
    backdrop-filter: blur(16px);
    border: var(--nb-border);
    border-radius: var(--nb-radius);
    padding: 60px;
    box-shadow: var(--nb-shadow);
    text-align: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin: 0 0 15px 0;
    background: linear-gradient(135deg, #fff 0%, #ccc 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--nb-gray);
    margin-bottom: 40px;
}

/* --- Form Elements --- */
.input-group {
    margin-bottom: 25px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--nb-yellow);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.input-group input,
.input-group select,
textarea {
    width: 100%;
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
    border-radius: var(--nb-radius-sm);
    color: white;
    font-size: 1.1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.input-group input:focus,
.input-group select:focus,
textarea:focus {
    outline: none;
    border-color: var(--nb-yellow);
    box-shadow: 0 0 0 4px rgba(255, 225, 53, 0.1);
    background: rgba(0, 0, 0, 0.5);
}

/* --- Buttons --- */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    gap: 20px;
}

.btn {
    padding: 14px 32px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--nb-yellow);
    color: var(--nb-black);
    box-shadow: 0 4px 15px rgba(255, 225, 53, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(255, 225, 53, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-back {
    background: transparent;
    color: var(--nb-gray);
    padding-left: 0;
}

.btn-back:hover {
    color: white;
    transform: translateX(-5px);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* --- Step Specifics --- */

/* Step 3: Contact Grid */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.form-grid input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
    padding: 16px;
    border-radius: var(--nb-radius-sm);
    color: white;
    width: 100%;
}

/* Step 4: Image Grid */
#image-search-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    max-height: 450px;
    overflow-y: auto;
    padding-right: 10px;
}

.image-item {
    position: relative;
    border-radius: var(--nb-radius-sm);
    overflow: hidden;
    aspect-ratio: 16/9;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.image-item:hover img {
    transform: scale(1.1);
}

.image-item.selected {
    border-color: var(--nb-yellow);
    box-shadow: 0 0 15px rgba(255, 225, 53, 0.3);
}

.image-item .checkmark {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--nb-yellow);
    color: var(--nb-black);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.image-item.selected .checkmark {
    display: flex;
    animation: bounceIn 0.3s;
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

/* Step 5: Design Selection */
.style-grid {
    display: flex;
    gap: 25px;
    justify-content: center;
    margin-bottom: 40px;
}

.style-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    padding: 15px;
    border-radius: var(--nb-radius);
    cursor: pointer;
    width: 140px;
    transition: all 0.3s;
}

.style-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

.style-card.selected {
    border-color: var(--nb-yellow);
    background: rgba(255, 225, 53, 0.1);
    box-shadow: 0 0 20px rgba(255, 225, 53, 0.1);
}

.color-preview {
    height: 80px;
    border-radius: var(--nb-radius-sm);
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    text-align: left;
    max-width: 400px;
    margin: 0 auto 40px;
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: var(--nb-radius);
}

.features-grid label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: #ccc;
    transition: color 0.2s;
}

.features-grid label:hover {
    color: white;
}

.features-grid input[type="checkbox"] {
    accent-color: var(--nb-yellow);
    width: 18px;
    height: 18px;
}

/* Loading Step */
.loader-content {
    text-align: center;
}

.spinner {
    font-size: 4rem;
    margin-bottom: 20px;
    display: inline-block;
    animation: spin 2s infinite linear;
}

/* Preview Step */
.preview-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background: #222;
    padding: 10px 20px;
    border-radius: var(--nb-radius);
}

.device-toggles button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.device-toggles button.active,
.device-toggles button:hover {
    opacity: 1;
}

.preview-container {
    width: 100%;
    height: 70vh;
    background: #fff;
    border-radius: var(--nb-radius);
    overflow: hidden;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--nb-dark);
    margin: 10% auto;
    padding: 40px;
    border: 1px solid var(--nb-yellow);
    width: 90%;
    max-width: 500px;
    border-radius: var(--nb-radius);
    text-align: center;
    position: relative;
    box-shadow: 0 0 50px rgba(255, 225, 53, 0.2);
    animation: fadeInUp 0.4s ease;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: var(--nb-yellow);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .step-section {
        padding: 20px;
    }
}