@import url('./themes.css');

:root {
    --background-image: url('https://cdn.jsdelivr.net/gh/a456pur/seraph@main/images/backgrounds/seraph/gamebg.jpg');
    --border-color1: #a19b9b;
}
:root.theme-azurite {
    --background-image: url('https://cdn.jsdelivr.net/gh/a456pur/seraph@main/images/backgrounds/azure/gamesbg.jpg');
}
:root.theme-retro {
    --background-image: url('https://cdn.jsdelivr.net/gh/a456pur/seraph@main/images/backgrounds/retro/gamesbg.jpg');
}
:root.theme-cosmic {
    --background-image: url('https://cdn.jsdelivr.net/gh/a456pur/seraph@main/images/backgrounds/cosmic/gamesbg.jpg');
}
:root.theme-molten {
    --background-image: url('https://cdn.jsdelivr.net/gh/a456pur/seraph@main/images/backgrounds/molten/gamesbg.jpg');
}
:root.theme-amethyst {
    --background-image: url('https://cdn.jsdelivr.net/gh/a456pur/seraph@main/images/backgrounds/amethyst/gamesbg.jpg');
}
:root.theme-ethereal {
    --background-image: url('https://cdn.jsdelivr.net/gh/a456pur/seraph@main/images/backgrounds/ethereal/gamesbg.jpg');
}
:root.theme-misinformation {
    --background-image: url('https://cdn.jsdelivr.net/gh/a456pur/seraph@main/images/backgrounds/misinformation/gamesbg.gif');
}
:root.theme-subzero {
    --background-image: url('https://cdn.jsdelivr.net/gh/a456pur/seraph@main/images/backgrounds/subzero/gamesbg.jpg');
}
:root.theme-metro {
    --background-image: url('https://cdn.jsdelivr.net/gh/a456pur/seraph@main/images/backgrounds/metro/gamesbg.jpg');
}
:root.theme-ghostly {
    --background-image: url('https://cdn.jsdelivr.net/gh/a456pur/seraph@main/images/backgrounds/ghostly/gamesbg.jpg');
    --border-color1: #d2c4c4;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: var(--background-color);
    overflow-x: hidden;

    opacity: 1;
    animation: fadein 0.75s forwards ease-in-out;

    background-image: var(--background-image);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;

    color: var(--text-color);
    
}

h1, h2 {
    font-family: var(--font-family);
}

h1 {
    font-size: 48px;
    padding-bottom: 0px;
    text-shadow: 0 0 10px var(--text-color),
                 0 0 10px var(--text-glow),
                 0 0 30px var(--text-glow),
                 0 0 40px var(--text-color),
                 0 0 50px var(--text-glow),
                 0 0 60px var(--text-color),
                 0 0 70px var(--text-glow),
                 0 0 80px #000000;
}

.button {
    background-color: var(--background-color);
    border: 3px solid var(--border-color2);

    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 8px;

    width: calc(50% - 10px); 
    max-width: 480px;

    width: 400px;
    max-height: 100px;
    box-sizing: border-box;

    padding-left: 10px;
    padding-right: 10px;

    background-repeat: no-repeat;
    background-size: cover;

    border: 3.2px solid var(--border-color2);
    border-radius: 16px;

    
    position: relative;
}

.button:hover {
    background-color: var(--background-color);
    border: 3.2px solid var(--border-color1);
}

.button h2 {
    font-size: 30px;
    text-align: center;

}

.pin-button {
    position: absolute;
    top: 5px;
    right: 2px; 
    
    z-index: 2; 
}

.download-button {
    position: absolute;
    top: 5px;
    left: 2px; 
    text-decoration: underline;
    z-index: 3; 
}

select {
    background-color: var(--background-color);
    color: var(--text-color);
    
    width: 0%;
    max-width: 200px;
    padding-top: 5px;
    font-size: 20px;
    padding-bottom: 5px;
    border: 2px solid var(--border-color1);
    border-radius: 32px;
    padding-left: 10px;
    
    padding-right: 10px;
    font-family: var(--font-family);
    text-align: center;
    animation: searchTween 3.5s ease-in-out forwards;
}


