@font-face {
    font-family: 'Minecraft';
    font-style: normal;
    font-weight: 400;
    src: local('Minecraft'), url('assets/fonts/MinecraftTen-VGORe.woff') format('woff');
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
}

body {
    /* Dynamic height from JS for mobile browsers */
    height: calc(var(--vh, 1vh) * 100);
    width: 100%;

    background-color: #000;
    /* fallback for letterbox gaps */
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;

    font-family: 'Minecraft', 'Minecraftia', monospace;
    color: #fff;

    overflow: hidden;
    transition: color 0.6s ease, background-color 0.6s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.overlay {
    position: absolute;
    inset: 0;
    /* top:0; right:0; bottom:0; left:0 */
    background-color: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: background-color 0.6s ease;
}

.container {
    text-align: center;
    padding: 20px;
    max-width: 800px;
    width: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    gap: 20px;

    /* Prevent footer cutoff on iPhone */
    padding-bottom: max(15px, env(safe-area-inset-bottom));
}

.logo {
    max-width: 350px;
    width: 60vw;
    height: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.7));
}

.player-status {
  display: inline-block;
  background-color: rgba(0, 128, 0, 0.85); /* rich green with transparency */
  color: #fff;
  padding: 0.5em 1em;
  border-radius: 1.5em; /* rounded corners for a pill/bubble look */
  font-weight: 600;
  text-align: center;
  line-height: 1.4; /* makes text vertically balanced */
  vertical-align: middle;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(3px); /* subtle blur behind for glassy effect */
}

.copy-ip-btn {
  margin-top: 0.75em;
  background-color: #00aa00;
  border: 2px solid #006600;
  color: #fff;
  padding: 0.4em 1.2em;
  border-radius: 0.6em;
  font-weight: 600;
  cursor: pointer;
  font-size: 1em;
  transition: background-color 0.2s ease, transform 0.1s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.copy-ip-btn:hover {
  background-color: #00cc00;
  transform: scale(1.03);
}

.copy-ip-feedback {
  margin-top: 0.3em;
  color: #aaffaa;
  font-size: 0.9em;
  font-weight: 500;
  text-shadow: 0 0 4px #004400;
}

.status-bar {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 128, 0, 0.9);
  color: #fff;
  border-radius: 2em;
  padding: 0.4em 0.6em 0.4em 1em;
  gap: 0.6em;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  font-weight: 600;
}

.status-bar button {
  background: #00cc00;
  border: none;
  border-radius: 1.2em;
  color: #fff;
  padding: 0.3em 1em;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.status-bar button:hover {
  background: #00e000;
  transform: scale(1.03);
}

.status-bar span {
  line-height: 1.4;
}

#copy-ip-feedback {
  color: #aaffaa;
  margin-top: 0.3em;
  font-size: 0.9em;
}

h1 {
    font-size: clamp(1.4rem, 4vw, 2rem);
    margin-bottom: 40px;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
    line-height: 1.3;
}

.store-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
}

.store {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
}

.store img {
    width: clamp(150px, 40vw, 220px);
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
}

.store:hover img {
    transform: scale(1.1);
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.6);
}

.store span {
    margin-top: 10px;
    font-size: 1.2rem;
}

footer {
    margin-top: 40px;
    font-size: 0.9rem;
    opacity: 0.85;
}

/* Light-mode override when background is bright */
body.light-mode {
    color: #222;
}

body.light-mode .overlay {
    background-color: rgba(255, 255, 255, 0.45);
}

body.light-mode h1 {
    text-shadow: 2px 2px 6px rgba(255, 255, 255, 0.8);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    h1 {
        font-size: 1.5rem;
        margin-bottom: 25px;
    }

    .store img {
        width: 150px;
    }

    footer {
        margin-top: 20px;
    }
}

/* Landscape fix for iOS Safari and other mobile browsers */
@media screen and (orientation: landscape) and (max-height: 500px) {

    html,
    body {
        height: auto !important;
        overflow-y: auto !important;
        overflow-x: hidden;
    }

    body {
        display: block;
        /* disable flex centering to prevent skew */
        background-attachment: scroll;
        /* smoother landscape scrolling */
    }

    .overlay {
        position: static;
        /* prevent Safari flex distortion */
        width: 100%;
        min-height: 100vh;
        display: block;
        background-color: rgba(0, 0, 0, 0.45);
        text-align: center;
    }

    .container {
        margin: 0 auto;
        max-width: 800px;
        padding: 40px 20px 60px 20px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        text-align: center;
    }

    footer {
        margin-top: 40px;
    }
}
