/* Geist Aesthetic Custom CSS for Caddy-Security Authentication Portal */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;600;800;900&family=Rajdhani:wght@400;600;700&family=Share+Tech+Mono&display=swap');

:root {
    --bg-dark: #06070a;
    --bg-card: rgba(15, 19, 30, 0.85);
    --bg-card-hover: rgba(22, 28, 44, 0.95);
    --border-color: rgba(0, 255, 157, 0.25);
    --border-glow: rgba(0, 255, 157, 0.6);
    
    --ghost-green: #00ff9d;
    --ghost-green-dim: #00b36e;
    --spectral-purple: #a855f7;
    --spectral-cyan: #06b6d4;
    --alert-red: #ff3b5c;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    
    --font-heading: 'Orbitron', sans-serif;
    --font-sub: 'Rajdhani', sans-serif;
    --font-mono: 'Share Tech Mono', monospace;
}

/* Global Reset & Geist Cyberpunk / Paranormal Atmosphere */
html, 
html.bg-blue-100, 
body {
    background-color: var(--bg-dark) !important;
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(168, 85, 247, 0.15), transparent 50%),
        radial-gradient(circle at 10% 80%, rgba(0, 255, 157, 0.1), transparent 40%),
        radial-gradient(circle at 90% 60%, rgba(6, 182, 212, 0.08), transparent 40%) !important;
    color: var(--text-main) !important;
    font-family: var(--font-sub) !important;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
}

/* CRT Scanlines Overlay */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(
        rgba(18, 16, 16, 0) 50%, 
        rgba(0, 0, 0, 0.25) 50%
    );
    background-size: 100% 4px;
    z-index: 999;
    pointer-events: none;
    opacity: 0.6;
}

/* Layout Wrappers */
.app-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
    z-index: 1;
}

.app-content {
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Main Login Container Card */
.app-container {
    width: 100%;
    background: var(--bg-card) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color) !important;
    border-radius: 16px !important;
    padding: 2.25rem 2rem !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(0, 255, 157, 0.05) !important;
    position: relative;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.app-container:hover {
    border-color: rgba(0, 255, 157, 0.4) !important;
    box-shadow: 0 12px 45px rgba(0, 0, 0, 0.7), inset 0 0 25px rgba(0, 255, 157, 0.08) !important;
}

/* Corner Reticle Accents (Oscilloscope UI style) */
.app-container::before, 
.app-container::after {
    content: "";
    position: absolute;
    width: 12px;
    height: 12px;
    border: 2px solid var(--ghost-green-dim);
    pointer-events: none;
}
.app-container::before {
    top: 10px;
    left: 10px;
    border-right: none;
    border-bottom: none;
}
.app-container::after {
    bottom: 10px;
    right: 10px;
    border-left: none;
    border-top: none;
}

/* Header & Branding */
.logo-box {
    text-align: center;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.logo-img {
    height: 60px;
    width: auto;
    filter: drop-shadow(0 0 12px rgba(0, 255, 157, 0.7)) !important;
    animation: ghostPulse 3s infinite ease-in-out;
}

@keyframes ghostPulse {
    0%, 100% { 
        opacity: 0.85; 
        transform: scale(1); 
        filter: drop-shadow(0 0 10px rgba(0, 255, 157, 0.6)); 
    }
    50% { 
        opacity: 1; 
        transform: scale(1.05); 
        filter: drop-shadow(0 0 18px rgba(0, 255, 157, 0.9)); 
    }
}

.logo-txt {
    font-family: var(--font-heading) !important;
    font-size: 1.5rem !important;
    font-weight: 900 !important;
    letter-spacing: 3px !important;
    color: #ffffff !important;
    text-transform: uppercase;
    text-shadow: 0 0 12px rgba(0, 255, 157, 0.6) !important;
    margin: 0;
}

/* Authenticators / Login Buttons */
#authenticators {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.app-login-btn-box {
    display: flex !important;
    align-items: stretch !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    border: 1px solid rgba(0, 255, 157, 0.3) !important;
    background: rgba(10, 14, 23, 0.7) !important;
    transition: all 0.25s ease !important;
    text-decoration: none !important;
}

.app-login-btn-box:hover {
    border-color: var(--ghost-green) !important;
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.4) !important;
    transform: translateY(-2px);
}

