/* Importación de Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,600;0,700;1,400&display=swap');

/* Variables de diseño */
:root {
    --bg-gradient: radial-gradient(circle at top, #1c0e14 0%, #0d0609 100%);
    --wine-dark: #3a0f14;
    --wine-primary: #58181f;
    --wine-light: #722f37;
    --gold-primary: #d4af37;
    --gold-light: #f3e5ab;
    --gold-dark: #aa841a;
    --text-light: #f5f5f5;
    --text-muted: #c8b9be;
    --glass-bg: rgba(26, 15, 20, 0.65);
    --glass-border: rgba(212, 175, 55, 0.12);
    --glass-border-hover: rgba(212, 175, 55, 0.3);
    --shadow-soft: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    --font-serif: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
    --font-sans: 'Inter', Arial, sans-serif;
}

/* Reset y estilos generales */
body {
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    background: var(--bg-gradient);
    color: var(--text-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Header */
header {
    background: rgba(13, 6, 9, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    text-align: center;
    padding: 1.5rem 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    margin: 0;
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 2px;
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-primary) 50%, var(--gold-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Contenedor principal */
main {
    flex: 1;
    max-width: 1000px;
    width: 90%;
    margin: 3rem auto;
    box-sizing: border-box;
}

/* Títulos secundarias */
h2 {
    font-family: var(--font-serif);
    color: var(--gold-primary);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 600;
    position: relative;
}

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 1.5px;
    background: var(--gold-primary);
    margin: 0.8rem auto 0 auto;
}

/* Bienvenida / Index */
.hero-section {
    text-align: center;
    padding: 3rem 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(12px);
    margin-top: 2rem;
}

.hero-section p {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 700px;
    margin: 1.5rem auto 2.5rem auto;
}

/* Botones */
.btn-container {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--wine-primary) 0%, var(--wine-dark) 100%);
    color: var(--gold-light);
    font-family: var(--font-sans);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.9rem;
    padding: 1rem 2.5rem;
    border: 1px solid var(--gold-primary);
    border-radius: 30px;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(88, 24, 31, 0.4);
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
    background: linear-gradient(135deg, var(--wine-light) 0%, var(--wine-primary) 100%);
    color: #fff;
    border-color: #fff;
}

/* Quiz - Formularios */
.quiz-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 2.5rem auto;
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.question-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(12px);
    transition: border-color 0.3s ease;
}

.question-card:hover {
    border-color: var(--glass-border-hover);
}

.question-number {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--gold-primary);
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.question-text {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    margin-top: 0;
    margin-bottom: 1.8rem;
    line-height: 1.3;
    font-weight: 500;
}

/* Opciones de respuesta */
.options-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.option-label {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 1.1rem 1.5rem;
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 1rem;
}

.option-label:hover {
    background: rgba(88, 24, 31, 0.15);
    border-color: rgba(212, 175, 55, 0.3);
    transform: translateX(5px);
}

.option-label input[type="radio"] {
    appearance: none;
    background-color: transparent;
    margin: 0 1rem 0 0;
    font: inherit;
    color: var(--gold-primary);
    width: 20px;
    height: 20px;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    display: grid;
    place-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.option-label input[type="radio"]::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    transform: scale(0);
    transition: 120ms transform ease-in-out;
    background-color: var(--gold-primary);
}

.option-label input[type="radio"]:checked {
    border-color: var(--gold-primary);
}

.option-label input[type="radio"]:checked::before {
    transform: scale(1);
}

.option-label:has(input[type="radio"]:checked) {
    background: rgba(88, 24, 31, 0.3);
    border-color: var(--gold-primary);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.1);
}

/* Tarjetas de Recomendaciones (Resultados) */
.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.wine-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 1.8rem;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.wine-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--gold-primary), var(--wine-light));
    opacity: 0.7;
}

.wine-card:hover {
    transform: translateY(-8px);
    border-color: var(--gold-primary);
    box-shadow: 0 12px 30px rgba(212, 175, 55, 0.15);
}

.wine-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.wine-title {
    font-family: var(--font-serif);
    font-size: 1.45rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.25;
    color: #fff;
}

/* Match Rate Badge */
.match-badge {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--gold-primary);
    border-radius: 30px;
    padding: 0.4rem 0.8rem;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gold-primary);
    white-space: nowrap;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

/* Atributos básicos del vino */
.wine-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.2rem;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 0.8rem;
}

.meta-item {
    display: flex;
    flex-direction: column;
}

.meta-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 0.15rem;
}

.meta-value {
    font-weight: 500;
    color: var(--gold-light);
}

/* Sentimiento del mercado */
.sentiment-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.04);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    margin-bottom: 1.2rem;
}

.sentiment-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.sentiment-Positivo { color: #81c784; }
.sentiment-Positivo .sentiment-dot { background-color: #4caf50; }
.sentiment-Negativo { color: #e57373; }
.sentiment-Negativo .sentiment-dot { background-color: #f44336; }
.sentiment-Neutral { color: #e0e0e0; }
.sentiment-Neutral .sentiment-dot { background-color: #9e9e9e; }

/* Explicación Dinámica */
.wine-explanation {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-muted);
    background: rgba(88, 24, 31, 0.1);
    border-left: 2px solid var(--wine-light);
    padding: 0.8rem 1rem;
    border-radius: 0 8px 8px 0;
    margin-bottom: 1.5rem;
    font-style: italic;
}

/* Barras de Atributos Sensoriales */
.wine-attributes {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.attribute-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
}

.attribute-name {
    width: 100px;
    text-transform: capitalize;
    color: var(--text-muted);
}

.attribute-bar-bg {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    height: 6px;
    border-radius: 3px;
    margin: 0 0.8rem;
    overflow: hidden;
}

.attribute-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--wine-light) 0%, var(--gold-primary) 100%);
    border-radius: 3px;
}

.attribute-value {
    width: 30px;
    text-align: right;
    font-weight: 500;
    color: var(--gold-light);
}

/* Footer */
footer {
    background: rgba(13, 6, 9, 0.95);
    border-top: 1px solid rgba(212, 175, 55, 0.08);
    text-align: center;
    padding: 2rem 1rem;
    margin-top: auto;
    font-size: 0.85rem;
    color: var(--text-muted);
}

footer p {
    margin: 0;
}

/* Responsividad */
@media (max-width: 600px) {
    header h1 {
        font-size: 1.8rem;
    }
    h2 {
        font-size: 2rem;
    }
    .question-text {
        font-size: 1.35rem;
    }
    .wine-card {
        padding: 1.4rem;
    }
}
