/* ============================================
   CSS Variables - Theme Colors
   ============================================ */
:root {
    /* Dark Theme Colors */
    --background-dark: #606060;
    --surface-dark: #303030;
    --accent-dark: #9755CE;
    --text-primary-dark: #C2C2C2;
    --text-secondary-dark: #A8A193;
    --title-foreground-dark: var(--accent-dark);
    --navlinks-bkg-dark: #8209C4;

    /* Light Theme Colors */
    --background-light: #F0F0F0;
    --surface-light: #E0E0E0;
    --accent-light: #8209C4;
    --text-primary-light: #242424;
    --text-secondary-light: #606060;
    --title-foreground-light: var(--accent-light);
    --navlinks-bkg-light: #A8A193;
}

/* ============================================
   Base Styles
   ============================================ */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans', sans-serif;
    margin: 0;
    padding: 2rem;
    transition: background-color 0.3s, color 0.3s;
}

/* ============================================
   Dark Theme
   ============================================ */
@media (prefers-color-scheme: dark) {
    body {
        background-color: var(--background-dark);
        color: var(--text-primary-dark);
        --text-primary: var(--text-primary-dark);
        --accent: var(--accent-dark);
        --surface: var(--surface-dark);
    }
    .container {
        background-color: var(--surface-dark);
    }
    h1 { color: var(--text-primary-dark); }
    .title { color: var(--title-foreground-dark); }
    h3, h4, h5 { color: var(--text-primary-dark); }
    a { color: var(--accent-dark); }
    .button {
        background-color: var(--accent-dark);
        color: white;
    }
    .popup-content {
        background-color: var(--surface-dark);
    }
    .nav-links-box {
        background-color: var(--navlinks-bkg-dark);
    }
    .document-jewel {
        background-image: url('DocumentJewel-darktheme.png');
    }
}

/* ============================================
   Light Theme
   ============================================ */
@media (prefers-color-scheme: light) {
    body {
        background-color: var(--background-light);
        color: var(--text-primary-light);
        --text-primary: var(--text-primary-light);
        --accent: var(--accent-light);
        --surface: var(--surface-light);
    }
    .container {
        background-color: var(--surface-light);
    }
    h1 { color: var(--text-primary-light); }
    .title { color: var(--title-foreground-light); }
    h3, h4, h5 { color: var(--text-primary-light); }
    a { color: var(--accent-light); }
    .button {
        background-color: var(--accent-light);
        color: white;
    }
    .popup-content {
        background-color: var(--surface-light);
    }
    .nav-links-box {
        background-color: var(--navlinks-bkg-light);
    }
    .document-jewel {
        background-image: url('DocumentJewel.png');
    }
}

/* ============================================
   Responsive Breakpoints
   ============================================ */
@media (max-width: 800px) {
    .intro-container {
        flex-direction: column;
    }
    .nav-links-box {
        margin-top: 110px;
    }
    .about-us-details {
        flex-direction: column;
    }
    body {
        padding: 0px;
    }
    .container {
        margin: 0px;
        width: 100%;
        box-sizing: border-box;
    }
}
@media (min-width: 801px) {
    .container {
        max-width: 800px;
        margin: 0 auto;
        border-radius: 8px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }
}

/* ============================================
   Typography
   ============================================ */
.title { font-family: 'Amarante', serif; font-size: 80pt; font-weight: 200; margin-top: 0px; margin-bottom: 50px; }
.extra-horizontal-offset-title { margin-left: 1rem; text-align: center; }
h1 { font-family: 'Cinzel', serif; font-weight: 900; font-size: 28pt; margin-top: 20px; margin-bottom: 15px; }
h2 { font-family: 'Cinzel', serif; font-weight: 500; font-size: 20pt; margin-top: 10px; margin-bottom: 5px; }
h3 { font-family: 'Cinzel', serif; font-weight: 400; font-size: 16pt; }
h4 { font-family: 'Amarante', serif; font-weight: 400; font-size: 14pt; }
h5 { font-family: 'Noto Sans', sans-serif; font-weight: 700; font-size: 14pt; }
p, li, a, .button { font-family: 'Noto Sans', sans-serif; font-weight: 400; font-size: 14pt; }

@media (max-width: 800px) {
    .title { font-size: 60pt; }
}

/* ============================================
   Layout
   ============================================ */
.container {
    position: relative;
    padding: 2rem;
}

.intro-container {
    display: inline-flex;
    width: calc(100% - 20px);
    margin: 10px;
    gap: 20px;
}

.separated {
    margin: 0px 10px 10px 0px;
}
/* ============================================
   Buttons
   ============================================ */
.button {
    display: inline-block;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    cursor: pointer;
    border: none;
    font-size: 2rem;
}

.button:disabled {
    opacity: 0.5;
    cursor: default;
}

.smol-button {
    display: inline-block;
    padding: 8px;
    text-decoration: none;
    border-radius: 0px;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    width: 200px;
}

/* ============================================
   Document Jewel & Navigation
   ============================================ */
.document-jewel {
    position: absolute;
    top: 0px;
    left: 0px;
    z-index: 9999;
    pointer-events: none;
    width: 128px;
    height: 186.18px;
    background-size: cover;
    background-repeat: no-repeat;
}

nav {
    display: none;
}

nav.visible {
    display: block;
}

.nav-links-box {
    position: relative;
    width: 100%;
    max-width: 85%;
    padding: 20px;
    border: 5px solid black;
}

.overlay-image {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateY(-170px);
    width: auto;
    height: 200px;
    z-index: 10;
}

/* ============================================
   Popup / Modal
   ============================================ */
.popup {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.popup-content {
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: var(--text-primary);
}

.popup-content form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.popup-content input,
.popup-content textarea,
.popup-content select {
    padding: 10px;
    border: 1px solid var(--text-primary);
    border-radius: 5px;
    background-color: var(--surface);
    color: var(--text-primary);
    font-family: 'Noto Sans', sans-serif;
    font-size: 14pt;
}

.popup-content input:focus,
.popup-content textarea:focus,
.popup-content select:focus {
    outline: none;
    border-color: var(--accent);
}

.popup-content select option {
    background-color: var(--surface);
    color: var(--text-primary);
}

/* ============================================
   Spinner
   ============================================ */
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #ccc;
    border-top: 2px solid #333;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: inline-block;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   Misc
   ============================================ */
.subtitle {
    font-weight: 300;
    font-size: 1.5rem;
    color: #666;
    margin-top: -0.5rem;
}

.contact-list a {
    display: block;
    margin-bottom: 0.5rem;
    text-decoration: none;
}

.about-us-details {
    display: inline-flex;
    width: calc(100% - 20px);
    margin: 10px;
    gap: 20px;
}

/* ============================================
   Social Widgets (Reddit / Discord)
   ============================================ */
.base-widget {
    display: flex;
    align-items: center;
    width: 180px;
    height: 30px;
    padding: 10px 15px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    font-family: Arial, sans-serif;
    color: white;
    font-weight: bold;
    text-decoration: none;
}

.base-widget:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.widget-icon {
    width: 24px;
    height: 24px;
    margin-right: 10px;
}

.widget-text {
    font-size: 16px;
    line-height: 1;
    margin-left: 10px;
}

.reddit-widget {
    background-color: #FF4500;
}

.reddit-widget:hover {
    background-color: #E03D00;
}

.second-widget {
    margin-top: 10px;
}

.discord-widget {
    background-color: #5865F2;
}

.discord-widget:hover {
    background-color: #4B56C7;
}