input {
    background-color: var(--background-color);
    color: var(--text-color);
    padding: 2px;
    border: 2px solid var(--border-color1);
    border-radius: 16px;
    width: 0%;
    max-width: 450px;
    font-size: 20px;
    font-family: var(--font-family);
    text-align: center;

    padding-top: 5px;
    padding-bottom: 5px;

    opacity: 0;
    animation: searchTween 2.5s ease-in-out forwards;
    animation-delay: 0s;
}

input::placeholder {
    color: var(--text-color);
}

.button-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.pinned-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.blackout {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999; 
}

.confirmation-prompt {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--background-color);
    color: var(--text-color);
    border: 3px solid var(--border-color2);
    border-radius: 16px;
    z-index: 1000; 
    text-align: center;

    padding-bottom: 10px;
    width: 80%;
    max-width: 488px;
}

.prompt-content {
    text-align: center;
}

.prompt-content p {
    margin-bottom: 20px;
}

.prompt-content button, button {
    background-color: var(--background-color);
    color: var(--text-color);
    width: 50%;
    max-width: 150px;
    padding-top: 2px;
    padding-bottom: 2px;
    font-family: var(--font-family);
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 20px;
    margin: 2px;
    
    transition: background-color 0.15s ease-in-out;

    border: 2px solid var(--border-color2);
    cursor: pointer;
    border-radius: 32px;
}

@keyframes fadein {
    0% {
        opacity: 0;
        transform: translateY(2%) scale(0.95);
    }

    100% {
        opacity: 1;
        transform: translateY(0%) scale(1);
    }
}

@keyframes searchTween {
    0% {
        width: 0%;
        opacity: 0;
    }

    55% {
        opacity: 0.9;
    }

    100% {
        width: 70%;
        opacity: 1;
    }
}

a {
    text-decoration: none;
    color: white;
    
}

.cursor {
    width: 7px;
    height: 7px;
    background-color: var(--text-color);
    border-radius: 50%;
    position: absolute;
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 1;
    z-index: 10000;
    
}

.linkp a {
    font-size: 17px;
    text-decoration: underline;
    text-align: center;
    border: 3px solid transparent;
    transition: 0.15s ease-in-out;
    color: var(--text-color);
    opacity: 0;
    animation: fadein 1s forwards ease-in-out;
    animation-delay: 0.25s;
}

p {
    padding-left: 20%;
    padding-right: 20%;
}
/* Maka adaptations: responsive catalog grid and readable controls */
body{min-height:100vh;padding:24px 14px;box-sizing:border-box;background-attachment:fixed}
h1{margin:14px 0 8px;font-size:clamp(38px,7vw,64px)}
.maka-intro{max-width:760px;margin:0 auto 22px;padding:0 12px;line-height:1.6}
.maka-tools{display:flex;gap:10px;justify-content:center;align-items:center;flex-wrap:wrap;width:min(100%,980px);margin:0 auto 20px}
.maka-tools input{width:min(64vw,480px);min-width:220px;box-sizing:border-box}
.maka-tools select{width:auto;min-width:140px;max-width:220px}
.maka-count{margin:8px 0 18px;font-size:14px}
.button-container{width:min(100%,1200px);gap:4px}
.button-container>a{display:block;width:calc(33.333% - 16px);max-width:360px;min-width:220px;margin:0;text-shadow:none}
.button{width:100%;height:132px;max-height:none;margin:8px 0;background-position:center;background-size:cover;display:flex;align-items:flex-end;justify-content:center;overflow:hidden}
.button h2{font-size:clamp(16px,2vw,24px);margin:0;width:100%;padding:28px 8px 8px;background:linear-gradient(transparent,rgba(0,0,0,.82));color:#fff;text-shadow:0 1px 4px #000;box-sizing:border-box}
.button:hover{transform:translateY(-2px);transition:transform .15s ease}
.maka-footer{max-width:900px;margin:26px auto 10px;font-size:12px;line-height:1.6;opacity:.85}
.maka-footer a{color:inherit}
@media(max-width:680px){.button-container>a{width:calc(50% - 12px);min-width:145px}.button{height:116px}.maka-tools input{width:100%;min-width:100%}.maka-tools select{flex:1}}
@media(max-width:360px){.button-container>a{width:100%;max-width:320px}}

/* Lazy-loaded thumbnails keep the first catalog paint lightweight. */
.button{position:relative;overflow:hidden;background-image:none!important}
.button img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}
.button h2{position:absolute;z-index:1;left:0;right:0;bottom:0}
