/* =========================================
   AMIGO OCULTO - MAGIC CHRISTMAS THEME
   ========================================= */

:root {
    /* Palette Inspired by Classic Christmas */
    --red-classic: #D42426;
    --red-dark: #8B0000;
    --green-pine: #165B33;
    --green-light: #2E8B57;
    --gold: #F8B229;
    --gold-dim: #D4AF37;
    --snow: #F8F9FA;
    --bg-dark: #2C0A0A;

    /* Variables */
    --primary: var(--red-classic);
    --primary-hover: var(--red-dark);
    --accent: var(--gold);
    --success: var(--green-pine);

    --text-main: #FFFFFF;
    --text-dark: #2C0A0A;
    --text-muted: #E2E8F0;

    /* Glass / Card Look */
    /* Warm, rich glass effect */
    --glass-bg: rgba(90, 10, 10, 0.7);
    --glass-border: rgba(248, 178, 41, 0.3);
    /* Gold border */
    --radius-xl: 24px;
    --radius-md: 16px;

    --font-heading: 'Mountains of Christmas', cursive;
    --font-body: 'Outfit', sans-serif;

    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-body);
    background: radial-gradient(circle at center top, #7F1D1D 0%, #450A0A 60%, #1A0505 100%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    font-size: 16px;
}

/* Decoration Pattern (Subtle Stars/Sparkles) */
.bg-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: radial-gradient(#F8B229 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.1;
    pointer-events: none;
}

/* Snow Container (Canvas fallback/base) */
.snow-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

/* Main Container */
main {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 2rem 1.5rem 5rem;
    z-index: 10;
    flex-grow: 1;
}

/* Typography */
h1 {
    font-family: var(--font-heading);
    font-size: 48px;
    /* Big festive title */
    text-align: center;
    color: var(--gold);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
    line-height: 1.1;
}

h2 {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--snow);
}

p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Cards */
.card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    animation: fadeUp 0.8s ease-out;
}

/* Candy Cane Animated Border */
@keyframes candyStripe {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 50px 0;
    }
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 12px;
    /* Thicker for visibility */
    background: repeating-linear-gradient(45deg,
            var(--red-classic),
            var(--red-classic) 15px,
            #ffffff 15px,
            #ffffff 25px,
            var(--green-pine) 25px,
            var(--green-pine) 35px,
            #ffffff 35px,
            #ffffff 45px);
    background-size: 200% auto;
    animation: candyStripe 3s linear infinite;
    z-index: 2;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Inputs */
.input-group {
    margin-bottom: 1.2rem;
    position: relative;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--gold);
}

input[type="text"],
input[type="password"],
input[type="date"],
textarea,
select {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    color: #fff;
    font-size: 1rem;
    font-family: var(--font-body);
    transition: all 0.3s ease;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 15px rgba(248, 178, 41, 0.15);
}

/* Buttons */
.btn {
    width: 100%;
    padding: 1.1rem;
    background: linear-gradient(180deg, var(--green-light) 0%, var(--green-pine) 100%);
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    box-shadow: 0 8px 0 #0e4c27, 0 15px 20px rgba(0, 0, 0, 0.4);
    /* 3D Button Effect */
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
    margin-bottom: 0.5rem;
    margin-top: 0.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.btn:active {
    transform: translateY(4px);
    box-shadow: 0 4px 0 #0e4c27, 0 5px 10px rgba(0, 0, 0, 0.4);
}

/* Golden Shine Animation on Button */
.btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 20%;
    height: 200%;
    background: rgba(255, 255, 255, 0.4);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        left: -60%;
    }

    20% {
        left: 150%;
    }

    100% {
        left: 150%;
    }
}

.btn-secondary {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: none;
    color: var(--text-muted);
    text-transform: none;
    font-weight: 600;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-secondary:active {
    transform: scale(0.98);
}

.btn-secondary::after {
    display: none;
}

/* Name Grid */
.name-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 1rem;
}

.name-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 1rem 0.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.name-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.name-btn.filled {
    background: rgba(34, 197, 94, 0.2);
    border-color: var(--green-light);
    color: #fff;
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.2);
}

.name-btn.filled::before {
    content: '🎁 ';
}

/* Add gift icon */

/* Word Cloud */
.trending-canvas {
    width: 100%;
    height: 300px;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    animation: fadeIn 0.3s;
}

.modal-content {
    background: #2C0A0A;
    border: 2px solid var(--gold);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 450px;
    padding: 2rem;
    position: relative;
    box-shadow: 0 0 50px rgba(248, 178, 41, 0.2);
    animation: popIn 0.4s var(--ease-bounce);
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 480px) {
    .name-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    h1 {
        font-size: 38px;
    }

    .card {
        padding: 1.5rem;
    }
}

/* Counter Box */
.counter-box {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 1rem;
    text-align: center;
    margin-bottom: 2rem;
}

.counter-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--gold);
    line-height: 1;
    margin-bottom: 0.3rem;
    font-family: var(--font-heading);
}

.counter-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.8;
}

/* Footer */
.app-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    font-size: 0.75rem;
    color: var(--text-muted);
    z-index: 50;
}

.app-footer .credits {
    opacity: 0.7;
}

.app-footer .version {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 500;
    opacity: 0.6;
}