:root {
    --primary-color: #8e44ad;
    --secondary-color: #3498db;
    --accent-color: #f39c12;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --success-color: #2ecc71;
    --error-color: #e74c3c;
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f5f7fa;
    color: var(--dark-color);
    line-height: 1.6;
    background-image: radial-gradient(circle at 1px 1px, #e0e0e0 1px, transparent 0);
    background-size: 40px 40px;
}

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

header {
    text-align: center;
    margin-bottom: 3rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background-image: var(--gradient-primary);
    -webkit-background-clip: text;
    color: transparent;
}

.tagline {
    font-size: 1.2rem;
    color: #666;
}

.input-container {
    margin-bottom: 2rem;
    text-align: center;
}

textarea {
    width: 100%;
    min-height: 100px;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: var(--border-radius);
    resize: vertical;
    font-family: inherit;
    font-size: 1rem;
    margin-bottom: 1rem;
    transition: var(--transition);
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(142, 68, 173, 0.2);
}

button {
    background-image: var(--gradient-primary);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: var(--box-shadow);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(0,0,0,0.15);
}

button:active {
    transform: translateY(0);
    box-shadow: var(--box-shadow);
}

.hidden {
    display: none;
}

#loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 2rem 0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(142, 68, 173, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 1rem;
}

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

#result-container {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}

#festival-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 2rem;
}

#festival-name-container {
    flex: 1;
    min-width: 300px;
}

#festival-name {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

#festival-tagline {
    font-size: 1.2rem;
    font-style: italic;
    color: #666;
}

#festival-poster-container {
    flex: 1;
    max-width: 400px;
    min-width: 300px;
}

#festival-poster {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.tabs {
    display: flex;
    border-bottom: 2px solid #eee;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    gap: 0.5rem;
}

.tab-btn {
    background: none;
    color: #666;
    border: none;
    padding: 0.8rem 1.2rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: none;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    color: var(--primary-color);
    transform: none;
    box-shadow: none;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.info-section {
    margin-bottom: 2rem;
}

.info-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 0.5rem;
}

.info-section ul {
    list-style-type: none;
}

.info-section li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.info-section li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.visual-section {
    margin-bottom: 3rem;
}

.visual-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.image-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.image-container img {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.actions {
    margin-top: 2rem;
    text-align: center;
}

#regenerate-btn {
    background-image: linear-gradient(135deg, var(--accent-color), #e67e22);
}

footer {
    text-align: center;
    margin-top: 2rem;
    color: #888;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    #festival-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
}

