/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Helvetica Neue', sans-serif;
    background: linear-gradient(180deg, #FDE7C5 0%, #FFF9F1 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.5;
}

/* Top Navigation Bar */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: transparent;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 20px;
    font-weight: 700;
    color: #000000;
    font-family: 'Inter', 'Helvetica Neue', sans-serif;
}

.nav-contact-btn {
    background: #000000;
    color: #FFFFFF;
    border: none;
    padding: 10px 24px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 300ms ease-in-out;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Inter', 'Helvetica Neue', sans-serif;
    text-decoration: none;
}

.nav-contact-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.nav-contact-btn:active {
    transform: translateY(0);
}

/* Contact Dropdown */
.contact-dropdown {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.contact-dropdown.hidden {
    display: none;
}

.contact-dropdown::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    z-index: -1;
}

.contact-dropdown-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    box-shadow: 0px 8px 24px rgba(0, 0, 0, 0.15);
    padding: 20px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    z-index: 1;
}

.contact-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.contact-dropdown-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: #000000;
    margin: 0;
    font-family: 'Inter', 'Helvetica Neue', sans-serif;
}

.close-contact-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: #4a5568;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-contact-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #000000;
}

.contact-form-dropdown {
    width: 100%;
}

.contact-form-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-form-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.contact-form-label {
    font-size: 12px;
    font-weight: 600;
    color: #4a5568;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Inter', 'Helvetica Neue', sans-serif;
}

.contact-form-label i {
    font-size: 12px;
}

.contact-form-input,
.contact-form-textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', 'Helvetica Neue', sans-serif;
    transition: all 300ms ease-in-out;
    background: #FFFFFF;
}

.contact-form-input:focus,
.contact-form-textarea:focus {
    outline: none;
    border-color: #A07C5B;
    box-shadow: 0px 2px 8px rgba(0,0,0,0.08);
}

.contact-form-textarea {
    resize: vertical;
    min-height: 80px;
}

.contact-submit-btn {
    background: #000000;
    color: #FFFFFF;
    border: none;
    padding: 10px 20px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 300ms ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Inter', 'Helvetica Neue', sans-serif;
    margin-top: 8px;
    width: 100%;
}

.contact-submit-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.contact-submit-btn:active {
    transform: translateY(0);
}

.contact-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.contact-message-dropdown {
    margin-top: 12px;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    font-size: 12px;
    font-weight: 500;
}

.contact-message-dropdown.success {
    background: #D4EDDA;
    color: #155724;
    border: 1px solid #C3E6CB;
}

.contact-message-dropdown.error {
    background: #F8D7DA;
    color: #721C24;
    border: 1px solid #F5C6CB;
}

/* Responsive adjustments for contact dropdown */
@media (max-width: 768px) {
    .contact-dropdown {
        padding: 10px;
    }
    
    .contact-dropdown-content {
        max-width: 100%;
    }
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 60px; /* Account for top nav bar */
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://images.unsplash.com/photo-1506905925346-21bda4d32df4?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(253, 231, 197, 0.85) 0%, rgba(255, 249, 241, 0.9) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    width: 100%;
    text-align: center;
}

.hero-text {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-heading {
    font-size: 64px;
    font-weight: 700;
    color: #000000;
    margin-bottom: 24px;
    line-height: 1.1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 1s ease-out;
}

.hero-subheading {
    font-size: 20px;
    font-weight: 400;
    color: #4a5568;
    margin-bottom: 40px;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-cta {
    background: #000000;
    color: #FFFFFF;
    border: none;
    padding: 16px 32px;
    border-radius: 9999px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 300ms ease-in-out;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: 'Inter', 'Helvetica Neue', sans-serif;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.15);
    animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-cta:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.2);
}

.hero-cta:active {
    transform: translateY(0);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 50px;
    color: #000000;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.logo i {
    font-size: 2.5rem;
    color: #A07C5B;
    animation: subtleFade 3s ease-in-out infinite;
}

@keyframes subtleFade {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.logo h1 {
    font-size: 64px;
    font-weight: 700;
    color: #000000;
    line-height: 1.1;
}

.description {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    background: rgba(253, 251, 246, 0.9);
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0px 4px 12px rgba(0,0,0,0.08);
}

.description h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #000000;
    line-height: 1.1;
}

.description p {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 25px;
    color: #4a5568;
}

.features {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #4a5568;
}

.feature i {
    color: #A07C5B;
    font-size: 1.1rem;
}

