@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Lora:ital@0;1&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lora', serif;
    background-color: #f5f0e6;
    color: #333;
    line-height: 1.6;
    padding: 20px;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23b19e7f' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E");
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0d5c1;
}

h1 {
    font-family: 'Cinzel', serif;
    text-align: center;
    color: #732e1c;
    margin-bottom: 10px;
    font-size: 2.5rem;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-style: italic;
}

.input-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #c9b99f;
    border-radius: 4px;
    font-family: 'Lora', serif;
    font-size: 1rem;
}

button {
    background-color: #8b5d33;
    color: white;
    border: none;
    padding: 12px 25px;
    cursor: pointer;
    border-radius: 4px;
    font-family: 'Cinzel', serif;
    font-weight: bold;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #6a4628;
}

.customization-container {
    margin-bottom: 30px;
}

.customization-toggle {
    background: none;
    border: none;
    color: #8b5d33;
    font-family: 'Lora', serif;
    cursor: pointer;
    font-size: 0.9rem;
    display: block;
    margin: 0 auto 10px;
    text-decoration: underline;
}

.customization-options {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.customization-options.expanded {
    max-height: 600px;
    margin-top: 15px;
    margin-bottom: 15px;
}

.option-group {
    display: flex;
    flex-direction: column;
}

.option-group label {
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: #666;
}

select {
    padding: 8px 10px;
    border: 1px solid #c9b99f;
    border-radius: 4px;
    font-family: 'Lora', serif;
    background-color: #f9f5eb;
}

#generate-image-btn {
    background-color: #5d6b8b;
    margin-top: 10px;
}

#generate-image-btn:hover {
    background-color: #455070;
}

.auto-detect-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f0e6d2;
    border-radius: 6px;
    border: 1px dashed #b19e7f;
}

.toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f0e6d2;
    border-radius: 6px;
    border: 1px dashed #b19e7f;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #8b5d33;
}

input:checked + .slider:before {
    transform: translateX(24px);
}

.realism-toggle {
    background-color: #732e1c;
}

.realism-toggle:hover {
    background-color: #591f11;
}

input:checked + .realism-slider {
    background-color: #732e1c;
}

.toggle-label {
    font-weight: bold;
    color: #6a4628;
}

.disabled {
    opacity: 0.5;
    pointer-events: none;
}

select:disabled {
    background-color: #f0f0f0;
    opacity: 0.7;
}

.detected-type {
    margin-top: 10px;
    padding: 8px 12px;
    background-color: #e6e0d2;
    border-radius: 4px;
    text-align: center;
    font-style: italic;
    color: #6a4628;
}

.quote-container {
    margin-top: 30px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s, transform 0.5s;
}

.quote-container.visible {
    opacity: 1;
    transform: translateY(0);
}

.quote-content {
    background-color: #f9f5eb;
    padding: 30px;
    border-radius: 8px;
    border-left: 5px solid #8b5d33;
    margin-bottom: 20px;
    position: relative;
}

.quote-content::before {
    content: '"';
    font-family: 'Cinzel', serif;
    font-size: 5rem;
    color: rgba(139, 93, 51, 0.2);
    position: absolute;
    top: -15px;
    left: 5px;
}

#quote-text {
    font-size: 1.5rem;
    line-height: 1.8;
    margin-bottom: 15px;
    font-style: italic;
}

#quote-reference {
    font-family: 'Cinzel', serif;
    text-align: right;
    font-weight: bold;
    color: #732e1c;
}

.quote-image-container {
    margin-top: 20px;
    text-align: center;
}

.quote-image {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.disclaimer {
    margin-top: 30px;
    text-align: center;
    font-size: 0.9rem;
    color: #888;
}

.hidden {
    display: none;
}

#share-btn {
    display: block;
    margin: 0 auto;
    background-color: #4a5568;
}

#share-btn:hover {
    background-color: #2d3748;
}

.info-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #8b5d33;
    color: white;
    text-align: center;
    line-height: 16px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    margin-left: 5px;
}

.info-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.info-modal.visible {
    display: flex;
}

.info-content {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    position: relative;
}

.info-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    color: #732e1c;
    cursor: pointer;
    line-height: 1;
}

.info-section {
    margin-bottom: 20px;
}

.info-section h3 {
    color: #732e1c;
    margin-bottom: 10px;
    border-bottom: 1px solid #e0d5c1;
    padding-bottom: 5px;
}

.info-section ul {
    padding-left: 20px;
}

.info-section li {
    margin-bottom: 8px;
}

.info-section strong {
    color: #8b5d33;
}

@media (max-width: 600px) {
    .input-container {
        flex-direction: column;
    }
    
    .customization-options {
        grid-template-columns: 1fr;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    #quote-text {
        font-size: 1.2rem;
    }
}