:root {
    --bg-color: #121212; /* Fondo muy oscuro */
    --text-color: #f5f5f7; /* Texto claro */
    --card-bg: #1e1e1e; /* Tarjetas gris oscuro */
    --accent-color: #e89b00; /* Color cerveza */
    --hover-color: #2c2c2c; /* Hover más claro que el fondo */
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.4); /* Sombra más fuerte para modo oscuro */
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    /* Intenta cargar una imagen de fondo si existe - Comentado porque no existe el archivo */
    /* background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('assets/fondo.jpg'); */
    /* background-size: cover; */
    /* background-position: center; */
    /* background-attachment: fixed; */
    color: var(--text-color);
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 20px 20px; /* Reducido de 40px a 20px para subir el contenido */
    text-align: center;
    flex: 1;
    position: relative; /* Para posicionar el selector de idioma */
}

/* Language Switcher Toggle */
.lang-toggle-container {
    position: absolute;
    top: 15px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
}

.lang-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #666;
    transition: color 0.3s;
    font-family: 'Luckiest Guy', cursive; /* Opcional, para mantener estilo */
    letter-spacing: 1px;
}

.lang-label.active {
    color: #fff; /* Activo brilla */
}

.toggle-switch {
    width: 60px;
    height: 32px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    position: relative;
    cursor: pointer;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    transition: background-color 0.3s;
}

.toggle-knob {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    position: absolute;
    top: 1px;
    left: 31px; /* Posición inicial: Derecha (ES) */
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    overflow: hidden; /* Para recortar la bandera en círculo */
    background-color: #ddd; /* Fallback */
}

/* Estado Activo (EN) -> Mover a la izquierda */
.toggle-switch.active .toggle-knob {
    transform: translateX(-30px); /* Mueve a la izquierda */
}

/* Banderas dentro del knob */
.flag-icon {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.3s;
}

/* Por defecto se ve la bandera de ES (Chile) */
.flag-es {
    opacity: 1;
    background-image: url('assets/esp.png');
    background-size: cover;
    background-position: center;
}
/* Eliminamos el pseudo-elemento CSS anterior */
.flag-es::before {
    content: none;
}

/* Cuando switch está activo (EN), mostramos bandera EN y ocultamos ES */
.toggle-switch.active .flag-en {
    opacity: 1;
}
.toggle-switch.active .flag-es {
    opacity: 0;
}

/* Bandera USA (Imagen) */
.flag-en {
    background-image: url('assets/ing.png');
    background-size: cover;
    background-position: center;
}
/* Eliminamos el pseudo-elemento CSS anterior */
.flag-en::before {
    content: none;
}

/* Header Section */
.profile-header {
    margin-bottom: 30px;
    margin-top: 30px; /* Espacio extra para que no choque con las banderas */
}

.logo-container {
    width: 100%;
    max-width: 250px; /* Ancho máximo controlado pero generoso */
    margin: 0 auto 5px; /* Menos margen inferior */
    background-color: transparent; 
    box-shadow: none; 
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Contain para que no se recorte */
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)); /* Sombra al logo mismo */
}

.brand-name {
    font-size: 1.6rem;
    font-weight: 400; /* Regular, Luckiest Guy ya es bold */
    font-family: 'Luckiest Guy', cursive;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.tagline {
    font-size: 1.1rem;
    font-weight: 400;
    font-family: 'Luckiest Guy', cursive;
    color: #ccc;
    margin-bottom: 24px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    letter-spacing: 0.5px;
}

/* Award Section */
.award-section {
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.95), rgba(45, 45, 45, 0.9));
    border: 1px solid rgba(192,192,192,0.3);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.award-content-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    position: relative;
    z-index: 2; /* Encima del confeti */
}

.award-image-side {
    flex: 0 0 auto;
    width: 35%; /* La botella ocupa un tercio aprox */
    display: flex;
    justify-content: center;
}

.award-beer-img {
    max-height: 180px;
    width: auto;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.5));
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.award-beer-img:hover {
    transform: scale(1.1) rotate(3deg);
}

