@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@300&display=swap');
@import url('https://fonts.googleapis.com/css?family=Oleo+Script');

* {
    margin: 0;
    padding: 0;
    font-family: 'Rubik', sans-serif;
    color: var(--text);
    color-scheme: dark;
    scroll-behavior: smooth;
    color: #fff;
}

html {
    height: 100%;
}

body {
    height: 100%;
    display: flex;
    align-content: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    row-gap: 0;
    padding: 0 20px;
    background-color: #202020;
}

.advent_day {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    height: 200px;
    width: 200px;
    border-radius: 20px;
    border: 2px solid #741d1d;
    background: #950d23;
    transform: scale(.8);
}

.advent_closed {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    border-radius: 20px;
    border: 2px solid #741d1d;
    background: #950d23;
    transform-origin: left;
    transition: all 0.5s ease-in-out;
}

.door_open_animation {
    transform: 
        perspective(1200px) 
        translateZ(0px) 
        translateX(0px) 
        translateY(0px) 
        rotateY(-105deg)
    ;
}

.door_open_animation .door_number {
    animation: remove_door_number .3s ease .2s forwards;
}

@keyframes remove_door_number {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.advent_door_schanier::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 30px;
    height: 30px;
    width: 8px;
    border-radius: 5px;
    background: #131313;
}

.advent_door_schanier::after {
    content: '';
    position: absolute;
    left: -5px;
    bottom: 30px;
    height: 30px;
    width: 8px;
    border-radius: 5px;
    background: #131313;
}

.door_kontur {
    margin: 30px;
    position: absolute;
    height: calc(100% - 40px);
    width: calc(100% - 50px);
    border-radius: 10px;
    border: 1px solid #950d23;
    background: #d91031;
}

.door_inner {
    margin: 30px;
    position: absolute;
    height: calc(100% - 75px);
    width: calc(100% - 85px);
    background: #c30e2c;
    box-shadow: 0 0 10px rgba(0,0,0,0.3) inset;
}

.door_key {
    position: absolute;
    right: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1px;
    height: 28px;
    width: 10px;
    border-radius: 3px;
    background: #FFD700;
    box-shadow: 0 0 1px black;
}

.door_knauf {
    height: 18px;
    width: 18px;
    border-radius: 50%;
    margin-top: -5px;
    background: #FFD700;
    box-shadow: 0 0 3px black inset;
}

.door_keyhole {
    width: 3px;
    height: 6px;
    background: black;
}

.door_number {
    z-index: 5;
    color: #fff;
    text-shadow: 6px 10px 30px black;
    font-size: 80px;
    font-family: 'Oleo Script', cursive;
}

.day_over {
    animation: day_over .5s ease forwards;
}

#door1 { animation-delay: .1s; }
#door2 { animation-delay: .2s; }
#door3, .advent_day:nth-child(1) { animation-delay: .3s; }
#door4, .advent_day:nth-child(2) .door_number { animation-delay: .4s; }
#door5, .advent_day:nth-child(3) .door_number { animation-delay: .5s; }
#door6, .advent_day:nth-child(4) .door_number { animation-delay: .6s; }
#door7, .advent_day:nth-child(5) .door_number { animation-delay: .7s; }
#door8, .advent_day:nth-child(6) .door_number { animation-delay: .8s; }
#door9, .advent_day:nth-child(7) .door_number { animation-delay: .9s; }
#door10, .advent_day:nth-child(8) .door_number { animation-delay: 1s; }
#door11, .advent_day:nth-child(9) .door_number { animation-delay: 1.1s; }
#door12, .advent_day:nth-child(10) .door_number { animation-delay: 1.2s; }
#door13, .advent_day:nth-child(11) .door_number { animation-delay: 1.3s; }
#door14, .advent_day:nth-child(12) .door_number { animation-delay: 1.4s; }
#door15, .advent_day:nth-child(13) .door_number { animation-delay: 1.5s; }
#door16, .advent_day:nth-child(14) .door_number { animation-delay: 1.6s; }
#door17, .advent_day:nth-child(15) .door_number { animation-delay: 1.7s; }
#door18, .advent_day:nth-child(16) .door_number { animation-delay: 1.8s; }
#door19, .advent_day:nth-child(17) .door_number { animation-delay: 1.9s; }
#door20, .advent_day:nth-child(18) .door_number { animation-delay: 2s; }
#door21, .advent_day:nth-child(19) .door_number { animation-delay: 2.1s; }
#door22, .advent_day:nth-child(20) .door_number { animation-delay: 2.2s; }
#door23, .advent_day:nth-child(21) .door_number { animation-delay: 2.3s; }
#door24, .advent_day:nth-child(22) .door_number { animation-delay: 2.4s; }


.day_over .door_number {
    animation: day_over_number .3s ease .2s forwards;
}

@keyframes day_over {
    from {
        transform: 
        perspective(1200px) 
        translateZ(0px) 
        translateX(0px) 
        translateY(0px) 
        rotateY(0deg)
    ;
    }
    to { 
        transform: 
        perspective(1200px) 
        translateZ(0px) 
        translateX(0px) 
        translateY(0px) 
        rotateY(-105deg)
    ;
    }
}

@keyframes day_over_number {
    from {
        opacity: 1;
    }
    to { 
        opacity: 0;
    }
}

.advent_today .door_number { animation-delay: .2s !important; }

.advent_today {
    cursor: pointer;
}

.advent_today::before {
    content: '';
    position: absolute;
    z-index: -1;
    height: 100%;
    width: 100%;
    border-radius: 20px;
    background: #741d1d;
    animation: advent_today 2.25s infinite;
}

@keyframes advent_today {
    0% {
        transform: scale(.9);
        opacity: 1;
    }
    50% {
        transform: scale(1.25);
        opacity: 0;
    }

    100% {
        transform: scale(1.25);
        opacity: 0;
    }
}

.advent_win {
    width: 100%;
    font-size: 25px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 30px rgba(255,255,255,0.8);
    text-align: center;
}

.btn_over {
    pointer-events: none;
    filter: blur(1px);
    opacity: .5;
    user-select: none;
}

.advent_day button {
    z-index: -1;
    margin-top: 10px;
	min-width: 150px;
    padding: 5px 0;
	font-size: 20px;
    font-weight: 600;
	text-decoration: none;
	color: #FFF;
	text-shadow: 0 1px 2px rgba(0,0,0,0.75);
	background: #5e0d0c;
	outline: none;
	border-radius: 10px;
	border: 1px solid #4c0300;
	box-shadow:
		inset 1px 1px 0px rgba(255,255,255,0.25), /* highlight */
		inset 0 0 6px #a23227, /* inner glow */
		inset 0 80px 80px -40px #ac3223, /* gradient */
		1px 1px 3px rgba(0,0,0,0.75); /* shadow */
	transition: .3s linear;
    cursor: pointer;

}

.advent_day button:hover {
	background: #a61715;
	text-shadow: 0 1px 2px rgba(0,0,0,0.75), 0 0 40px #FFF;
	box-shadow:
		inset 1px 1px 0px rgba(255,255,255,0.25), /* highlight */
		inset 0 0 6px #da3b2c, /* inner glow */
		inset 0 80px 80px -40px #dd4330, /* gradient */
		1px 1px 3px rgba(0,0,0,0.75); /* shadow */
		
}