html,
body,
button,
input,
label,
div,
h1,
h2,
h3,
span,
p {
    font-family: 'Mountains of Christmas', cursive !important;
    letter-spacing: 0.5px;
    /* Optional: slight handwritten feel */
}

body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: url("bg2.jpg") no-repeat center/cover fixed;
}

.dim-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(2px);
    z-index: 999;
    display: none;
    /* will be 'flex' in JS */
    justify-content: center;
    align-items: center;
}

.overlay-content {
    color: #fff;
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    padding: 20px;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.9), 0 0 12px rgba(255, 255, 255, 0.5);
    letter-spacing: 1px;
    animation: subtlePulse 1.8s ease-in-out infinite alternate;

    max-width: 95vw;
    /* 🔹 limit to viewport */
    margin: 0 auto;
    /* 🔹 center it */
    box-sizing: border-box;
}


.tile-btn {
    background: url("gift.jpg") center/cover no-repeat;
    border-radius: 10px;
    height: 100px;
    border: 3px solid #FF4B62;
    font-size: 0;
    transition: transform .15s ease;
}

.tile-btn:hover:not(:disabled) {
    transform: scale(1.05);
}

.tile-btn.revealed {
    background-image: none;
    background-color: #00873E;
    font-size: 32px;
    font-weight: 600;
    color: white;
}

/* Gray-out style for tiles that were not chosen */
.tile-btn.tile-disabled {
    filter: grayscale(100%);
    opacity: 0.45;
    cursor: default;
    transform: none !important;
}

/* Generic fade helper */
.fade-step {
    opacity: 0;
    transition: opacity 1s ease;
}

.fade-step.show {
    opacity: 1;
}

/* Tile + name fade */
.reveal-tile,
.reveal-name {
    opacity: 0;
    transition: opacity 1s ease;
}

.reveal-tile.show,
.reveal-name.show {
    opacity: 1;
}

/* Main Christmas card in the center */
.christmas-card {
    background: rgba(0, 0, 0, 0.55);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
}

/* Title styling */
.christmas-title {
    font-family: 'Mountains of Christmas', cursive;
    font-size: clamp(2.2rem, 4vw, 3rem);
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

/* subtle line with 'snow' effect */
.snow-line {
    height: 4px;
    width: 140px;
    margin: 0.5rem auto 1.5rem;
    background: linear-gradient(90deg, #00873E, #D6001C);
    border-radius: 999px;
    position: relative;
    overflow: hidden;
}

.snow-line::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0, transparent 60%);
    mix-blend-mode: screen;
    animation: snow-glow 3s linear infinite;
}

.typing {
    display: inline-block;
    border-right: 3px solid rgba(255, 255, 255, 0.8);
    white-space: nowrap;
    /* ne lomi vrstice */
    overflow: hidden;
    max-width: 95vw;
    /* varnost, da ne gre čez ekran */
    font-size: 2rem;
    animation: typing 1.4s steps(30, end), blink .8s step-end infinite;
}

@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}


@keyframes snow-glow {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

@keyframes subtlePulse {
    0% {
        transform: scale(1);
        opacity: .85;
    }

    100% {
        transform: scale(1.04);
        opacity: 1;
    }
}

/* Small helper text under title */
.christmas-subtitle {
    color: #f8f9fa;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

/* Input + label tweaks */
.christmas-card .form-label {
    color: #fff;
    font-weight: 500;
}

.christmas-card .form-control {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 999px;
}

.christmas-card .form-control:focus {
    border-color: #D6001C;
    box-shadow: 0 0 0 0.2rem rgba(214, 0, 28, 0.35);
}

.btn-primary {
    background: linear-gradient(145deg, #00c45b, #00873E);
    border-color: #00873E;
    border-width: 2px;
    border-radius: 999px;
    font-weight: 700;
    padding: 0.6rem 1.8rem;
    font-size: 1.15rem;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
    transition: transform .15s ease, box-shadow .25s ease;
}

/* "Admin" buttons – just tuck them visually a bit */
#createSantaBtn,
#resetSantaBtn {
    border-radius: 999px;
    font-size: 0.8rem;
    padding: 0.35rem 0.75rem;
    opacity: 0.75;
}

.loading-bar-wrapper {
    margin-top: 20px;
    width: 100%;
    max-width: 400px;
    height: 8px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    overflow: hidden;
    margin-inline: auto;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.7);
}

.loading-bar {
    height: 100%;
    width: 0%;
    background: #00c45b;
    border-radius: inherit;
    animation-name: loadingFill;
    animation-timing-function: linear;
    animation-fill-mode: forwards;
}

@keyframes loadingFill {
    from {
        width: 0%;
    }

    to {
        width: 100%;
    }
}