@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-image: url('images/stone.png');
    background-size: auto;
    background-position: center;
    background-repeat: repeat;
}

nav {
    background-image: url('images/grassblock.png');
    background-size: contain;
    background-position: center;
    background-repeat: repeat-x;
    padding: 1rem 0;
    position: relative;
    border-bottom: 3px solid #b9b9b9;
}

nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem; /* Reduced padding for mobile */
    position: relative;
    z-index: 1;
}

.logo {
    margin-left: 0; /* Reset negative margin */
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo a {
    display: inline-block;
    transition: opacity 0.3s, transform 0.3s;
}

.logo a:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.logo img {
    height: 40px; /* Slightly smaller for mobile */
    width: auto;
    display: block;
}

.server-address {
    color: white;
    font-family: 'Press Start 2P', cursive;
    font-size: 18px; /* Same as nav links */
    text-shadow: 2px 2px 0px #000; /* Same text shadow */
    user-select: all; /* Makes it easy to select and copy */
    cursor: text;
    text-transform: uppercase; /* Same as nav links */
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    margin-right: 0; /* Reset negative margin */
    padding: 0;
    gap: 1rem; /* Reduced gap for mobile */
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 0.8rem 1rem; /* Reduced padding */
    border-radius: 20px;
    transition: background-color 0.3s, border-radius 0.3s;
    text-shadow: 2px 2px 0px #000;
    font-family: 'Press Start 2P', cursive;
    font-size: 14px; /* Smaller font for mobile */
    text-transform: uppercase;
}

.nav-links a:hover {
    background-color: rgba(211, 211, 211, 0.2);
    text-shadow: 2px 2px 0px #333;
    border-radius: 0;
}

footer {
    width: 100%;
    height: 9vh;
    background-image: url('images/bedrock.png');
    background-size: contain;
    background-position: center;
    background-repeat: repeat;
    display: flex;           /* Enables Flexbox */
    align-items: center;     /* Vertically center */
    justify-content: center; /* Horizontally center */
    margin-top: auto;
}

main {
    margin: 0;
    padding: 1rem 0;
    font-family: Arial, sans-serif;
    min-height: calc(0vh - 95px - 5vh - 5rem); /* Minimum height, allows expansion */
    display: flex;
    flex-direction: column;
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24rem;
    background-image: url('images/main1.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 300px;
    border-radius: 10px;

    display: flex;
    flex-direction: column; /* stack children vertically */
    align-items: center;    /* center horizontally */
    justify-content: center; /* center vertically */
    
    margin-bottom: 2rem;
    flex-shrink: 0;
    border: 2px solid #b9b9b9;
}

.sub-containers {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    min-height: 100px;
}

/* Container styling */
.sub-container {
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid #b9b9b9;
    border-radius: 10px;
    padding: 3rem; /* Space for content */
    min-height: 100px;
    backdrop-filter: blur(5px);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    perspective: 1000px; /* Needed for flip */
}

/* Flip wrapper */
.sub-container-inner {
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    position: relative;
}

.sub-container:hover .sub-container-inner {
    transform: rotateY(180deg);
}

/* FRONT - exactly as before */
.sub-container-front {
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
}

/* BACK layer */
.sub-container-back {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* top-aligned */
    align-items: center;         /* horizontally centered */
    text-align: center;
    box-sizing: border-box;
    border-radius: 10px;
    background-color: rgba(0, 0, 0, 0);
    color: white;
}

.sub-container-back h3 {
    margin: 0 0 2rem 0;
}

.sub-container-back p {
    margin: 0;
}

/* Front content styling (unchanged) */
.sub-container-image {
    width: 100%;
    height: 100px;
    object-fit: fill;
    border-radius: 10px;
    border: 2px solid #00000000;
    background-color: rgba(0, 0, 0, 0);
    margin-top: -30px;
    z-index: 1;
}

.sub-container-content {
    padding-top: 1rem;
    text-align: center;
    flex: 1;
}

.sub-container h3 {
    color: white;
    font-family: 'Press Start 2P', cursive;
    font-size: 16px;
    text-shadow: 2px 2px 0px #000;
    margin-top: 0rem;
    margin-bottom: 0rem;
}

.sub-container h4 {
    color: white;
    font-family: 'Press Start 2P', cursive;
    font-size: 16px;
    text-shadow: 2px 2px 0px #000;
    margin-top: -2rem;
    margin-bottom: 0rem;
}

.sub-container p {
    color: white;
    font-family: Arial, sans-serif;
    line-height: 1.6;
    text-shadow: 1px 1px 0px #000;
}

h1 {
    color: white;
    text-decoration: none;
    padding: 0.8rem 1rem; /* Reduced padding */
    border-radius: 20px;
    transition: background-color 0.3s, border-radius 0.3s;
    text-shadow: 2px 2px 0px #000;
    font-family: 'Press Start 2P', cursive;
    font-size: 20px; /* Smaller font for mobile */
    text-transform: uppercase;
}

.footer-text{
    color: white;
    text-decoration: none;
    padding: 0.8rem 1rem; /* Reduced padding */
    border-radius: 20px;
    transition: background-color 0.3s, border-radius 0.3s;
    text-shadow: 2px 2px 0px #000;
    font-family: 'Press Start 2P', cursive;
    font-size: 10px; /* Smaller font for mobile */
    text-transform: uppercase;
}

.info-container-wrapper {
    max-width: 1200px; /* limits total width */
    margin: 0 auto; /* centers the container */
    padding: 1rem;
}

.info-container {
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid #b9b9b9;
    border-radius: 10px;
    padding: 2rem;
    height: 400px;
    backdrop-filter: blur(5px);
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 1fr 1fr; /* two columns inside */
    position: relative;
    gap: 0;
}

/* Optional: padding inside each column */
.info-column {
    padding: 1rem;
}

/* Left column only */
.info-column.left {
    display: flex;
    justify-content: flex-start; /* stick to left */
    align-items: center; /* vertically center inside container */
}

/* Image inside left column */
.info-column.left img {
    max-width: 600px;
    max-height: 300px;
    object-fit: fill;
    border: 3px solid #acacac; /* width, style, color */
    border-radius: 3px;
}

.info-text{
    color: white;
    text-decoration: none;
    padding: 0.8rem 1rem; /* Reduced padding */
    border-radius: 20px;
    transition: background-color 0.3s, border-radius 0.3s;
    text-shadow: 2px 2px 0px #000;
    font-size: 12px; /* Smaller font for mobile */
    text-transform: uppercase;
}

/* Tooltip styling */
.tooltip {
    position: absolute;
    background: #333;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

        .discord-widget {
            position: absolute;
            top: 100;
            left: 10px;
            z-index: 1000;
            border: 2px solid #acacac;
            border-radius: 5px;
        }

@media (max-width: 768px) 
{
.main-container {
padding: 0 1rem !important;
height: auto !important;
margin: 0 1rem;
}


.sub-containers {
grid-template-columns: 1fr;
gap: 0.5rem;
}


.sub-container {
padding: 1.5rem;
}


.logo img {
height: 30px;
}


.nav-links {
gap: 0.5rem;
overflow-x: auto;
padding-bottom: 0.5rem;
}


.nav-links a {
padding: 0.5rem 0.8rem;
font-size: 12px;
}


.main-container h1 {
font-size: 18px;
padding: 0.5rem 0.8rem;
}


.footer-text {
font-size: 8px;
padding: 0.5rem 0.8rem;
}


.info-container {
grid-template-columns: 1fr;
height: auto;
}


.info-column.left img {
max-width: 100%;
height: auto;
}
}

@media (max-width: 1919px) {
        .discord-widget {
            display: none;
        }
}