/* Basic Reset & Font Import */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap'); /* Example font, adjust if needed */


.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}




:root {
    --bg-color: #12101c; /* Dark blue/purple background */
    --bg-gradient-start: #1a1a2e;
    --bg-gradient-end: #12101c;
    --primary-color: #a050f0; /* Purple accent from images */
    --text-color: #e0e0e0;
    --text-muted: #a0a0a0;
    --card-bg: #1f1d2b;
    --border-color: #3a384c;
    --link-hover: #c070ff;
    --status-operational: limegreen;
    --status-degraded: orange;
    --status-outage: red;
    --status-unknown: grey;


    --font-main: 'Poppins', sans-serif; /* Use the imported font */
}

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

html {
    height: 100%; /* Ensure html takes full height */
}

body {
    font-family: var(--font-main);
    background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
    background-attachment: fixed; /* Keep gradient fixed during scroll */
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100%; /* Changed from 100vh to 100% */
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 960px;
    margin: 0 auto; /* Center container */
    padding: 0 1rem;
    width: 100%; /* Ensure container takes up space */
    flex-grow: 1; /* Allow container to grow and push footer down */
    display: flex; /* Use flexbox for inner layout */
    flex-direction: column; /* Stack header, main, footer */
}

/* Header & Logo */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    width: 100%; /* Ensure header spans container width */
    flex-shrink: 0; /* Prevent header from shrinking */
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 50px; /* Adjust as needed */
    width: auto;
    margin-right: 15px;
    filter: drop-shadow(0 0 5px rgba(160, 80, 240, 0.5)); /* Subtle glow */
}

.logo-text {
    font-size: 2.5rem;
    font-weight: 300; /* Thin font weight like the image */
    color: var(--primary-color);
    letter-spacing: 1px;
}

nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap; /* Allow nav items to wrap */
    justify-content: center; /* Center nav items when wrapped */
}

nav ul li {
    margin-left: 1.5rem;
}
/* Remove margin-left from the first nav item */
nav ul li:first-child {
    margin-left: 0;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 400;
    transition: color 0.3s ease;
    padding: 0.5rem 0; /* Add some padding for touch */
    display: inline-block; /* Needed for padding */
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--primary-color);
}

/* Main Content Area */
main {
    margin-bottom: 3rem;
    width: 100%; /* Ensure main spans container width */
    flex-grow: 1; /* Allow main content to take available space */
}

h1, h2, h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

h1 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

h2 {
    font-size: 1.8rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-top: 2rem;
}

h3 {
     font-size: 1.3rem; /* Adjusted H3 size */
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--link-hover);
}

/* Buttons */
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
    margin: 0.5rem 0.25rem; /* Add slight horizontal margin */
    text-align: center; /* Ensure text is centered */
}

.btn:hover {
    background-color: var(--link-hover);
    transform: translateY(-2px);
    color: #ffffff;
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-secondary:hover {
    background-color: rgba(160, 80, 240, 0.1);
    border-color: var(--link-hover);
    color: var(--link-hover);
}

/* Cards (for versions, changelogs, etc.) */
.card {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.card h3 {
    margin-top: 0;
    margin-bottom: 0.8rem;
    color: var(--text-color); /* Make card titles stand out slightly */
    font-size: 1.3rem;
}

.version-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.changelog-list,
.faq-answer ul { /* Apply list styles consistently */
    list-style: disc;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    padding-left: 0; /* Override default padding if needed */
}
.changelog-list li,
.faq-answer ul li {
    margin-bottom: 0.5rem;
}

.download-info p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.download-info code {
    background-color: var(--bg-color);
    padding: 2px 5px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.85rem;
    word-break: break-all;
    color: var(--text-muted); /* Slightly muted code block */
}

/* Specific Sections */

/* Introduction Section */
#introduction-section {
    margin-bottom: 3rem;
    padding: 1.5rem;
    background-color: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}
#introduction-section h2 {
    margin-top: 0;
    text-align: center;
    border-bottom: none; /* Remove border for centered heading */
}
#introduction-section p {
    margin-bottom: 1rem;
    text-align: justify;
    hyphens: auto;
}


