/* ===========================
   GLOBAL PAGE STYLING
   =========================== */

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: #05060a;
    color: #f5f5f5;
}

.content {
    max-width: 900px;
    margin: 20px auto 40px;
    padding: 0 20px;
    box-sizing: border-box;
}

/* ===========================
   HEADER
   =========================== */

.site-header {
    text-align: center;
    padding: 30px 15px;
    background: linear-gradient(135deg, #111827, #060b1b);
    border-bottom: 1px solid #1f2933;
}

.site-header h1 {
    margin: 0;
    font-size: 2.2rem;
    letter-spacing: 1px;
}

.site-header p {
    margin-top: 8px;
    color: #9ca3af;
}

.title-with-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.title-icon {
    width: 40px;
    height: 40px;
    border-radius: 6px;
}

/* ===========================
   NAVIGATION BAR
   =========================== */

.navbar {
    background: #0f172a;
    padding: 16px 0;
    display: flex;
    justify-content: center;
    gap: 40px;
    border-bottom: 1px solid #1e293b;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar a {
    color: #38bdf8;
    font-size: 1.15rem;
    font-weight: 600;
    text-decoration: none;
    position: relative;
    padding-bottom: 4px;
    transition: color 0.25s ease;
}

.navbar a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0%;
    height: 2px;
    background: #38bdf8;
    transition: width 0.25s ease;
}

.navbar a:hover {
    color: #7dd3fc;
}

.navbar a:hover::after {
    width: 100%;
}

.navbar a:visited {
    color: #38bdf8;
}

/* ===========================
   UNIFIED SECTION HEADERS
   =========================== */

section h2 {
    font-size: 1.6rem;
    margin-bottom: 20px;
    border-bottom: 1px solid #1f2933;
    padding-bottom: 8px;
}

/* ===========================
   DEMONLIST
   =========================== */

.demon-entry {
    display: grid;
    grid-template-columns: 60px 180px auto;
    gap: 10px 15px;
    align-items: center;
    background: #0b1020;
    border: 1px solid #111827;
    border-radius: 10px;
    padding: 12px 15px;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.position {
    font-size: 1.8rem;
    font-weight: 800;
    color: #38bdf8;
    text-align: center;
}

.thumbnail {
    width: 180px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #1f2933;
}

.info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.level-name {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.creator,
.level-id {
    font-size: 0.95rem;
    color: #9ca3af;
}

/* ===========================
   MOBILE RESPONSIVENESS
   =========================== */

@media (max-width: 600px) {
    .demon-entry {
        grid-template-columns: 50px 140px auto;
    }

    .thumbnail {
        width: 140px;
        height: 80px;
    }

    .position {
        font-size: 1.4rem;
    }

    .level-name {
        font-size: 1.1rem;
    }
}

/* ===========================
   CREDITS PAGE
   =========================== */

.credit-list {
    list-style: none;
    padding: 0;
}

.credit-list li {
    background: #0b1020;
    border: 1px solid #1f2933;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 6px;
}

.credits-divider {
    border: none;
    border-top: 1px solid #1f2933;
    margin: 30px 0;
}

/* ===========================
   SUBMIT A LEVEL PAGE
   =========================== */

.submit-desc {
    color: #9ca3af;
    margin-bottom: 20px;
}

.submit-form {
    background: #0b1020;
    border: 1px solid #1f2933;
    padding: 20px 15px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);

    display: flex;
    flex-direction: column;
    gap: 12px;

    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.submit-form label {
    font-weight: 700;
    font-size: 1rem;
    color: #38bdf8;
}

.submit-form label.required::after {
    content: " *";
    color: #f87171;
    font-weight: 900;
}

.submit-form input[type="text"],
.submit-form input[type="file"] {
    background: #111827;
    border: 1px solid #1f2933;
    padding: 10px;
    border-radius: 6px;
    color: #f5f5f5;
    font-size: 1rem;
}

.submit-form input[type="text"]:focus {
    outline: none;
    border-color: #38bdf8;
    box-shadow: 0 0 6px #38bdf8;
}

.submit-button {
    margin-top: 5px;
    align-self: center;
    width: 180px;
    font-size: 1rem;
    border: none;
    cursor: pointer;

    background: #38bdf8;
    color: #0b1020;
    padding: 10px;
    border-radius: 6px;
    font-weight: 700;
    transition: 0.2s ease;
}

.submit-button:hover {
    background: #7dd3fc;
}

/* ===========================
   FORM FEEDBACK MESSAGES
   =========================== */

.error-message {
    color: #f87171;
    font-weight: 600;
}

.success-message {
    color: #4ade80;
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.success-message.show {
    opacity: 1;
}

/* ===========================
   AUTH UI (TOP RIGHT)
   =========================== */

.top-right-auth {
    position: absolute;
    top: 15px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-btn {
    padding: 6px 12px;
    background: #5865F2;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.auth-btn:hover {
    background: #4752C4;
}

.auth-status {
    color: white;
    font-size: 14px;
}