.award-text-side {
    flex: 1;
    text-align: left;
}

.award-badge {
    display: inline-block;
    background: linear-gradient(45deg, #bdc3c7, #2c3e50); /* Plateado metálico */
    color: #fff;
    padding: 6px 16px; /* Un poco más grande el padding */
    border-radius: 12px;
    font-size: 1rem; /* Texto más grande */
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border: 1px solid #7f8c8d;
}

.award-section h3 {
    color: #fff;
    font-size: 1.4rem;
    margin-bottom: 4px;
    font-weight: 800;
    line-height: 1.2;
}

.award-cup {
    color: #e0e0e0;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.award-category {
    font-size: 0.75rem;
    color: #aaa;
    font-style: italic;
    line-height: 1.3;
}

/* Confetti Animation */
.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.confetti {
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: #f0f;
    animation: confetti-fall 4s linear infinite;
    opacity: 0;
}

/* Posiciones y colores aleatorios para el confeti */
.confetti:nth-child(1) { left: 10%; background-color: #e89b00; animation-delay: 0s; }
.confetti:nth-child(2) { left: 20%; background-color: #bdc3c7; animation-delay: 2s; } /* Plateado */
.confetti:nth-child(3) { left: 30%; background-color: #3498db; animation-delay: 4s; }
.confetti:nth-child(4) { left: 40%; background-color: #e74c3c; animation-delay: 1s; }
.confetti:nth-child(5) { left: 50%; background-color: #f1c40f; animation-delay: 3s; }
.confetti:nth-child(6) { left: 60%; background-color: #9b59b6; animation-delay: 1.5s; }
.confetti:nth-child(7) { left: 70%; background-color: #2ecc71; animation-delay: 2.5s; }
.confetti:nth-child(8) { left: 80%; background-color: #e89b00; animation-delay: 0.5s; }
.confetti:nth-child(9) { left: 90%; background-color: #bdc3c7; animation-delay: 3.5s; } /* Plateado */
.confetti:nth-child(10) { left: 95%; background-color: #e67e22; animation-delay: 1.2s; }

@keyframes confetti-fall {
    0% {
        transform: translateY(-10px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(200px) rotate(720deg);
        opacity: 0;
    }
}

/* Beer Carousel Section */
.beer-carousel-container {
    margin-bottom: 30px;
    text-align: left;
}

.section-title {
    font-family: 'Luckiest Guy', cursive;
    color: var(--accent-color);
    font-size: 1.4rem;
    margin-bottom: 15px;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    font-weight: 400;
}

.beer-carousel {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding-bottom: 20px; /* Espacio para scrollbar/sombra */
    padding-left: 5px;
    padding-right: 5px;
    -webkit-overflow-scrolling: touch; /* Smooth scroll en iOS */
    scrollbar-width: none; /* Firefox */
}

.beer-carousel::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Webkit */
}

.beer-card {
    flex: 0 0 80%; /* Ancho de la tarjeta en el carrusel */
    max-width: 260px;
    background-color: rgba(30, 30, 30, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.2s;
    scroll-snap-align: center; /* Centrar al soltar scroll */
}

.beer-card:hover {
    transform: translateY(-5px);
    background-color: rgba(40, 40, 40, 0.8);
}

.beer-img-container {
    height: 180px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-beer-img {
    max-height: 100%;
    width: auto;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.6));
}

.beer-info h3 {
    font-family: 'Luckiest Guy', cursive;
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 5px;
    font-weight: 400;
    letter-spacing: 0.5px;
    text-align: center;
}

.beer-style {
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    text-align: center;
}

.beer-stats {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 0.85rem;
    color: #ccc;
    background: rgba(0,0,0,0.3);
    padding: 5px 10px;
    border-radius: 10px;
    width: 100%;
}

.beer-desc {
    font-size: 0.85rem;
    color: #ddd;
    line-height: 1.4;
    text-align: center;
}


/* History Section */
.history-section {
    background-color: rgba(30, 30, 30, 0.7);
    border-radius: 20px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    text-align: left;
}

.history-section summary {
    padding: 15px 20px;
    cursor: pointer;
    font-weight: 400; /* Regular, Luckiest Guy es bold */
    font-family: 'Luckiest Guy', cursive; /* Solo el título en fuente alocada */
    font-size: 1.1rem; /* Un poco más grande */
    letter-spacing: 0.5px;
    color: var(--accent-color);
    list-style: none; /* Ocultar triángulo default */
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(0,0,0,0.2);
    transition: background-color 0.2s;
}

.history-section summary:hover {
    background-color: rgba(0,0,0,0.4);
}

.history-section summary::-webkit-details-marker {
    display: none;
}

.history-section summary::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 300;
    color: #888;
}

details[open] summary::after {
    content: '-';
}

.history-content {
    padding: 20px;
    font-size: 0.95rem;
    color: #e0e0e0;
    border-top: 1px solid rgba(255,255,255,0.05);
    animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.history-content p {
    margin-bottom: 12px;
}

.history-content strong {
    color: #fff;
}

.final-toast {
    text-align: center;
    font-weight: bold;
    color: #e89b00 !important;
    font-size: 1.1rem;
    margin-top: 15px;
    margin-bottom: 5px !important;
}

.hashtags {
    font-size: 0.8rem;
    color: #888;
    text-align: center;
    margin-top: 10px;
    margin-bottom: 15px;
    font-style: italic;
    line-height: 1.4;
}

.ig-link-btn {
    display: inline-block;
    width: 100%;
    text-align: center;
    margin-top: 10px;
    padding: 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    color: #aaa;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.ig-link-btn:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}


/* Links Section */
.links-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 30px; /* Agregado espacio para separar de la historia */
}

.link-card {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(30, 30, 30, 0.9); /* Semi-transparente */
    backdrop-filter: blur(10px); /* Efecto vidrio */
    padding: 16px 20px;
    border-radius: 50px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 400; /* Regular, ya que esta fuente es bold por defecto */
    font-family: 'Luckiest Guy', cursive; /* Nueva fuente alocada */
    font-size: 1.1rem; /* Un poco más grande para mejor legibilidad */
    letter-spacing: 0.5px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s;
    border: 1px solid rgba(255,255,255,0.1); /* Borde sutil */
    position: relative;
}

.link-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
    background-color: rgba(50, 50, 50, 0.95);
    border-color: rgba(255,255,255,0.2);
}

.link-icon {
    width: 24px;
    height: 24px;
    margin-right: 12px;
    position: absolute;
    left: 24px;
    fill: currentColor; /* Para que tome el color del texto/clase */
}

.emoji-icon {
    font-size: 1.5rem; /* Tamaño adecuado para el emoji */
    display: flex;
    align-items: center;
    justify-content: center;
    top: 50%;
    transform: translateY(-50%); /* Centrado vertical perfecto */
    /* width y height heredados de .link-icon o ajustados si es necesario */
}

/* Specific button styles - Colores más brillantes para fondo oscuro */
.link-card.whatsapp {
    color: #4ade80; /* Verde más brillante */
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.link-card.instagram {
    color: #f472b6; /* Rosa más brillante */
    border: 1px solid rgba(244, 114, 182, 0.3);
}

.link-card.facebook {
    color: #60a5fa; /* Azul más brillante */
    border: 1px solid rgba(96, 165, 250, 0.3);
}

.link-card.carta {
    background-color: rgba(232, 155, 0, 0.15); /* Fondo sutil naranja */
    color: #fbbf24; /* Dorado/Amarillo cerveza */
    border: 1px solid rgba(251, 191, 36, 0.4);
    font-weight: 700;
}

.link-card.carta:hover {
    background-color: rgba(232, 155, 0, 0.25);
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 20px;
    font-size: 0.9rem;
    color: #888;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    margin-top: 20px;
}

footer p {
    margin-bottom: 8px;
}

footer a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.2s;
}

footer a:hover {
    color: #e89b00;
    text-decoration: underline;
}