/* Latest Version Section (Homepage) */
#latest-version-section h2 { /* Style specific heading if needed */
    text-align: center;
    border-bottom: none;
    margin-bottom: 0.5rem; /* Adjust spacing */
}
#latest-version-section > p.version-meta { /* Style the date below H2 */
     text-align: center;
     color: var(--text-muted);
     margin-bottom: 1.5rem;
}

#latest-version-section .card {
    text-align: left; /* Ensure card content is left-aligned */
}

#download-section {
    margin-top: 1.5rem;
    border-top: 1px dashed var(--border-color);
    padding-top: 1.5rem;
    text-align: center; /* Center buttons */
}
#download-section .download-info {
    margin-top: 1.5rem;
    text-align: left; /* Align text details left */
}

/* FAQ Page */
#faq-list .faq-item {
    margin-bottom: 1.5rem;
}
#faq-list .faq-question {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem; /* Slightly larger question font */
}
#faq-list .faq-answer.card {
    /* Specific styling for FAQ answer card if needed */
    margin-bottom: 0; /* Remove bottom margin if it's inside faq-item */
}
#faq-list .faq-answer p {
     margin-bottom: 0; /* Remove default paragraph margin inside answer */
}

/* Credits Section (Homepage) */
#credits-section {
    margin-top: 3rem;
}
#credits-section h2 {
     text-align: center;
     border-bottom: none;
     margin-bottom: 1.5rem; /* More space below heading */
}
#credits-list {
    list-style: none;
    padding: 1.5rem; /* Add padding inside the card */
    margin: 0;
    background-color: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); /* Consistent shadow */
}
#credits-list li {
    margin-bottom: 0.75rem;
    padding-left: 1.2rem; /* Indent text */
    position: relative;
    font-size: 0.95rem; /* Slightly adjust font size */
}
#credits-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    top: 0.1em; /* Adjust vertical alignment */
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.1em; /* Slightly larger bullet */
}

#credits-list strong {
    color: var(--primary-color);
    font-weight: 600; /* Ensure strong tag is bold */
}


/* Known Issues Page */
#known-issues-content .issue-item {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    border-left: 5px solid var(--primary-color); /* Accent border */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#known-issues-content .issue-item h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

#known-issues-content .issue-meta {
    font-size: 0.9em;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: flex; /* Use flexbox for alignment */
    flex-wrap: wrap; /* Allow wrapping */
    gap: 0.5rem 1.5rem; /* Row and column gap */
}
#known-issues-content .issue-meta span {
     /* No specific styling needed with flex gap */
}
#known-issues-content .issue-meta strong {
    color: var(--primary-color);
    font-weight: 600;
}
#known-issues-content .issue-details {
    margin-top: 0.5rem;
}

/* Status Page */
#status-content .status-card {
     background-color: var(--card-bg);
     padding: 2rem;
     border-radius: 8px;
     text-align: center;
     border: 1px solid var(--border-color);
     box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#status-indicator {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 10px;
    vertical-align: middle;
    border: 2px solid rgba(255, 255, 255, 0.3); /* Less opaque border */
    box-shadow: 0 0 8px 1px currentColor; /* Glow effect using text color */
}

#status-text {
    font-size: 1.5rem;
    font-weight: 600;
    vertical-align: middle;
    /* Color is set dynamically via JS */
}

#status-message {
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 1.1rem; /* Slightly larger status message */
}

#status-last-checked {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}
/* ─── License Modal ───────────────────────────────────────── */
.modal {
  display: none; /* hidden by default */
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.8);
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background-color: var(--card-bg);
  color: var(--text-color);
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.modal-content h2 {
  margin-top: 0;
  color: var(--primary-color);
}

.modal-body p,
.modal-body ul {
  margin-bottom: 1rem;
}

.modal-body ul {
  list-style: disc;
  padding-left: 1.5rem;
}

.modal-footer {
  text-align: right;
  margin-top: 1rem;
}
/* ─────────────────────────────────────────────────────────── */

/* Support Pop-up Notification */
.support-popup {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: var(--card-bg);
    color: var(--text-color);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 1001; /* Above modal (1000) */
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 300px;
    font-size: 0.9rem; /* Base font size for the popup */
}

.support-popup p {
    margin: 0;
    text-align: center;
    padding-top: 5px; /* Add some space if 'x' is close */
}

.support-popup-actions {
    display: flex;
    gap: 10px; /* Space between buttons */
}

