:root {
    --primary-color: #6a11cb;
    --secondary-color: #2575fc;
    --text-color: #333;
    --light-color: #f8f9fa;
    --border-radius: 12px;
}

/* Añadir box-sizing global */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0.3rem 0;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    color: var(--text-color);
}

.container {
    width: 90%;
    max-width: 800px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
    margin: 0.5rem auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: auto;
    min-height: auto;
    overflow-y: visible;
    box-sizing: border-box;
}

h1 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: #555;
}

.panel {
    background-color: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.panel-title {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    align-self: flex-start;
}

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

textarea:focus {
    border-color: var(--secondary-color);
    outline: none;
}

.input-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
    text-align: left;
}

button {
    padding: 1rem 2rem;
    font-size: 1.2rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    font-weight: 600;
    letter-spacing: 0.5px;
    border: none;
    margin: 0.5rem;
    min-width: 200px;
}

.primary-btn {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    margin: 1.5rem 0;
}

.secondary-btn {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

button:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

button:active:not(:disabled) {
    transform: translateY(1px);
}

button:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.image-container {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.result-image {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: none;
    margin-top: 1rem;
    object-fit: contain;
    border: 1px solid #e0e0e0;
    background-color: #f9f9f9;
    padding: 10px;
}

.loader {
    display: none;
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--secondary-color);
    animation: spin 1s ease-in-out infinite;
    margin: 2rem auto;
}

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

.download-btn {
    background-color: #4CAF50;
    color: white;
    display: none;
    margin-top: 1rem;
}

.footer {
    margin-top: 2rem;
    font-size: 0.9rem;
    color: #777;
}

.params-info {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    padding: 0.8rem;
    margin-top: 1rem;
    text-align: left;
    font-size: 0.9rem;
    color: #666;
}

.status-message {
    display: none;
    padding: 0.8rem;
    margin: 1rem 0;
    border-radius: var(--border-radius);
    background-color: #f8d7da;
    color: #721c24;
    text-align: center;
} 

.input-group {
    width: 100%;
}

/* Estilos para las recomendaciones de prompts colapsables */
.prompt-tips {
    background-color: #f0f7ff;
    border: 1px solid #d0e3ff;
    border-radius: var(--border-radius);
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #333;
    text-align: left;
    overflow: hidden;
}

.tips-header {
    padding: 0.8rem 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(208, 227, 255, 0.3);
    transition: background-color 0.2s;
}

.tips-header:hover {
    background-color: rgba(208, 227, 255, 0.5);
}

.tips-title {
    font-weight: 600;
    color: var(--primary-color);
}

.toggle-icon {
    font-size: 0.8rem;
    color: var(--primary-color);
    transition: transform 0.3s;
}

.tips-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 1rem;
}

.tips-content.show {
    max-height: 500px; /* Altura máxima cuando está expandido */
    padding: 1rem;
}

.tips-list {
    margin: 0;
    padding-left: 1.5rem;
}

.tips-list li {
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.example {
    font-style: italic;
    color: #0066cc;
    background-color: rgba(0, 102, 204, 0.05);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
}

/* Media queries para dispositivos móviles */
@media screen and (max-width: 768px) {
    .container {
        width: 90%;
        padding: 1rem;
        margin: 0.5rem auto;
    }
    
    button {
        min-width: 150px;
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .panel {
        padding: 1rem;
    }
    
    .image-container {
        max-width: 100%;
    }
    
    .prompt-tips {
        padding: 0.8rem;
        font-size: 0.85rem;
    }
    
    .tips-list {
        padding-left: 1.2rem;
    }
}

@media screen and (max-width: 480px) {
    .container {
        width: 95%;
        padding: 0.8rem;
        margin: 0.3rem auto;
    }
    
    button {
        min-width: 120px;
        width: 80%;
        margin: 0.5rem auto;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    p {
        font-size: 1rem;
    }
    
    .prompt-tips {
        padding: 0.6rem;
        font-size: 0.8rem;
    }
    
    .tips-list li {
        margin-bottom: 0.4rem;
    }
}