/* ============================================================
   THEMES  — must mirror main.css exactly
   ============================================================ */

/* Default Theme (Blue) */
:root {
    --main-color:   rgba(0, 191, 255, 0.2);
    --black-glow:   rgba(0, 0, 0, 0.7);
    --hover-color:  gold;
    --border-glow:  rgba(0, 191, 255, 0.8);
    --neon-cyan:    #00bfff;
    --golden:       #ffcc00;
    /* Matrix rain: blue */
    --matrix-r: 0;
    --matrix-g: 191;
    --matrix-b: 255;
    /* Special glyph accent: red */
    --glyph-r: 255;
    --glyph-g: 50;
    --glyph-b: 50;

    --background-color:  #111;
    --login-box-bg:      rgba(0, 0, 0, 0.8);
    --input-border:      #00bfff;
    --button-bg:         linear-gradient(135deg, #0078ff, #00bfff);
    --button-hover-bg:   linear-gradient(135deg, #00bfff, #0088ff);
}

/* Red Theme */
:root[data-theme="red"] {
    --main-color:   rgba(255, 69, 0, 0.2);
    --black-glow:   rgba(0, 0, 0, 0.7);
    --hover-color:  yellow;
    --border-glow:  rgba(255, 69, 0, 0.8);
    --neon-cyan:    #ff4500;
    --golden:       #ffdd00;
    /* Matrix rain: red/orange */
    --matrix-r: 255;
    --matrix-g: 69;
    --matrix-b: 0;
    /* Special glyph accent: blue */
    --glyph-r: 0;
    --glyph-g: 191;
    --glyph-b: 255;

    --input-border:    #ff4500;
    --button-bg:       linear-gradient(135deg, #cc2200, #ff4500);
    --button-hover-bg: linear-gradient(135deg, #ff4500, #ff6622);
}

/* Green Theme */
:root[data-theme="green"] {
    --main-color:   rgba(0, 255, 120, 0.2);
    --black-glow:   rgba(0, 0, 0, 0.7);
    --hover-color:  lime;
    --border-glow:  rgba(0, 255, 120, 0.8);
    --neon-cyan:    #00ff78;
    --golden:       #ccff00;
    /* Matrix rain: green */
    --matrix-r: 0;
    --matrix-g: 255;
    --matrix-b: 120;
    /* Special glyph accent: gold */
    --glyph-r: 255;
    --glyph-g: 215;
    --glyph-b: 0;

    --input-border:    #00ff78;
    --button-bg:       linear-gradient(135deg, #00cc66, #00ff78);
    --button-hover-bg: linear-gradient(135deg, #00ff78, #33ff99);
}

/* Proxmox Theme */
:root[data-theme="proxmox"] {
    --main-color:   rgba(227, 104, 0, 0.2);
    --black-glow:   rgba(0, 0, 0, 0.8);
    --hover-color:  #ffffff;
    --border-glow:  rgba(227, 104, 0, 0.8);
    --neon-cyan:    #e36800;
    --golden:       #ffffff;
    /* Matrix rain: orange */
    --matrix-r: 227;
    --matrix-g: 104;
    --matrix-b: 0;
    /* Special glyph accent: white */
    --glyph-r: 255;
    --glyph-g: 255;
    --glyph-b: 255;

    --input-border:    #e36800;
    --button-bg:       linear-gradient(135deg, #b35000, #e36800);
    --button-hover-bg: linear-gradient(135deg, #e36800, #ff8c2a);
}

/* ============================================================
   RESET
   ============================================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ============================================================
   BASE
   ============================================================ */
body {
    font-family: 'Roboto', sans-serif;
    height: 100vh;
    overflow: hidden;
    color: white;
    position: relative;
    background-color: var(--background-color);
    transition: background-color 0.3s, color 0.3s;
}

/* ============================================================
   BACKGROUND
   ============================================================ */
.background {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-color: var(--background-color);
}

/* ============================================================
   MAIN CONTENT
   FIX Bug 1 (login theme toggle): .main-content is full-height
   and positioned above the footer in the paint order. Setting
   pointer-events:none lets clicks fall through to the footer
   while re-enabling it on all interactive children.
   ============================================================ */
.main-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    height: 100%;
    width: 100%;
    position: absolute;
    z-index: 2;
    top: 0;
    padding-top: 60px;
    pointer-events: none;
}

.main-content > * {
    pointer-events: auto;
}

/* ============================================================
   LOGO
   ============================================================ */
.logo-image {
    max-width: 250px;
    height: auto;
    margin-bottom: 20px;
    opacity: 0.75;
}

/* ============================================================
   LOGIN ERROR
   ============================================================ */
.error-msg {
    color: #ff5555;
    font-size: 13px;
    text-align: center;
    margin-bottom: 14px;
    padding: 8px 12px;
    background: rgba(255, 68, 68, 0.08);
    border: 1px solid rgba(255, 68, 68, 0.3);
    border-radius: 4px;
}

/* ============================================================
   LOGIN BOX
   ============================================================ */
.login-box {
    background-color: var(--login-box-bg);
    padding: 40px;
    border-radius: 4px;
    box-shadow: 1px 5px 8px var(--main-color);
    max-width: 400px;
    width: 100%;
    text-align: center;
    z-index: 3;
}

.login-box label {
    display: block;
    text-align: left;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 12px;
    margin-bottom: 4px;
    letter-spacing: 0.08em;
}

.login-box input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--input-border);
    border-radius: 8px;
    color: white;
    background: #0d0d0d;
    color-scheme: dark;
    outline: none;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.login-box input:focus {
    border-color: var(--golden);
    box-shadow: 0 0 12px rgba(255, 204, 0, 0.7);
}


.login-box input:-webkit-autofill,
.login-box input:-webkit-autofill:hover,
.login-box input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #0d0d0d inset;
    -webkit-text-fill-color: white;
    caret-color: white;
    transition: background-color 5000s ease-in-out 0s;
}
.login-box button {
    width: 100%;
    padding: 15px;
    background: var(--button-bg);
    border: none;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 6px;
    margin-top: 20px;
    transition: background 0.3s, box-shadow 0.3s, transform 0.2s;
    box-shadow:
        inset 0 -2px 5px rgba(0, 0, 0, 0.4),
        0 4px 10px var(--border-glow);
}

.login-box button:hover {
    background: var(--button-hover-bg);
    box-shadow: 0 0 20px var(--border-glow);
    transform: scale(1.05);
}

/* ============================================================
   FOOTER
   ============================================================ */
footer.footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 10px 50px;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 999;
}

.footer .theme-toggle {
    position: absolute;
    right: 50px;
}

.theme-toggle {
    background: var(--main-color);
    color: white;
    font-size: 13px;
    border: 1px solid var(--border-glow);
    padding: 6px 14px;
    min-height: 32px;
    text-transform: uppercase;
    font-weight: 500;
    cursor: pointer;
    border-radius: 4px;
    box-shadow: 0 0 10px var(--border-glow);
    transition: background 0.3s, color 0.3s, box-shadow 0.3s;
    white-space: nowrap;
}

.theme-toggle:hover {
    background: var(--hover-color);
    color: black;
    box-shadow: 0 0 15px var(--hover-color);
}

/* ============================================================
   EMAIL LINK
   ============================================================ */
.email-link {
    text-decoration: none;
    color: var(--neon-cyan);
    font-weight: bold;
    transition: color 0.3s;
}

.email-link:hover {
    text-decoration: underline;
    color: var(--golden);
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-sep {
    margin: 0;
    color: var(--neon-cyan);
    opacity: 0.4;
    font-weight: 300;
    user-select: none;
}

.github-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    vertical-align: middle;
}

.github-icon {
    width: 14px;
    height: 14px;
    fill: var(--neon-cyan);
    transition: fill 0.3s;
    flex-shrink: 0;
}

.github-link:hover .github-icon {
    fill: var(--golden);
}
