@font-face {
    font-family: "Cascadia";
    src: url('../assets/Cascadia.ttf') format('truetype');
}

* {
	font-family: Cascadia;
	font-weight: medium;
    color: #bfbfbf;
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.background {
    position: relative;
    height: 100vh;
    width: 100vw;
    background: 
        radial-gradient(circle at 20% 50%, rgba(120, 20, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 20, 120, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(20, 255, 120, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 60% 30%, rgba(255, 255, 20, 0.1) 0%, transparent 50%),
        linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
    z-index: -2;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    animation: backgroundShift 20s ease-in-out infinite;
}

@keyframes backgroundShift {
    0%, 100% { 
        background-position: 0% 0%, 100% 100%, 0% 100%, 100% 0%, 0% 0%; 
    }
    50% { 
        background-position: 100% 0%, 0% 100%, 100% 0%, 0% 100%, 100% 100%; 
    }
}

.ascii-image {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%) scale(5);
    z-index: -2;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.1));
}

.image-display-container {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.full-page-overlay {
    position: fixed;
    transition: opacity 1s ease-in-out;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    background-color: #0F0F0F;
    display: none;
    opacity: 0;
}

.buttons-container {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
}

.buttons-container button {
    margin: 0 15px;
    padding: 15px 30px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.15) 0%, 
        rgba(255, 255, 255, 0.05) 50%, 
        rgba(255, 255, 255, 0.15) 100%);
    color: #f0f0f0;
    font-size: 16px;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    backdrop-filter: blur(20px);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.5px;
}

.buttons-container button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.buttons-container button:hover::before {
    left: 100%;
}

.buttons-container button:hover,
.buttons-container button:active {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 
        0 16px 48px rgba(0, 0, 0, 0.6),
        0 0 0 2px rgba(255, 255, 255, 0.4),
        0 0 30px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.25) 0%, 
        rgba(255, 255, 255, 0.15) 50%, 
        rgba(255, 255, 255, 0.25) 100%);
    color: #ffffff;
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .buttons-container button {
        transition: all 0.2s ease;
    }
    
    .buttons-container button:active {
        transform: translateY(1px);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    }
}

.text-container {
    position: fixed;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    text-align: center;
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.8) 0%, 
        rgba(20, 20, 30, 0.9) 50%, 
        rgba(0, 0, 0, 0.8) 100%);
    backdrop-filter: blur(25px);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    z-index: 1;
    animation: textContainerFloat 6s ease-in-out infinite;
}

@keyframes textContainerFloat {
    0%, 100% { transform: translateX(-50%) translateY(0px); }
    50% { transform: translateX(-50%) translateY(-5px); }
}

.text-container p {
    color: #e8e8e8;
    font-size: 17px;
    margin: 0;
    word-wrap: break-word;
    line-height: 1.7;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
    font-weight: 500;
    letter-spacing: 0.3px;
}

@media screen and (max-width: 850px) {
    .text-container {
        width: 85%;
        bottom: 10%;
        padding: 20px;
    }
    .text-container p {
        font-size: 16px;
        line-height: 1.8;
    }
    .buttons-container button {
        padding: 15px 25px;
        font-size: 16px;
        margin: 0 15px;
        min-height: 50px;
        min-width: 80px;
    }
    #member-container {
        top: 12%;
    }
    #main-container {
        top: 20%;
    }
    #enter-container {
        top: 12%;
    }
}

@media screen and (max-width: 600px) {
    .text-container {
        width: 95%;
        bottom: 8%;
        padding: 18px;
    }
    .text-container p {
        font-size: 15px;
        line-height: 1.7;
    }
    .buttons-container button {
        font-size: 15px;
        padding: 12px 20px;
        margin: 0 12px;
        min-height: 45px;
        min-width: 70px;
        border-radius: 10px;
    }
    .ascii-image {
        position: absolute;
        top: 35%;
        left: 50%;
        transform: translate(-50%, -50%) scale(3);
    }
    .image-display-container {
        top: 35%;
    }
    #pfp-image, #random-gif {
        width: 140px;
        height: 117px;
        border-radius: 10px;
    }
    #member-container {
        top: 10%;
    }
    #main-container {
        top: 18%;
    }
    #enter-container {
        top: 10%;
    }
}

/* Extra small devices */
@media screen and (max-width: 400px) {
    .text-container {
        width: 98%;
        bottom: 5%;
        padding: 15px;
    }
    .text-container p {
        font-size: 14px;
    }
    .buttons-container button {
        font-size: 14px;
        padding: 10px 18px;
        margin: 0 10px;
        min-height: 40px;
        min-width: 60px;
    }
    #pfp-image, #random-gif {
        width: 120px;
        height: 100px;
    }
}

.display-text, #random-gif, #pfp-image {
    transition: opacity 1s ease-in-out;
}

#pfp-image, #random-gif {
    width: 200px;
    height: 167px;
    opacity: 0;
    object-fit: cover;
    display: none;
    border-radius: 16px;
    box-shadow: 
        0 16px 40px rgba(0, 0, 0, 0.8),
        0 0 0 2px rgba(255, 255, 255, 0.2),
        0 0 40px rgba(255, 255, 255, 0.1);
    border: 3px solid rgba(255, 255, 255, 0.2);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    filter: brightness(1.1) contrast(1.1);
}

#member-container {
    display: none;
    opacity: 0;
    top: 15%;
    transition: opacity 1s ease-in-out;
}