/* Main Content */
.main-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0px 4px 12px rgba(0,0,0,0.08);
    overflow: hidden;
}

/* Form Styles */
.story-form {
    padding: 40px;
}

.form-container {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-box {
    background: #FFFFFF;
    border: 1px solid #E0E0E0;
    border-radius: 16px;
    padding: 25px;
    transition: all 300ms ease-in-out;
    position: relative;
    box-shadow: 0px 4px 8px rgba(0,0,0,0.05);
}

.form-box:hover {
    border-color: #DADADA;
    transform: translateY(-2px);
    box-shadow: 0px 4px 12px rgba(0,0,0,0.08);
}

.form-box:focus-within {
    border-color: #A07C5B;
    box-shadow: 0px 4px 12px rgba(0,0,0,0.08);
}

.form-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 15px;
}

.form-label i {
    color: #A07C5B;
    font-size: 1.2rem;
}

.form-select {
    width: 100%;
    padding: 15px 20px;
    border: 1px solid #E0E0E0;
    border-radius: 16px;
    font-family: 'Inter', 'Helvetica Neue', sans-serif;
    font-size: 16px;
    font-weight: 500;
    background: white;
    color: #4a5568;
    cursor: pointer;
    transition: all 300ms ease-in-out;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

.form-select:focus {
    outline: none;
    border-color: #A07C5B;
    box-shadow: 0px 4px 12px rgba(0,0,0,0.08);
}

.form-select:hover {
    border-color: #DADADA;
}

.story-prompt-box {
    background: #FFFFFF;
    border: 1px solid #E0E0E0;
}

.story-prompt-box:hover {
    background: #FFFFFF;
}

/* Textarea Styles */
.form-textarea {
    width: 100%;
    min-height: 120px;
    padding: 20px;
    border: 1px solid #E0E0E0;
    border-radius: 16px;
    font-family: 'Inter', 'Helvetica Neue', sans-serif;
    font-size: 16px;
    resize: vertical;
    transition: all 300ms ease-in-out;
    background: white;
    color: #4a5568;
}

.form-textarea:focus {
    outline: none;
    border-color: #A07C5B;
    box-shadow: 0px 4px 12px rgba(0,0,0,0.08);
}

.form-textarea:hover {
    border-color: #DADADA;
}

/* Suggestions Styles */
.suggestions {
    margin-top: 20px;
}

.suggestions h3 {
    font-size: 1rem;
    color: #718096;
    margin-bottom: 15px;
    font-weight: 500;
}

.pill-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pill {
    background: #DADADA;
    border: 1px solid #E0E0E0;
    color: #000000;
    padding: 8px 16px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 300ms ease-in-out;
    font-family: 'Inter', 'Helvetica Neue', sans-serif;
}

.pill:hover {
    background: #A07C5B;
    border-color: #A07C5B;
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: 0px 4px 12px rgba(0,0,0,0.08);
}

/* Generate Button */
.generate-btn {
    width: 100%;
    max-width: 400px;
    margin: 30px auto 0;
    background: #000000;
    color: #FFFFFF;
    border: none;
    padding: 12px 28px;
    border-radius: 9999px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 300ms ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Inter', 'Helvetica Neue', sans-serif;
    position: relative;
    overflow: hidden;
}

.generate-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.generate-btn:active {
    transform: translateY(0);
}

/* Contact Form Styles */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 0;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #E0E0E0;
    border-radius: 12px;
    font-size: 16px;
    font-family: 'Inter', 'Helvetica Neue', sans-serif;
    transition: all 300ms ease-in-out;
    background: #FFFFFF;
}

.form-input:focus {
    outline: none;
    border-color: #A07C5B;
    box-shadow: 0px 4px 12px rgba(0,0,0,0.08);
}

.contact-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    font-weight: 500;
}

.contact-message.success {
    background: #D4EDDA;
    color: #155724;
    border: 1px solid #C3E6CB;
}

.contact-message.error {
    background: #F8D7DA;
    color: #721C24;
    border: 1px solid #F5C6CB;
}

/* Story Result Styles */
.story-result {
    padding: 40px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.story-result.hidden {
    display: none;
}

.story-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.story-header h2 {
    color: #4a5568;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.story-header h2 i {
    color: #A07C5B;
}

.story-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 9999px;
    font-weight: 500;
    cursor: pointer;
    transition: all 300ms ease-in-out;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', 'Helvetica Neue', sans-serif;
    font-size: 14px;
}