/* Icon Container in Login Button */
.app-login-btn-box > div:first-child {
    background: linear-gradient(135deg, rgba(229, 57, 53, 0.9), rgba(183, 28, 28, 0.9)) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.85rem 1.15rem !important;
    color: #ffffff !important;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}

/* Text Container in Login Button */
.app-login-btn-txt {
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(15, 23, 42, 0.6) !important;
    padding: 0.85rem 1rem !important;
    font-family: var(--font-heading) !important;
    font-weight: 700 !important;
    letter-spacing: 2px !important;
    color: var(--text-main) !important;
    transition: color 0.25s ease, background 0.25s ease !important;
}

.app-login-btn-box:hover .app-login-btn-txt {
    color: var(--ghost-green) !important;
    background: rgba(15, 23, 42, 0.85) !important;
}

.app-login-btn-txt span {
    font-size: 0.9rem !important;
    text-transform: uppercase !important;
}

/* Form Controls & Inputs (Standard Credentials Form) */
form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

label {
    font-family: var(--font-mono) !important;
    font-size: 0.75rem !important;
    color: var(--text-muted) !important;
    letter-spacing: 1px !important;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
    display: block;
}

input[type="text"],
input[type="password"],
input[type="email"],
.form-control {
    width: 100% !important;
    background: rgba(4, 5, 8, 0.8) !important;
    border: 1px solid rgba(0, 255, 157, 0.25) !important;
    border-radius: 8px !important;
    padding: 0.75rem 1rem !important;
    color: var(--text-main) !important;
    font-family: var(--font-mono) !important;
    font-size: 0.9rem !important;
    transition: border-color 0.25s ease, box-shadow 0.25s ease !important;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
.form-control:focus {
    outline: none !important;
    border-color: var(--ghost-green) !important;
    box-shadow: 0 0 12px rgba(0, 255, 157, 0.35) !important;
}

/* Submit & Primary Buttons */
button[type="submit"],
input[type="submit"],
.btn-primary {
    width: 100% !important;
    padding: 0.85rem 1.2rem !important;
    border-radius: 8px !important;
    font-family: var(--font-heading) !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    letter-spacing: 2px !important;
    cursor: pointer !important;
    background: linear-gradient(135deg, rgba(0, 255, 157, 0.25), rgba(6, 182, 212, 0.25)) !important;
    border: 1px solid var(--ghost-green) !important;
    color: var(--ghost-green) !important;
    text-transform: uppercase !important;
    transition: all 0.25s ease !important;
    text-shadow: 0 0 8px rgba(0, 255, 157, 0.4) !important;
}

button[type="submit"]:hover,
input[type="submit"]:hover,
.btn-primary:hover {
    background: linear-gradient(135deg, rgba(0, 255, 157, 0.4), rgba(6, 182, 212, 0.4)) !important;
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.5) !important;
    transform: translateY(-2px) !important;
}

/* Links & Helper Text */
a {
    color: var(--ghost-green);
    text-decoration: none;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

a:hover {
    color: #ffffff;
    text-shadow: 0 0 8px rgba(0, 255, 157, 0.6);
}

/* Alerts & Notifications */
.alert, 
.message-box {
    background: rgba(255, 59, 92, 0.15) !important;
    border: 1px solid var(--alert-red) !important;
    color: #fca5a5 !important;
    padding: 0.75rem 1rem !important;
    border-radius: 8px !important;
    font-family: var(--font-mono) !important;
    font-size: 0.8rem !important;
    margin-bottom: 1rem !important;
    box-shadow: 0 0 10px rgba(255, 59, 92, 0.2) !important;
}

/* Bookmarks & QR Code Toggle Panel */
#bookmarks {
    margin-top: 1.25rem;
}

#bookmarks > div {
    background: rgba(15, 19, 30, 0.85) !important;
    border: 1px solid var(--spectral-purple) !important;
    border-top: none !important;
    color: #d8b4fe !important;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.25) !important;
    transition: all 0.25s ease !important;
    cursor: pointer;
}

#bookmarks > div:hover {
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.4) !important;
    background: rgba(168, 85, 247, 0.25) !important;
}

#qr #qrcode {
    background: rgba(10, 13, 22, 0.95) !important;
    border: 1px solid var(--ghost-green) !important;
    box-shadow: 0 0 25px rgba(0, 255, 157, 0.3) !important;
    border-radius: 12px !important;
    padding: 1rem !important;
}
