/* General body styles */
body {
    margin: 0;
    background-color: #111;
    color: #fff;
    font-family: sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    position: relative;
    font-size: 17px;
}
.homepage {
    margin: 0;
    background-image: url('assets/homepage/bg_default.png');
    background-size: cover;
    background-position: calc(50% + 50vw) center;
    color: #fff;
    font-family: sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    position: relative;
    font-size: 17px;
}

a:link {
    color: #ffc0ff;
}

a:visited {
    color: #bf00bf;
}

/* Top-left info */
.top-left {
    position: absolute;
    top: 10px;
    left: 10px;
    text-align: left;
}

/* Main container */
.container {
    background-color: #222;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    max-width: 70%;
    margin-top: 55px;
}

.side-container {
    background-color: #222;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    max-width: 70%;
    margin: 260% 100% 10px -57.5%
}

/* Inputs */
input {
    width: 80px;
    text-align: center;
    font-size: 1.2rem;
    padding: 10px;
    border-radius: 8px;
    border: none;
    margin-top: 20px;
}

/* Buttons */
button {
    display: inline-block;
    margin-top: 20px;
    font-size: 2rem;
    color: #fff;
    text-decoration: none;
    background-color: #444;
    padding: 10px 30px;
    border-radius: 8px;
    transition: background 0.2s;
    cursor: pointer;
    border: none;
}

button:hover {
    background-color: #666;
}

/* Heading */
.container h1 {
    font-size: 5rem;
    margin-bottom: 15px;
}

/* Badge section */
.badge-section {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

/* Code box */
.code-box {
    text-align: left;
    background-color: #111;
    border-radius: 8px;
    padding: 10px;
    display: inline-block;
    font-size: 10px;
    line-height: 1.3;
    overflow-x: auto;
    white-space: pre;
    margin-top: -10px;
    max-width: 100%;
}

/* Warn button */
.warn-btn {
    position: fixed;
    bottom: 15px;
    right: 5px;
    display: inline-block;
    transition: filter 0.2s;
    z-index: 1000;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    background-color: transparent;
}
.warn-btn img {
    width: 50px;
    height: auto;
    pointer-events: none;
    user-select: none;
}
.warn-btn:focus {
    outline: none;
    box-shadow: none;
}

/* Popup overlay */
.popup {
    display: none;
    position: fixed;
    z-index: 4000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

/* Visible state */
.popup.show {
    display: flex;
}

/* Popup box */
.popup-content {
    background: #222;
    color: #fff;
    padding: 1.5rem;
    border-radius: 10px;
    width: 70%;
    max-width: 400px;
    box-shadow: 0 0 15px #000;
    text-align: center;
    position: relative;
}

/* Close button */
.close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #fff;
    cursor: pointer;
    padding: 4px;
}

.home-btn {
    position: fixed;   /* stays in the corner even when scrolling */
    top: -13px;
    left: -38px;
    display: inline-block;
    transition: filter 0.2s;
    z-index: 1000;     /* ensures it’s above other content */
    transform: scale(0.3);
    transform-origin: center;
}

.home-btn img {
    width: 85px; /* smaller button on mobile */
    height: auto;
}

.start-menu {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    top: 20%;
}

.new-btn {
    margin-top: 8px;
    margin-bottom: 8px;
}

.new-btn img {
    height: 70px;
    width: auto;
    transition: 0.1s;
}

.new-btn img:hover {
    filter: brightness(1.5);
    transition: 0.1s;
}

.new-btn button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    width: fit-content;
    height: fit-content;
}

.logo {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 999; /* above the background but below popups */
}

.logo img {
    width: auto;
    max-width: 90vw;
    height: auto;
}

.site-back {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    width: auto;
}

.title-sub {
    position: absolute;
    bottom: 0;
    right: 10px;
    color: #fff;
    font-size: 20px;
    text-align: right;
    -webkit-text-stroke: 0.25px #000; /* black outline for WebKit */
    text-shadow:
      1px 1px 0 #000,
      -1px 1px 0 #000,
      1px -1px 0 #000,
      -1px -1px 0 #000,
      0 1px 0 #000,
      1px 0 0 #000,
      0 -1px 0 #000,
      -1px 0 0 #000; /* fallback outline for other browsers */
}

/* Responsive adjustments (optional for mobile) */
@media (max-width: 600px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 3rem;
    }

    button {
        font-size: 1.5rem;
        padding: 8px 20px;
    }

    input {
        width: 60px;
        font-size: 1rem;
        padding: 8px;
    }

    .code-box {
        font-size: 8px;
    }
}
