:root {
    --primary: #00f2ff;
    --secondary: #ff00ea;
    --accent: #ffff00;
    --bg-dark: #050505;
    --card-bg: rgba(10, 10, 15, 0.7);
    --text: #e0e0e0;
    --font-header: 'Orbitron', sans-serif;
    --font-body: 'Rajdhani', sans-serif;
    --glow: 0 0 10px rgba(0, 242, 255, 0.5);
    --glow-strong: 0 0 20px rgba(0, 242, 255, 0.8);
    --border-glass: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    background-image: url('bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text);
    font-family: var(--font-body);
    font-weight: 500;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Background Overlay for depth */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(0,0,0,0) 0%, rgba(0,0,0,0.8) 100%);
    z-index: 1;
    pointer-events: none;
}

/* Scanlines effect */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        transparent 50%,
        rgba(0, 0, 0, 0.1) 50%
    );
    background-size: 100% 4px;
    z-index: 10;
    pointer-events: none;
    opacity: 0.3;
}

.scanlines::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, rgba(18, 16, 16, 0) 0%, rgba(0, 242, 255, 0.05) 50%, rgba(18, 16, 16, 0) 100%);
    animation: scanline 10s linear infinite;
}

@keyframes scanline {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

/* Container */
.container {
    position: relative;
    z-index: 5;
    width: 100%;
    max-width: 500px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Header & Glitch Effect */
header {
    text-align: center;
}

.glitch {
    font-family: var(--font-header);
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: 5px;
    color: var(--primary);
    position: relative;
    text-shadow: var(--glow);
    margin-bottom: 5px;
}

.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--secondary);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--accent);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(31px, 9999px, 94px, 0); }
    4.1% { clip: rect(91px, 9999px, 43px, 0); }
    /* ... shortened for brevity but still effective ... */
    100% { clip: rect(67px, 9999px, 20px, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(65px, 9999px, 100px, 0); }
    100% { clip: rect(10px, 9999px, 40px, 0); }
}

.subtitle {
    font-size: 0.9rem;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
}

/* Login Card */
.login-card {
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border-glass);
    padding: 30px;
    border-radius: 4px;
    position: relative;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.login-card::before {
    content: "";
    position: absolute;
    top: -1px; left: -1px; right: -1px; bottom: -1px;
    border: 1px solid transparent;
    border-top: 1px solid var(--primary);
    border-left: 1px solid var(--primary);
    width: 20px;
    height: 20px;
    z-index: 2;
}

.login-card::after {
    content: "";
    position: absolute;
    bottom: -1px; right: -1px;
    border: 1px solid transparent;
    border-bottom: 1px solid var(--secondary);
    border-right: 1px solid var(--secondary);
    width: 20px;
    height: 20px;
    z-index: 2;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

.status-text {
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: var(--primary);
}

.id-tag {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.3);
}

/* Forms */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 2px;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.5);
}

.input-wrapper {
    position: relative;
}

input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 15px;
    color: white;
    font-family: var(--font-body);
    font-size: 1.1rem;
    letter-spacing: 1px;
    outline: none;
    transition: all 0.3s ease;
}

input:focus {
    border-color: var(--primary);
    background: rgba(0, 242, 255, 0.05);
}

.input-glow {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
    transition: width 0.3s ease;
}

input:focus + .input-glow {
    width: 100%;
}

/* Buttons */
.btn-cyber {
    width: 100%;
    padding: 15px;
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    margin-top: 10px;
}

.btn-content {
    position: relative;
    z-index: 3;
    color: black;
    font-family: var(--font-header);
    font-weight: 700;
    letter-spacing: 2px;
    transition: color 0.3s;
}

.btn-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary);
    z-index: 1;
    clip-path: polygon(0 0, 100% 0, 100% 70%, 90% 100%, 0 100%);
    transition: all 0.3s;
}

.btn-cyber:hover .btn-bg {
    background: var(--secondary);
    filter: brightness(1.2);
}

.btn-cyber:active .btn-bg {
    filter: brightness(0.8);
}

/* Footer info */
.card-footer {
    margin-top: 25px;
    text-align: center;
}

.security-warning {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.2);
    letter-spacing: 1px;
}

/* Bottom Footer */
footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.3);
}

.loading-bar {
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1px;
    overflow: hidden;
}

.loading-fill {
    width: 40%;
    height: 100%;
    background: var(--primary);
    box-shadow: var(--glow);
    animation: loading 3s infinite ease-in-out;
}

@keyframes loading {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(300%); }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 100;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--bg-dark);
    border: 1px solid var(--secondary);
    padding: 40px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 0 50px rgba(255, 0, 234, 0.3);
}

.modal-content h2 {
    font-family: var(--font-header);
    color: var(--secondary);
    margin-bottom: 20px;
    letter-spacing: 3px;
}

.modal-content p {
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.7);
}

.btn-cyber.mini {
    padding: 10px 20px;
    width: auto;
}

.btn-cyber.mini .btn-bg {
    background: var(--secondary);
}
