@font-face {
    font-family: 'ByteBounce';
    src: url('./fonts/ByteBounce.ttf') format('truetype');
    font-display: swap;
}

html, body {
    height: 100%;
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #1a1a1a;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex-direction: column;
    padding: 1rem;
    box-sizing: border-box;
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.image-container {
    display: inline-block;
    width: 90vw;
    max-width: 500px;
    max-height: calc(100vh - 6rem);
}

.image-container img {
    width: 100%;
    height: auto;
    max-height: 60vh;
    object-fit: contain;
    display: block;
}

.links {
    margin-top: 2rem;
    font-size: 2rem;
    display: flex;
    gap: 1.4rem;
    font-family: 'ByteBounce', monospace;
    text-transform: uppercase;
}

.links a {
    display: inline-block;
    cursor: pointer;
    text-decoration: none;
    color: #fefdf5;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    position: relative;
    transition: transform 0.2s;
}

.links a::after {
    content: "";
    display: block;
    height: 2px;
    width: 0;
    background: #fefdf5;
    transition: width 0.3s ease;
    margin-top: 4px;
}

.links a:hover::after { width: 100%; }
.links a:hover { transform: scale(1.08); }

.links a span {
    display: inline-block;
    font-family: 'ByteBounce', monospace;
    transition: transform 0.05s, color 0.05s, opacity 0.05s;
}

.cloud-btn {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    background: linear-gradient(145deg, rgba(255,255,255,0.12), rgba(255,255,255,0.05));
    color: #fefdf5;
    padding: 0.4rem 1rem;
    font-family: 'ByteBounce', monospace;
    font-size: 0.9rem;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50px;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(255,255,255,0.1);
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    z-index: 999;
}

.cloud-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255,255,255,0.2);
    background: linear-gradient(145deg, rgba(255,255,255,0.2), rgba(255,255,255,0.08));
}

footer.subtext {
    position: fixed;
    bottom: 1.2rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: rgba(255,255,255,0.4);
    font-family: Arial, sans-serif;
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 998;
}

.subtext a,
.subtext button {
    cursor: pointer;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    transition: all 0.2s;
    background: transparent;
    border: none;
    font: inherit;
}

.subtext a:hover,
.subtext button:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
    text-decoration: underline;
    box-shadow: 0 0 8px rgba(255,255,255,0.3);
}

.subtext .separator {
    width: 1px;
    height: 12px;
    background: rgba(255,255,255,0.3);
    transform: rotate(45deg);
}

#freebsd-icon {
    height: 1.5rem;
    margin-left: 0.3rem;
    cursor: pointer;
    vertical-align: middle;
    border-radius: 50%;
    transition: transform 0.2s, opacity 0.2s;
}

#freebsd-icon:hover { opacity: 0.8; }

.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(26,26,26,0.95);
    border: 1px solid #fff;
    border-radius: 10px;
    padding: 1rem 1.5rem;
    max-width: 300px;
    color: #fff;
    text-align: left;
    z-index: 1000;
    box-shadow: 0 0 15px rgba(255,255,255,0.2);
}

.modal h3 { margin-top: 0; font-size: 1rem; text-align: center; }
.modal p { font-size: 0.8rem; margin: 0.3rem 0; }
.modal p a { color: #fff; text-decoration: underline; }

.modal .close-btn {
    display: block;
    margin: 0.5rem auto 0 auto;
    padding: 0.3rem 0.6rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    text-align: center;
    color: #fff;
}

.modal .close-btn:hover { background: rgba(255,255,255,0.2); }

@media (prefers-reduced-motion: reduce) {
    .links a span { transition: none !important; transform: none !important; }
}

@media (max-width: 600px) {
    html, body {
        height: 100%; margin: 0; padding: 0;
        display: flex; flex-direction: column;
        justify-content: flex-start; align-items: center;
        text-align: center; overflow-y: auto;
    }

    .cloud-btn {
        position: fixed; top: 0.8rem; right: 1rem;
        align-self: flex-start; flex: 0 0 auto;
        height: auto !important; width: auto;
        white-space: nowrap; line-height: 1;
        font-size: 0.75rem; padding: 0.3rem 0.6rem; z-index: 1000;
    }

    .image-container { width: 90vw; max-width: 500px; max-height: none; margin-top: 2.5rem; }
    .image-container img { width: 100%; height: auto; max-height: 100%; object-fit: contain; display: block; }
    .links { margin-top: 0.3rem; margin-bottom: 0.2rem; font-size: 1.3rem; gap: 1rem; flex-wrap: wrap; }

    footer.subtext {
        bottom: calc(env(safe-area-inset-bottom, 0px) + 0.05rem);
        font-size: 0.68rem; gap: 0.5rem;
    }

    #freebsd-icon { height: 1.2rem; }
}
