/*
    U.S.B. WIKI
    THEMATIC STYLESHEET V4.0
    FILE: styles/themes.css
*/

/* BASE SETUP & SHARED STYLES */
:root {
    --scanline-color: rgba(0, 0, 0, 0.2);
}
html, body { height: 100%; margin: 0; padding: 0; overflow: hidden; background-color: #000; }
body { font-family: 'Roboto Mono', monospace; font-size: 16px; display: flex; align-items: center; justify-content: center; position: relative; transition: background-color 0.5s; color: var(--main-text-color); }
body::before { content: ""; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: repeating-linear-gradient(0deg, var(--scanline-color), var(--scanline-color) 1px, transparent 1px, transparent 3px); z-index: 9999; pointer-events: none; animation: flicker-heavy 20s infinite linear alternate; }
.container { width: 98%; height: 95%; padding: 20px; box-shadow: 0 0 15px var(--border-color) inset; background: var(--container-bg); animation: flicker-light 10s infinite linear; display: flex; flex-direction: column; transition: border-color 0.5s, box-shadow 0.5s, background-color 0.5s; border: 2px solid var(--border-color); }
.screen { display: none; flex-grow: 1; height: 100%; width: 100%; }
.screen.active { display: flex; flex-direction: column; animation: fadeIn 0.5s; }
.centered-screen { text-align: center; justify-content: center; align-items: center; }
h1, h2, h3, h4 { text-transform: uppercase; letter-spacing: 2px; text-shadow: 0 0 8px var(--header-text-color); color: var(--header-text-color); margin-top: 0; }
input, button, select { background: transparent; border: 1px solid var(--border-color); color: var(--main-text-color); font-family: 'Roboto Mono', monospace; font-size: 16px; padding: 10px; margin: 5px; }
button { cursor: pointer; text-transform: uppercase; transition: background-color 0.2s, color 0.2s; }
button:hover { background-color: var(--border-color); color: #000; }
.user-management select { cursor: pointer; }
.error-message { color: var(--error-text-color); text-shadow: 0 0 5px var(--error-text-color); font-size: 16px; border: 1px solid var(--error-text-color); padding: 10px; margin-top: 15px; display: none; }
.thought-for-the-day { border-top: 1px solid var(--border-color); margin-top: auto; padding-top: 15px; font-style: italic; flex-shrink: 0; font-size: 14px; text-align: center; }
.redacted { background-color: var(--redacted-bg); color: var(--redacted-bg); text-shadow: none; user-select: none; }
.main-hub { flex-direction: column; position: relative; }
.content-pane { flex-grow: 1; height: 100%; overflow-y: auto; padding-right: 10px; }
.bottom-nav { flex-shrink: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 8px; border-top: 2px solid var(--border-color); }
.bottom-nav button.active { background: var(--border-color); color: #000; }
.profile-info {
    flex-basis: 100%;
    font-size: 11px;
    text-align: left;
}
.profile-info ul { list-style: none; padding-left: 1rem; margin: 0; }
.landing-menu { display: flex; flex-direction: column; gap: 1.5rem; padding: 1rem 0 2rem; }
.landing-header p { margin: 0; }
.main-menu-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.menu-card { background: var(--container-bg); border: 1px solid var(--border-color); padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem; box-shadow: 0 0 10px rgba(0, 0, 0, 0.35); }
.menu-card h3 { margin: 0; }
.menu-card p { margin: 0; }
.menu-card a, .menu-card button { align-self: flex-start; }
.menu-note { font-size: 0.85rem; opacity: 0.75; }
.user-management { display: flex; flex-direction: column; gap: 1rem; padding-bottom: 2rem; }
.user-management > p { margin: 0; }
.user-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.user-card { border: 1px solid var(--border-color); background: var(--container-bg); padding: 1rem; display: flex; flex-direction: column; }
.user-card h3 { margin-top: 0; margin-bottom: 0.5rem; }
.user-card-branch { margin: 0 0 0.5rem 0; font-size: 0.85rem; opacity: 0.8; }
.theme-admin-note { font-size: 0.85rem; opacity: 0.8; margin: 0 0 0.5rem 0; }
.theme-select { display: flex; flex-direction: column; gap: 0.35rem; margin-top: 0.75rem; font-size: 0.85rem; }
.theme-select span { text-transform: uppercase; letter-spacing: 1px; font-size: 0.75rem; }
.theme-select select { margin: 0; width: 100%; padding: 8px; }
.theme-note { margin: 0.25rem 0 0; font-size: 0.9rem; }
.theme-mode-note { margin: 0.25rem 0 0; font-size: 0.75rem; opacity: 0.75; }
.user-theme-label { font-weight: 700; }
.user-card-flags { margin-top: 0.75rem; font-size: 0.8rem; }
.user-card-flags ul { margin-top: 0.5rem; }
.home-button { position: fixed; bottom: 5px; left: 5px; background: var(--container-bg); border: 1px solid var(--border-color); padding: 0.5rem 0.75rem; font-size: 12px; z-index: 1000; }
.admin-table { width: 100%; border-collapse: collapse; margin-top: 15px; }
.admin-table th, .admin-table td { border: 1px solid var(--border-color); padding: 8px; text-align: left; }
.admin-table th { background-color: var(--container-bg-darker); }
.modal-backdrop { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); z-index: 1000; display: flex; align-items: center; justify-content: center;}
.modal-content { background: var(--main-bg-color); border: 2px solid var(--border-color); padding: 30px; width: 60%; max-width: 800px; box-shadow: 0 0 20px var(--border-color); position: relative; }
.modal-close { position: absolute; top: 10px; right: 10px; }
.typing-effect { overflow: hidden; white-space: pre-wrap; margin: 0 auto; animation: typing 2.5s steps(40, end); }
.about-button { font-size: 12px; padding: 5px 8px; margin-top: 20px; }
@keyframes typing { from { width: 0 } to { width: 100% } }
@keyframes flicker-light { 0%, 100% { opacity: 1; } 50% { opacity: 0.98; } }
@keyframes flicker-heavy { 0%, 100% { opacity: 1; } 50.2% { opacity: 0.8; } }
@keyframes pulse { 0%, 100% { text-shadow: 0 0 5px var(--header-text-color), 0 0 10px var(--header-text-color); } 50% { text-shadow: 0 0 10px var(--header-text-color), 0 0 20px var(--header-text-color); } }

.rosette.spin { animation: spin 20s linear infinite; }
.title-glow { animation: glow 3s ease-in-out infinite alternate; }
.login-card { background: var(--container-bg); border: 1px solid var(--border-color); border-radius: 8px; padding: 1rem; box-shadow: 0 0 10px var(--border-color); }
.glow-button { border-color: var(--header-text-color); box-shadow: 0 0 5px var(--header-text-color); transition: box-shadow 0.3s; }
.glow-button:hover { box-shadow: 0 0 15px var(--header-text-color); }

.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes glow { from { text-shadow: 0 0 5px var(--header-text-color); } to { text-shadow: 0 0 20px var(--header-text-color); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* THEME: INQUISITION */
.theme-inquisition { --main-bg-color: #0a0e0a; --main-text-color: #00ff41; --header-text-color: #33ff77; --error-text-color: #ff0000; --border-color: #00ff41; --redacted-bg: #000; --container-bg: rgba(0, 20, 0, 0.1); --container-bg-darker: rgba(0, 10, 0, 0.5); }
.theme-inquisition h1, .theme-inquisition h2 { font-family: 'Orbitron', sans-serif; }
.theme-inquisition .rosette { font-size: 100px; animation: pulse 5s infinite; text-shadow: 0 0 10px var(--header-text-color), 0 0 20px var(--header-text-color); }

/* THEME: MECHANICUS */
.theme-mechanicus { --main-bg-color: #100a00; --main-text-color: #ff9900; --header-text-color: #ffc266; --error-text-color: #ff3300; --border-color: #ff9900; --redacted-bg: #000; --container-bg: rgba(20, 10, 0, 0.1); --container-bg-darker: rgba(30, 15, 0, 0.5); }
.theme-mechanicus .rosette { font-family: monospace; font-size: 100px; filter: drop-shadow(0 0 5px #ff9900); }
.theme-mechanicus .rosette::before { content: '01'; position: absolute; font-size: 20px; top: 50%; left: 50%; transform: translate(-50%, -50%); color: #000; background: #ff9900; border-radius: 50%; padding: 5px; }

/* THEME: ROGUE TRADER */
.theme-roguetrader { --main-bg-color: #1a0505; --main-text-color: #e6c8a3; --header-text-color: #faf0e6; --error-text-color: #d46a6a; --border-color: #b38661; --redacted-bg: #000; background-image: url('https://www.transparenttextures.com/patterns/stardust.png'); --container-bg: rgba(26, 5, 5, 0.5); --container-bg-darker: rgba(40, 10, 10, 0.7); }
.theme-roguetrader .container { border: 4px double var(--border-color); }
.theme-roguetrader h1, .theme-roguetrader h2 { font-family: serif; font-style: italic; }
.theme-roguetrader .rosette { font-size: 80px; text-shadow: 0 0 8px var(--header-text-color); }

/* THEME: ASTRA MILITARUM (GUARD) */
.theme-guard { --main-bg-color: #1a1d1a; --main-text-color: #c8d9c8; --header-text-color: #e6f0e6; --error-text-color: #ff4d4d; --border-color: #7d8a7d; --redacted-bg: #000; --container-bg: rgba(20, 30, 20, 0.1); --container-bg-darker: rgba(20, 40, 20, 0.5); }
.theme-guard h1, .theme-guard h2 { font-family: 'Orbitron', sans-serif; text-transform: uppercase; font-weight: 900; }
.theme-guard .rosette { font-size: 90px; }

/* THEME: ADMINISTRATUM */
.theme-administratum { --main-bg-color: #26221b; --main-text-color: #d1c7b8; --header-text-color: #f5f2ed; --error-text-color: #e68a8a; --border-color: #8c7d66; --redacted-bg: #000; background-image: url('https://www.transparenttextures.com/patterns/pinstripe-light.png'); --container-bg: rgba(40, 30, 20, 0.2); --container-bg-darker: rgba(50, 40, 30, 0.6); }
.theme-administratum h1, .theme-administratum h2 { font-family: serif; }
.theme-administratum .rosette { font-size: 100px; }

/* THEME: ECCLESIARCHY */
.theme-ecclesiarchy {
    --main-bg-color: #2a1a1a;
    --main-text-color: #f6f1d6;
    --header-text-color: #ffd700;
    --error-text-color: #ff4d4d;
    --border-color: #ffd700;
    --redacted-bg: #000;
    --container-bg: rgba(40, 20, 20, 0.2);
    --container-bg-darker: rgba(50, 25, 25, 0.6);
}
.theme-ecclesiarchy h1, .theme-ecclesiarchy h2 { font-family: serif; }
.theme-ecclesiarchy .rosette { font-size: 100px; }

/* THEME: ADEPTA SORORITAS */
.theme-sororitas {
    --main-bg-color: #1a0d1a;
    --main-text-color: #ffe6f7;
    --header-text-color: #ffbee6;
    --error-text-color: #ff4d4d;
    --border-color: #ffbee6;
    --redacted-bg: #000;
    --container-bg: rgba(30, 20, 30, 0.2);
    --container-bg-darker: rgba(40, 20, 40, 0.6);
}
.theme-sororitas h1, .theme-sororitas h2 { font-family: 'Orbitron', sans-serif; }
.theme-sororitas .rosette { font-size: 90px; }