#main-container {
    display: none;
    opacity: 0;
    top: 25%;
    transition: opacity 1s ease-in-out;
}

#enter-container {
    top: 15%;
}

#enter-container button {
    animation: enterPulse 3s ease-in-out infinite;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.2) 0%, 
        rgba(255, 255, 255, 0.1) 50%, 
        rgba(255, 255, 255, 0.2) 100%);
    border: 2px solid rgba(255, 255, 255, 0.4);
}

@keyframes enterPulse {
    0% {
        box-shadow: 
            0 8px 32px rgba(0, 0, 0, 0.4),
            0 0 0 2px rgba(255, 255, 255, 0.3),
            0 0 20px rgba(255, 255, 255, 0.1);
        transform: scale(1);
    }
    50% {
        box-shadow: 
            0 12px 40px rgba(0, 0, 0, 0.6),
            0 0 0 3px rgba(255, 255, 255, 0.5),
            0 0 30px rgba(255, 255, 255, 0.2);
        transform: scale(1.05);
    }
    100% {
        box-shadow: 
            0 8px 32px rgba(0, 0, 0, 0.4),
            0 0 0 2px rgba(255, 255, 255, 0.3),
            0 0 20px rgba(255, 255, 255, 0.1);
        transform: scale(1);
    }
}

.enter-button {
    transition: opacity 1s ease-in-out;
}

.display-text {
    transition: opacity 1s ease-in-out;
    text-align: center;
    max-width: 100%;
    box-sizing: border-box;
}

.snowflake {
    position: absolute;
    display: block;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.3);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    text-shadow: 
        0 0 10px rgba(255, 255, 255, 0.2),
        0 0 20px rgba(255, 255, 255, 0.1);
    animation: float 4s ease-in-out infinite;
    filter: blur(0.5px);
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg) scale(1); 
        opacity: 0.3;
    }
    50% { 
        transform: translateY(-15px) rotate(180deg) scale(1.1); 
        opacity: 0.8;
    }
}





.buttons-container button:hover[data-gif="alakazam.gif"] {
    color: rgba(255, 243, 81, 1);
}

.buttons-container button:hover[data-gif="arceus.gif"] {
    color: rgba(223, 231, 79, 1);
}

.buttons-container button:hover[data-gif="articuno.gif"] {
    color: rgba(107, 173, 243, 1);
}

.buttons-container button:hover[data-gif="charizard.gif"] {
    color: rgba(255, 176, 66, 1);
}

.buttons-container button:hover[data-gif="darkrai.gif"] {
    color: rgba(232, 78, 63, 1);
}

.buttons-container button:hover[data-gif="dialga.gif"] {
    color: rgba(62, 132, 182, 1);
}

.buttons-container button:hover[data-gif="dragonite.gif"] {
    color: rgba(50, 170, 130, 1);
}

.buttons-container button:hover[data-gif="entei.gif"] {
    color: rgba(206, 165, 100, 1);
}

.buttons-container button:hover[data-gif="garchomp.gif"] {
    color: rgba(237, 88, 65, 1);
}

.buttons-container button:hover[data-gif="gardevoir.gif"] {
    color: rgba(154, 233, 154, 1);
}

.buttons-container button:hover[data-gif="genesect.gif"] {
    color: rgba(181, 150, 243, 1);
}

.buttons-container button:hover[data-gif="palkia.gif"] {
    color: rgba(220, 164, 235, 1);
}

.buttons-container button:hover[data-gif="gengar.gif"] {
    color: rgba(162, 131, 193, 1);
}

.buttons-container button:hover[data-gif="giratina.gif"] {
    color: rgba(255, 214, 0, 1);
}

.buttons-container button:hover[data-gif="groudon.gif"] {
    color: rgba(255, 55, 65, 1);
}

.buttons-container button:hover[data-gif="ho-oh.gif"] {
    color: rgba(66, 214, 84, 1);
}

.buttons-container button:hover[data-gif="kyogre.gif"] {
    color: rgba(90, 164, 255, 1);
}

.buttons-container button:hover[data-gif="kyurem.gif"] {
    color: rgba(189, 231, 255, 1);
}

.buttons-container button:hover[data-gif="lugia.gif"] {
    color: rgba(151, 165, 239, 1);
}

.buttons-container button:hover[data-gif="mewtwo.gif"] {
    color: rgba(220, 164, 235, 1);
}

.buttons-container button:hover[data-gif="moltres.gif"] {
    color: rgba(255, 183, 74, 1);
}

.buttons-container button:hover[data-gif="palkia.gif"] {
    color: rgba(220, 164, 235, 1);
}

.buttons-container button:hover[data-gif="raikou.gif"] {
    color: rgba(255, 221, 123, 1);
}

.buttons-container button:hover[data-gif="rayquaza.gif"] {
    color: rgba(98, 195, 147, 1);
}

.buttons-container button:hover[data-gif="reshiram.gif"] {
    color: rgba(255, 255, 255, 1);
}

.buttons-container button:hover[data-gif="scizor.gif"] {
    color: rgba(214, 68, 68, 1);
}

.buttons-container button:hover[data-gif="suicune.gif"] {
    color: rgba(189, 136, 221, 1);
}

.buttons-container button:hover[data-gif="tyranitar.gif"] {
    color: rgba(173, 206, 156, 1);
}

.buttons-container button:hover[data-gif="zapdos.gif"] {
    color: rgba(255, 214, 66, 1);
}

.buttons-container button:hover[data-gif="zekrom.gif"] {
    color: rgba(0, 156, 222, 1);
}