.support-popup-btn {
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
    flex-grow: 1; /* Make buttons share space */
    text-align: center;
}

.support-popup-btn:hover {
    background-color: var(--link-hover);
    color: #ffffff !important; /* Ensure text color remains white on hover for <a> */
}

.support-popup-close-x {
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 1.6rem; /* Slightly larger 'x' */
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
}

.support-popup-close-x:hover {
    color: var(--primary-color);
}

/* Footer */
footer {
    text-align: center;
    padding: 1.5rem 0;
    margin-top: auto; /* Push footer to bottom - works with flex column body/container */
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-muted);
    width: 100%; /* Ensure footer spans container width */
    flex-shrink: 0; /* Prevent footer from shrinking */
}
footer p {
    margin-bottom: 0.25rem; /* Reduce space between footer paragraphs */
}

footer a {
    color: var(--text-muted);
}

footer a:hover {
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .logo-container {
        margin-bottom: 1rem;
    }

    nav ul {
        justify-content: center;
        padding-left: 0; /* Remove padding when centered */
        margin-top: 1rem; /* Add space between logo and nav */
    }
    nav ul li {
        margin: 0 0.75rem; /* Adjust spacing */
    }
     nav ul li:first-child {
         margin-left: 0.75rem; /* Re-add margin if needed when centered */
     }


    h1 {
        font-size: 1.8rem;
    }
    h2 {
        font-size: 1.5rem;
    }
    .logo-text {
        font-size: 2rem;
    }

    #known-issues-content .issue-meta {
        flex-direction: column; /* Stack meta items vertically */
        align-items: flex-start; /* Align items left */
        gap: 0.25rem; /* Reduce gap */
    }
}

@media (max-width: 480px) {
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    nav ul li {
        margin: 0.5rem 0; /* Stack nav items vertically */
    }
     nav ul li:first-child {
         margin-left: 0; /* Reset margin */
     }

    .btn {
        width: 90%; /* Make buttons take most width */
        padding: 12px 15px; /* Adjust padding */
        font-size: 0.95rem;
        margin-left: 5%; /* Center button block */
        margin-right: 5%;
    }
     #download-section .btn { /* Ensure buttons in download section stack nicely */
        display: block; /* Make each button take full width */
        margin: 0.75rem auto; /* Center and add vertical space */
        width: 90%;
     }

    .container {
        padding: 0 0.5rem; /* Reduce side padding */
    }

    .card {
        padding: 1rem; /* Reduce card padding */
    }

    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.4rem; }
    h3 { font-size: 1.1rem; }
    .logo-text { font-size: 1.8rem; }
}

.discord-icon {
    height: 20px;
    width: 20px;
    vertical-align: middle;
    margin-right: 5px;
    filter: brightness(0) invert(1); /* Make the icon white */
}

/* Header Discord link - simple version */
nav .discord-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 0; /* Match other nav items */
    background: none;
    color: var(--text-muted) !important;
}

nav .discord-link:hover {
    color: var(--primary-color) !important;
    background: none;
}

/* Main Discord section button - colored version */
#discord-section .discord-link {
    display: flex;
    align-items: center;
    gap: 5px;
    background-color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 4px;
    color: white !important;
    transition: background-color 0.3s ease;
}

#discord-section .discord-link:hover {
    background-color: var(--link-hover);
    color: white !important;
}

#discord-section {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
    text-align: center;
}

#discord-section .btn {
    background-color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#discord-section .btn:hover {
    background-color: var(--link-hover);
}

#discord-section .discord-icon {
    height: 24px;
    width: 24px;
}

/* --- Email Alias Form --- */
#email-alias-section {
    text-align: center;
}

#email-alias-section h2 {
    margin-top: 0;
    border-bottom: none;
}

#email-alias-form {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

#email-alias-form label {
    font-weight: 600;
    color: var(--text-muted);
}

#email-alias-form input[type="email"] {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 12px;
    border-radius: 5px;
    font-size: 1rem;
    font-family: var(--font-main);
}

#email-alias-form input[type="email"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px var(--primary-color);
}

#alias-status {
    margin-top: 1rem;
    font-weight: bold;
    min-height: 1.5em;
}

.status-success {
    color: var(--status-operational);
}

.status-error {
    color: var(--status-outage);
}


