:root {
    /* Premium Palette */
    --primary-color: #C5A028;
    /* Champagne Gold */
    --primary-hover: #A08020;
    --secondary-color: #E6B8B8;
    /* Soft Rose Gold */
    --text-dark: #2C3E50;
    /* Deep Charcoal */
    --text-light: #FDFBFB;

    /* Glassmorphism - Crystal Clear */
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.6);
    --shadow: 0 15px 40px 0 rgba(31, 38, 135, 0.1);

    /* Backgrounds */
    --gradient-bg: linear-gradient(135deg, #FFF0F5 0%, #FDE6EB 100%);
    /* Pastel Pink */
    --input-bg: rgba(255, 255, 255, 0.8);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--gradient-bg);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Elegant Background Animation */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 15% 15%, rgba(255, 182, 193, 0.15) 0%, transparent 25%),
        radial-gradient(circle at 85% 85%, rgba(255, 192, 203, 0.15) 0%, transparent 30%);
    z-index: -1;
    animation: pulseBackground 15s ease-in-out infinite alternate;
}

@keyframes pulseBackground {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.05);
    }
}

.container {
    width: 100%;
    max-width: 1000px;
    padding: 2rem;
    margin: 2rem auto;
}

.header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 1.2s ease-out;
}

.header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
    background: linear-gradient(45deg, var(--text-dark), #555);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header p {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    color: #7f8c8d;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 300;
}

/* Crystal Glass Panel */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 3.5rem;
    box-shadow: var(--shadow);
    animation: fadeInUp 1s ease-out 0.3s backwards;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    margin-bottom: 2rem;
    color: var(--text-dark);
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

label {
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

label i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

input,
select,
textarea {
    padding: 1rem 1.2rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    background: var(--input-bg);
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    color: var(--text-dark);
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(197, 160, 40, 0.1);
}

/* Radio Group */
.radio-group {
    display: flex;
    gap: 2rem;
    margin-top: 0.5rem;
    padding: 0.5rem 0;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

.radio-label input[type="radio"] {
    accent-color: var(--primary-color);
    width: 1.3rem;
    height: 1.3rem;
    margin: 0;
    box-shadow: none;
}

.mt-2 {
    margin-top: 1rem;
}

/* Premium Buttons */
.generate-btn {
    width: 100%;
    padding: 1.2rem;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary-color), #D4AF37);
    color: white;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1.5rem;
    box-shadow: 0 10px 20px rgba(197, 160, 40, 0.2);
    position: relative;
    overflow: hidden;
}

.generate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(197, 160, 40, 0.3);
    filter: brightness(1.05);
}

.generate-btn:active {
    transform: translateY(-1px);
}

.btn-loading {
    display: none;
}

.generate-btn.loading .btn-content {
    display: none;
}

.generate-btn.loading .btn-loading {
    display: inline-block;
}

/* Result Section */
.result-section {
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 3rem;
    animation: fadeIn 0.8s ease-out;
}

.image-container {
    margin: 2.5rem auto;
    max-width: 650px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    position: relative;
    background: #fff;
    border: 8px solid #fff;
}

.image-container img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

.image-container:hover img {
    transform: scale(1.03);
}

.prompt-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(44, 62, 80, 0.85);
    box-shadow: 0 8px 20px rgba(44, 62, 80, 0.2);
}

/* Actions Section */
.actions {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.action-btn {
    padding: 1rem 2rem;
    border-radius: 50px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.download-btn {
    background: linear-gradient(135deg, var(--primary-color), #D4AF37);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(197, 160, 40, 0.3);
}

.download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(197, 160, 40, 0.4);
    background: linear-gradient(135deg, #D4AF37, var(--primary-color));
}

.new-btn {
    background: white;
    color: var(--text-dark);
    border: 2px solid #eee;
}

.new-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Navigation Bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.nav-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-img {
    height: 50px;
    width: auto;
    border-radius: 50%;
    object-fit: cover;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

/* Catalog Styles */
.catalog-container {
    margin-top: 6rem;
    max-width: 1200px;
}

.filter-bar {
    display: flex;
    flex-direction: row !important;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem;
    margin-bottom: 3rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.filter-group select {
    min-width: 150px;
    background: transparent;
    border: 1px solid var(--primary-color);
}

/* Cake Grid */
.cake-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem;
}

.cake-card {
    padding: 0;
    overflow: hidden;
    transition: transform 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.cake-card:hover {
    transform: translateY(-10px);
}

.card-image {
    height: 300px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.cake-card:hover .card-image img {
    transform: scale(1.1);
}

.card-info {
    padding: 1.5rem;
    text-align: center;
}

.card-info h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.designer-name {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.view-btn {
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Outfit', sans-serif;
}

.view-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s;
}

.modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    width: 90%;
    max-width: 900px;
    padding: 2rem;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-dark);
    z-index: 10;
}

.modal-body {
    display: flex;
    gap: 2rem;
}

.modal-image {
    flex: 1;
    border-radius: 16px;
    overflow: hidden;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-info h2 {
    text-align: left;
    margin-bottom: 0.5rem;
}

.modal-info h2::after {
    left: 0;
    transform: none;
}

.designer-tag,
.location-tag {
    color: #666;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-details {
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(197, 160, 40, 0.1);
    border-radius: 12px;
}

.description {
    line-height: 1.8;
    color: #444;
    margin-bottom: 2rem;
}

.contact-btn {
    background: #25D366;
    /* WhatsApp Green */
    color: white;
    justify-content: center;
    width: 100%;
}

.contact-btn:hover {
    background: #128C7E;
}

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2.8rem;
    }

    .glass-panel {
        padding: 2rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .actions {
        flex-direction: column;
    }

    .action-btn {
        width: 100%;
        justify-content: center;
    }

    .modal-body {
        flex-direction: column;
    }

    .modal-image {
        height: 300px;
    }

    /* Navbar Mobile */
    .navbar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .nav-links {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .catalog-container {
        margin-top: 11rem;
    }

    /* Filter Bar Mobile */
    .filter-bar {
        flex-direction: column !important;
        gap: 1rem;
        align-items: stretch;
        overflow-x: visible;
        padding: 1.5rem 1rem;
    }

    .filter-group {
        width: 100%;
        display: flex;
    }

    .filter-group select {
        width: 100%;
        flex: 1;
    }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(197, 160, 40, 0.3);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.loading-text {
    font-family: 'Outfit', sans-serif;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}