.edit-btn {
    background: #000000;
    color: #FFFFFF;
}

.edit-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.regenerate-btn {
    background: #FFFFFF;
    color: #000000;
    border: 1px solid #E0E0E0;
}

.regenerate-btn:hover {
    background: #FDFBF6;
    transform: translateY(-1px);
}

.story-content {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0px 4px 12px rgba(0,0,0,0.08);
    line-height: 1.5;
    font-size: 16px;
    color: #2d3748;
    white-space: pre-line;
    font-family: 'Inter', 'Helvetica Neue', sans-serif;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0px 4px 12px rgba(0,0,0,0.08);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h3 {
    color: #4a5568;
    font-size: 1.3rem;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #a0aec0;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.close-btn:hover {
    color: #4a5568;
    background: #f7fafc;
}

.modal-body {
    padding: 30px;
}

.modal-body label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #4a5568;
}

.modal-body textarea {
    margin-bottom: 20px;
    min-height: 100px;
}

.apply-edit-btn {
    background: #000000;
    color: #FFFFFF;
    border: none;
    padding: 12px 28px;
    border-radius: 9999px;
    font-weight: 500;
    cursor: pointer;
    transition: all 300ms ease-in-out;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', 'Helvetica Neue', sans-serif;
}

.apply-edit-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #000000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Cookie Consent Banner */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #FFFFFF;
    color: #000000;
    padding: 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transform: translateY(0);
    transition: transform 300ms ease-in-out;
    border-top: 1px solid #E0E0E0;
}

.cookie-consent.hidden {
    transform: translateY(100%);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-text h4 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.cookie-text p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1.4;
}

.cookie-buttons {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.accept-btn {
    background: #000000;
    color: #FFFFFF;
    border-radius: 9999px;
}

.accept-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.decline-btn {
    background: #FFFFFF;
    color: #000000;
    border: 1px solid #E0E0E0;
    border-radius: 9999px;
}

.decline-btn:hover {
    background: #FDFBF6;
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        height: 100vh; /* Fallback for older browsers */
        height: 100dvh; /* Dynamic viewport height for mobile */
        min-height: 100vh; /* Fallback */
        min-height: 100dvh; /* Dynamic viewport height */
    }
    
    .hero-background {
        background-attachment: scroll;
    }
    
    .hero-heading {
        font-size: 48px;
        margin-bottom: 20px;
    }
    
    .hero-subheading {
        font-size: 18px;
        margin-bottom: 32px;
    }
    
    .hero-cta {
        padding: 14px 28px;
        font-size: 16px;
    }
    
    .container {
        padding: 15px;
    }
    
    .logo h1 {
        font-size: 36px;
    }
    
    .description {
        padding: 20px;
        margin: 0 10px;
    }
    
    .description h2 {
        font-size: 28px;
    }
    
    .description p {
        font-size: 1rem;
    }
    
    .features {
        gap: 20px;
    }
    
    .story-form {
        padding: 25px;
    }
    
    .form-container {
        max-width: 100%;
    }
    
    .form-box {
        padding: 20px;
    }
    
    .story-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .story-actions {
        width: 100%;
        justify-content: stretch;
    }
    
    .action-btn {
        flex: 1;
        justify-content: center;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-header,
    .modal-body {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .hero {
        height: 100vh; /* Fallback for older browsers */
        height: 100dvh; /* Dynamic viewport height for mobile */
        min-height: 100vh; /* Fallback */
        min-height: 100dvh; /* Dynamic viewport height */
    }
    
    .hero-heading {
        font-size: 36px;
        margin-bottom: 16px;
    }
    
    .hero-subheading {
        font-size: 16px;
        margin-bottom: 24px;
    }
    
    .hero-cta {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    .logo {
        flex-direction: column;
        gap: 10px;
    }
    
    .logo h1 {
        font-size: 32px;
    }
    
    .description {
        padding: 15px;
        margin: 0 5px;
    }
    
    .description h2 {
        font-size: 24px;
    }
    
    .features {
        flex-direction: column;
        gap: 15px;
    }
    
    .story-form {
        padding: 20px;
    }
    
    .form-box {
        padding: 15px;
    }
    
    .form-label {
        font-size: 1rem;
    }
    
    .pill-container {
        justify-content: center;
    }
    
    .pill {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    .generate-btn {
        font-size: 1rem;
        padding: 15px 25px;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .cookie-buttons {
        justify-content: center;
    }
    
    .cookie-btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
}
