/* General Setup */
:root {
    --primary-purple: #a482d1;
    --dark-grey: #1c1c1c;
    --light-text: #f0f0f0;
    --dark-text: #333;
    --background-blur: rgba(28, 28, 28, 0.6);
    --success-green: #2ecc71;
    --error-red: #e74c3c;
}

html {
    scroll-behavior: smooth;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Poppins', sans-serif;
    color: var(--light-text);
    background-image: url('background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    text-align: center;
}

/* Glassmorphism main container */
.container {
    background: var(--background-blur);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px 50px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    animation: fadeIn 1.5s ease-in-out;
    z-index: 2;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* Header & Logo */
header .server-logo { width: 200px; height: auto; margin-bottom: 20px; animation: float 6s ease-in-out infinite; }
@keyframes float { 0% { transform: translateY(0px); } 50% { transform: translateY(-15px); } 100% { transform: translateY(0px); } }
header h1 { font-size: 2.5em; font-weight: 700; margin-bottom: 5px; text-shadow: 2px 2px 8px rgba(0,0,0,0.6); }
header .tagline { font-size: 1.1em; color: var(--primary-purple); font-weight: 400; margin-bottom: 30px; text-shadow: 2px 2px 5px rgba(0,0,0,0.7); }

/* General Section Heading */
.server-info h2, .screenshots h2, .features h2 { font-size: 1.5em; margin-bottom: 20px; font-weight: 600; text-shadow: 2px 2px 5px rgba(0,0,0,0.7); }

/* --- Server Info & IP Box --- */
.server-info { margin-bottom: 40px; }
.ip-label { font-size: 0.9em; font-weight: 600; text-transform: uppercase; color: rgba(255, 255, 255, 0.7); margin-bottom: 8px; text-shadow: 1px 1px 3px rgba(0,0,0,0.7); }
.ip-label:not(:first-child) { margin-top: 20px; }
.ip-box { background-color: rgba(0, 0, 0, 0.4); border: 1px solid var(--primary-purple); border-radius: 10px; padding: 10px; display: flex; justify-content: space-between; align-items: center; }
.ip-container { margin-bottom: 10px; }
.ip-text { font-size: 1.2em; font-weight: 600; color: #fff; padding: 5px 15px; text-shadow: 2px 2px 5px rgba(0,0,0,0.7); }
.copy-btn { background-color: var(--primary-purple); color: var(--light-text); border: none; border-radius: 8px; padding: 12px 20px; font-family: 'Poppins', sans-serif; font-weight: 600; cursor: pointer; transition: all 0.3s ease; }
.copy-btn:hover { background-color: #8e6ab8; transform: scale(1.05); }
.copy-btn.copied { background-color: var(--success-green); }
.status-indicator { display: flex; justify-content: center; align-items: center; font-size: 0.9em; color: rgba(255, 255, 255, 0.7); margin-top: 20px; text-shadow: 1px 1px 3px rgba(0,0,0,0.7); min-height: 20px; }
#status-text strong { color: var(--light-text); }
.dot { height: 10px; width: 10px; border-radius: 50%; margin-right: 8px; background-color: #7f8c8d; }
.dot.online { background-color: var(--success-green); animation: pulse 2s infinite; }
.dot.offline { background-color: var(--error-red); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7); } 70% { box-shadow: 0 0 0 10px rgba(46, 204, 113, 0); } 100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); } }

/* Call-to-Action Buttons */
.cta-buttons { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; margin-bottom: 40px; }
.btn { text-decoration: none; color: var(--light-text); padding: 12px 25px; border-radius: 8px; font-weight: 600; font-size: 1em; transition: all 0.3s ease; border: 2px solid transparent; }
.btn:hover { transform: translateY(-3px); box-shadow: 0 4px 15px rgba(0,0,0,0.3); }
.discord-btn { background-color: #5865F2; }
.discord-btn:hover { background-color: #4752c4; }
.staff-btn { background-color: transparent; border: 2px solid var(--primary-purple); }
.staff-btn:hover { background-color: var(--primary-purple); }

/* --- Screenshots Section --- */
.screenshots { margin-bottom: 40px; }
.screenshots h2 { margin-bottom: 25px; }
.screenshot-gallery { position: relative; height: 250px; width: 100%; margin: 0 auto; }
.polaroid { position: absolute; background: #f9f9f9; padding: 6px; border-radius: 2px; box-shadow: 0 4px 8px rgba(0,0,0,0.2), 0 6px 20px rgba(0,0,0,0.19); transition: transform 0.3s ease-in-out, z-index 0.3s ease-in-out; width: 200px; }
.polaroid img { width: 100%; height: auto; display: block; }
.polaroid:nth-child(1) { top: 10%; left: 10%; transform: rotate(-8deg); z-index: 1; }
.polaroid:nth-child(2) { top: 25%; left: 55%; transform: rotate(5deg); z-index: 2; }
.polaroid:nth-child(3) { top: 40%; left: 20%; transform: rotate(12deg); z-index: 3; }
.polaroid:nth-child(4) { top: 5%; left: 35%; transform: rotate(-15deg); z-index: 4; }
.polaroid:hover { transform: scale(1.5) rotate(0deg); z-index: 10; }

/* --- Features Section --- */
.features-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.feature-item { background: rgba(0, 0, 0, 0.2); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 10px; padding: 20px; transition: transform 0.3s ease, background 0.3s ease; }
.feature-item:hover { transform: translateY(-5px); background: rgba(0, 0, 0, 0.3); }
.feature-item i { font-size: 2.5em; color: var(--primary-purple); margin-bottom: 15px; }
.feature-item h3 { font-size: 1.1em; margin-bottom: 8px; color: #fff; }
.feature-item p { font-size: 0.9em; color: rgba(255, 255, 255, 0.7); }

/* --- Sidebars --- */
.sidebar-heading { font-size: 1.4em; font-weight: 600; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 1px solid var(--primary-purple); text-shadow: 2px 2px 5px rgba(0,0,0,0.7); }

#nav-sidebar, #player-list-container {
    position: fixed; top: 0; bottom: 0; width: 250px;
    background: var(--background-blur); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    padding: 25px; overflow-y: auto; z-index: 5;
    transition: transform 0.5s ease-in-out;
}
#nav-sidebar { left: 0; border-right: 1px solid rgba(255, 255, 255, 0.1); text-align: left;}
#player-list-container { right: 0; border-left: 1px solid rgba(255, 255, 255, 0.1); }
#player-list-container.hidden { transform: translateX(100%); }

#page-nav { list-style-type: none; margin-bottom: 30px; }
#page-nav li a { display: block; padding: 10px 15px; margin-bottom: 5px; text-decoration: none; color: rgba(255,255,255,0.7); border-radius: 8px; transition: background 0.3s, color 0.3s; }
#page-nav li a:hover { background: rgba(255,255,255,0.1); color: #fff; }
#page-nav li a.active { background: var(--primary-purple); color: #fff; font-weight: 600; }

.action-hub { display: flex; justify-content: space-around; padding: 15px 0; border-top: 1px solid rgba(255,255,255,0.1); }
.action-link { color: rgba(255,255,255,0.7); font-size: 1.5em; transition: color 0.3s, transform 0.3s; }
.action-link:hover { color: #fff; transform: scale(1.1); }

#player-list-container h3 { text-align: center; } /* Shared h3 style with nav */
#player-list { list-style-type: none; text-align: left; }
#player-list li { display: flex; align-items: center; margin-bottom: 15px; font-size: 1em; color: var(--light-text); text-shadow: 1px 1px 3px rgba(0,0,0,0.7); }
#player-list li img { width: 32px; height: 32px; margin-right: 15px; border-radius: 4px; background-color: rgba(0,0,0,0.2); }

/* Footer */
footer { position: fixed; bottom: 0; left: 0; width: 100%; padding: 20px; text-shadow: 1px 1px 3px rgba(0,0,0,0.7); z-index: 1; }
.availability { font-size: 0.9em; color: rgba(255, 255, 255, 0.8); }
.copyright { font-size: 0.8em; color: rgba(255, 255, 255, 0.5); margin-top: 5px; }

/* Scroll Animation Styles */
.hidden-section { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.visible { opacity: 1; transform: translateY(0); }

/* --- Responsive Design --- */
@media (max-width: 1200px) {
    /* Hide sidebars on tablets and smaller */
    #player-list-container, #nav-sidebar { display: none; }
}

@media (max-width: 640px) {
    body { justify-content: flex-start; padding-top: 20px; padding-bottom: 80px; }
    .container { padding: 30px 25px; }
    header h1 { font-size: 2em; }
    header .server-logo { width: 150px; }
    .ip-text { font-size: 1em; }
    .copy-btn { padding: 10px 15px; }
    .cta-buttons { flex-direction: column; }
    .features-grid { grid-template-columns: 1fr; }
    .screenshot-gallery { position: static; height: auto; display: flex; flex-direction: column; align-items: center; gap: 30px; }
    .polaroid, .polaroid:nth-child(n) { position: static; transform: rotate(0deg); width: 80%; max-width: 250px; }
    .polaroid:hover { transform: scale(1.05); }
    footer { position: absolute; bottom: 0; padding: 20px; }
}

/* --- Application Form Styles --- */
.application-form .server-logo {
    transition: transform 0.3s ease;
}
.application-form .server-logo:hover {
    transform: scale(1.1);
}

.form-group {
    margin-bottom: 25px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: var(--light-text);
    font-family: 'Poppins', sans-serif;
    font-size: 1em;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 10px rgba(164, 130, 209, 0.5);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.radio-label {
    display: inline-flex;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.3);
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: border-color 0.3s, background-color 0.3s;
}

.radio-label:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

.radio-label input[type="radio"] {
    display: none; /* Hide the ugly default radio button */
}

.radio-label input[type="radio"]:checked + * {
    /* This doesn't directly style the label, but we handle it with a class change */
}

.radio-label {
    border: 1px solid rgba(255, 255, 255, 0.2);
}

input[type="radio"]:checked ~ .radio-label {
   /* This is a sibling selector - doesn't work well with our label wrapping the input. We'll use JS for a visual check if needed, but CSS hover is enough for now. A simpler visual cue on the label itself is better. */
}

/* Let's simplify and style the label when the (hidden) radio inside it is checked */
.radio-label:has(input:checked) {
    background-color: var(--primary-purple);
    border-color: var(--primary-purple);
    font-weight: 600;
}


.submit-btn {
    width: 100%;
    background-color: var(--primary-purple);
    font-size: 1.1em !important;
    padding: 15px !important;
}

.submit-btn:hover {
    background-color: #8e6ab8 !important;
}

.legacy-container {
    max-width: 900px; /* Wider container for better image display */
}

.legacy-year {
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.legacy-year:last-of-type {
    border-bottom: none; /* Remove border from the last section */
    margin-bottom: 0;
}

.legacy-year h2 {
    text-align: left;
}

.legacy-year p {
    text-align: left;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 25px;
    font-size: 1em;
}

.legacy-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.legacy-gallery img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.legacy-gallery img:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
}