

.advent-page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.advent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    width: 100%;
    margin-bottom: 2.5rem;
}

.advent-door {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    cursor: pointer;
    border-radius: 14px;
    transition: box-shadow 0.25s ease, filter 0.25s ease;
}

.door-inner {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 14px;
    overflow: hidden;
}

.door-front {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
    overflow: hidden;
}

.door-front {
    background: linear-gradient(145deg, #c41e3a 0%, #99152b 50%, #6e0d1d 100%);
    border: 2px solid rgba(255, 215, 0, 0.85);
    color: var(--gold);
    font-family: var(--font-heading);
    box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.25), inset 0 -4px 8px rgba(0, 0, 0, 0.4), 0 8px 22px rgba(0, 0, 0, 0.5);
    position: relative;
    transition: all 0.3s ease;
}

.advent-door:nth-child(even) .door-front {
    background: linear-gradient(145deg, #1b5e3a 0%, #13452a 50%, #0b2c1b 100%);
}

.door-front::after {
    content: '';
    position: absolute;
    width: 22%;
    height: 100%;
    background: linear-gradient(90deg, #b8860b 0%, #ffd700 35%, #fff6c0 50%, #ffd700 65%, #b8860b 100%);
    opacity: 0.95;
    z-index: 1;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.35);
}

.door-front::before {
    content: '';
    position: absolute;
    height: 22%;
    width: 100%;
    background: linear-gradient(180deg, #b8860b 0%, #ffd700 35%, #fff6c0 50%, #ffd700 65%, #b8860b 100%);
    opacity: 0.95;
    z-index: 1;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.35);
}

.door-front .door-number {
    position: relative;
    z-index: 3;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, #2d0a0f 45%, #150204 100%);
    border-radius: 50%;
    border: 3px solid #ffd700;
    color: #ffd700;
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.85);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7), 0 0 12px rgba(255, 215, 0, 0.5);
    transition: transform 0.25s ease;
}

.advent-door:nth-child(even) .door-front .door-number {
    background: radial-gradient(circle, #0c2b18 45%, #05140b 100%);
}

.advent-door:hover .door-number {
    transform: scale(1.08);
}

.advent-door[data-day="25"] {
    grid-column: 1 / -1;
    aspect-ratio: auto;
    min-height: 220px;
}

.advent-door[data-day="25"] .door-front {
    background: linear-gradient(145deg, #162447 0%, #1f4068 50%, #0f182b 100%);
    border: 3px solid #ffd700;
    box-shadow: inset 0 2px 8px rgba(255, 255, 255, 0.35), 0 12px 32px rgba(0, 0, 0, 0.7), 0 0 25px rgba(255, 215, 0, 0.4);
}

.advent-door[data-day="25"] .door-number {
    width: 76px;
    height: 76px;
    font-size: 2.6rem;
    background: radial-gradient(circle, #101c38 45%, #080e1c 100%);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 215, 0, 0.6);
}

.advent-door.locked .door-front {
    cursor: pointer;
}

.door-lock-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #ffd700;
    width: 20px;
    height: 20px;
    z-index: 4;
    background: rgba(0, 0, 0, 0.65);
    padding: 6px;
    border-radius: 50%;
    border: 1px solid rgba(255, 215, 0, 0.75);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: content-box;
    transition: transform 0.2s ease, background 0.2s ease;
}

.advent-door.locked:hover .door-lock-icon {
    transform: scale(1.15);
    background: rgba(0, 0, 0, 0.8);
}

@keyframes presentWiggle {
    0%, 100% { transform: rotate(0deg); }
    20% { transform: rotate(-5deg) scale(1.02); }
    40% { transform: rotate(5deg) scale(1.02); }
    60% { transform: rotate(-3deg); }
    80% { transform: rotate(3deg); }
}

.advent-door.wiggle {
    animation: presentWiggle 0.45s ease-in-out;
}

.advent-door:not(.locked):hover {
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.7), 0 0 18px rgba(255, 215, 0, 0.45);
}

.door-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.2rem;
    text-align: center;
    border-radius: 14px;
    z-index: 5;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    background: transparent;
}

.advent-door.open .door-front::before,
.advent-door.open .door-front::after {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.advent-door.open .door-front .door-number,
.advent-door.open .door-front .door-lock-icon {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.advent-door.open .door-back {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.door-back i {
    width: 48px;
    height: 48px;
    color: #ffd700;
    margin-bottom: 0.6rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
    transition: transform 0.2s ease;
}

.advent-door.open:hover .door-back i {
    transform: scale(1.1);
}

.door-back span {
    font-size: 1.1rem;
    font-family: var(--font-heading);
    color: #ffffff;
    text-align: center;
    padding: 0 8px;
    line-height: 1.3;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
}

#game-canvas-container {
    position: relative;
    width: 100%;
    height: 350px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    margin-top: 1rem;
}

#game-canvas-container canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.game-score-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.75);
    padding: 5px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 215, 0, 0.4);
    color: var(--gold);
    font-weight: bold;
    z-index: 10;
}

.emoji-btn {
    font-size: 2rem;
    margin: 5px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--gold);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
}

.emoji-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

@media (max-width: 680px) {
    .advent-page-wrapper {
        padding: 0 10px;
    }

    .advent-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.85rem !important;
        margin-bottom: 2rem;
    }

    .advent-door {
        border-radius: 12px;
        min-height: 110px;
    }

    .advent-door .door-front {
        border-radius: 12px;
        border-width: 1.5px;
    }

    .advent-door .door-front .door-number {
        width: 44px;
        height: 44px;
        font-size: 1.45rem;
        border-width: 2.5px;
    }

    .advent-door[data-day="25"] {
        grid-column: 1 / -1 !important;
        aspect-ratio: 2 / 1 !important;
        min-height: 125px !important;
        border-radius: 14px;
    }

    .advent-door[data-day="25"] .door-number {
        width: 60px;
        height: 60px;
        font-size: 2.2rem;
    }
}

