@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css'); /* Font Awesome actualizado */

:root {
    --primary-color: #4a5568; /* Gris oscuro azulado */
    --accent-color: #5a67d8; /* Indigo suave */
    --background-color: #f7fafc; /* Gris muy claro */
    --card-background: #ffffff;
    --text-color: #2d3748; /* Gris muy oscuro */
    --light-text-color: #718096; /* Gris medio */
    --border-color: #e2e8f0; /* Gris claro */
    --error-color: #e53e3e;
    --success-color: #38a169;
    --font-sans: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 15px; /* Más padding vertical */
    min-height: 100vh;
}

.container {
    max-width: 600px; /* Un poco más ancho */
    width: 100%;
    margin: 30px auto;
}

/* --- Header --- */
header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 2.8em;
    letter-spacing: -1px; /* Ajuste tipográfico */
    margin-bottom: 8px;
}

header p {
    color: var(--light-text-color);
    font-size: 1.15em;
}

/* --- Card --- */
.card {
    background-color: var(--card-background);
    padding: 35px 30px; /* Más padding */
    border-radius: 16px; /* Bordes más redondeados */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07); /* Sombra más suave */
    border: 1px solid var(--border-color); /* Borde sutil */
    width: 100%;
    margin-bottom: 30px; /* Espacio antes del footer o resultado */
}

.card h2 {
    text-align: center;
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 1.9em;
    font-weight: 700;
}

.card h3 {
    font-size: 1.4em;
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--accent-color);
    font-weight: 600;
}

.card p {
    margin-bottom: 20px;
    font-size: 1.05em;
    white-space: pre-wrap; /* por si usas \n para saltos manuales */
    color: var(--text-color);
}

.card .subtitle {
    text-align: center;
    color: var(--light-text-color);
    margin-bottom: 30px;
    font-size: 1em;
}

/* --- Form --- */
.form-group {
    margin-bottom: 25px; /* Más espacio entre grupos */
}

.form-group label {
    display: block;
    margin-bottom: 10px; /* Más espacio label/input */
    font-weight: 500; /* Un poco menos grueso */
    color: var(--primary-color);
    font-size: 0.95em;
}

.form-group label i {
    margin-right: 8px;
    color: var(--accent-color);
    width: 18px; /* Alineación iconos */
    text-align: center;
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 14px 18px; /* Padding más generoso */
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1em;
    color: var(--text-color);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff; /* Asegurar fondo blanco */
}

.form-group textarea {
    min-height: 100px;
    resize: vertical; /* Permitir redimensionar verticalmente */
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(90, 103, 216, 0.2); /* Sombra de foco */
}

/* --- Image Upload --- */
.image-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 12px; /* Más redondeado */
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s ease, background-color 0.3s ease;
    margin-bottom: 15px; /* Espacio antes de la preview */
    position: relative;
    background-color: #fdfdff; /* Fondo muy ligero */
}

.image-upload-area:hover {
    border-color: var(--accent-color);
    background-color: #f8f9ff;
}

.image-upload-area i {
    font-size: 2.8em;
    color: var(--accent-color);
    margin-bottom: 12px;
}

.image-upload-area p {
    color: var(--light-text-color);
    font-weight: 500;
    font-size: 1.05em;
}

#outfit_images_input { /* ID del input file real */
  position: absolute;
  left: 0; top: 0; width: 100%; height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* --- Image Preview Area --- */
#image_preview_container {
    display: flex; /* Usar flex para alinear previews */
    flex-wrap: wrap; /* Permitir que pasen a la siguiente línea */
    gap: 10px; /* Espacio entre previews */
    margin-top: 15px;
    min-height: 50px; /* Un mínimo de altura por si no hay imágenes */
}

.img-preview {
    width: 80px; /* Tamaño fijo para previews */
    height: 80px;
    object-fit: cover; /* Asegura que la imagen cubra el área sin deformarse */
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* --- Textarea Counter --- */
.char-counter {
    display: block;
    text-align: right;
    font-size: 0.85em;
    color: var(--light-text-color);
    margin-top: 5px;
    height: 1em; /* Evitar saltos de layout */
}

/* --- Submit Button --- */
.submit-btn {
    display: block;
    width: 100%;
    padding: 16px; /* Botón más grande */
    background-color: var(--accent-color);
    color: var(--card-background);
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 500; /* Peso medio */
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    text-align: center;
    margin-top: 10px; /* Espacio sobre el botón */
}

.submit-btn i {
    margin-right: 10px;
}

.submit-btn:hover {
    background-color: #4c51bf; /* Un poco más oscuro */
}

.submit-btn:active {
     transform: translateY(1px); /* Efecto pulsado */
}

.submit-btn:disabled {
    background-color: #a0aec0; /* Gris claro para deshabilitado */
    cursor: not-allowed;
    transform: none;
}

/* --- Result Page Specific Styles --- */
.result-container { /* Contenedor en result.php */
    margin-top: 20px;
}

.result-card { /* Reutilizamos card pero podemos ajustar */
    padding: 35px 30px;
    text-align: left; /* Alinear texto a la izquierda */
}

.result-card h3 {
    color: var(--accent-color);
    margin-bottom: 20px;
    font-size: 1.5em;
    text-align: center;
    border-bottom: 1px solid var(--border-color); /* Separador */
    padding-bottom: 15px;
}

.result-card p {
    color: var(--text-color);
    line-height: 1.8; /* Más espacio entre líneas para resultado */
    white-space: pre-wrap; /* Respetar saltos de línea de la IA */
    font-size: 1.05em; /* Ligeramente más grande */
}

.result-card p strong, .result-card p b {
    color: var(--primary-color); /* Resaltar negritas */
    font-weight: 700;
}

/* --- Error Message Styling --- */
.error-message { /* Se usa en result.php si hay error */
    color: var(--error-color);
    background-color: #fed7d7; /* Fondo rojo claro */
    border: 1px solid #fbcfe8; /* Borde rosa */
    border-left: 4px solid var(--error-color); /* Barra lateral */
    padding: 15px 20px;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 1em;
    line-height: 1.5;
}
.error-message strong {
    display: block;
    margin-bottom: 5px;
    font-weight: 700;
}

/* --- Footer --- */
footer {
    text-align: center;
    margin-top: 50px;
    color: var(--light-text-color);
    font-size: 0.9em;
}

/* -- Adsense Placeholders (Ejemplo - Ajustar según necesites) -- */
.ad-placeholder {
    background-color: #e2e8f0;
    min-height: 90px; /* Altura mínima ejemplo */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--light-text-color);
    font-size: 0.9em;
    margin: 30px 0;
    border: 1px dashed var(--border-color);
    border-radius: 8px;
}

.privacy-focus {
    background-color: #f9fafb;
    border-left: 4px solid var(--accent-color);
    padding: 25px 20px;
    border-radius: 12px;
    margin: 30px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

/* -- privacy-focus -- */
.privacy-focus h3 {
    font-size: 1.3em;
    margin-bottom: 15px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.privacy-focus ul {
    padding-left: 20px;
    margin: 15px 0;
}

.privacy-focus li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.cta-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: #fff;
    padding: 14px 24px;
    font-size: 1.1em;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.cta-button:hover {
    background-color: #4c51bf;
    transform: scale(1.03);
}

.center-text {
    text-align: center;
    margin-top: 30px;
}