@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-dark: #0a0e17;
    --bg-glass: rgba(16, 23, 37, 0.6);
    --border-glass: rgba(255, 255, 255, 0.08);
    --neon-cyan: #00f3ff;
    --neon-purple: #bc13fe;
    --neon-pink: #ff007f;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --danger: #ff4757;
    --success: #2ed573;
    --font-main: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-main);
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* Background Effects */
body::before, body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    animation: pulse 8s infinite alternate;
}

body::before {
    top: -10%; left: -10%;
    width: 40vw; height: 40vw;
    background: radial-gradient(circle, rgba(0,243,255,0.15) 0%, rgba(0,0,0,0) 70%);
}

body::after {
    bottom: -10%; right: -10%;
    width: 50vw; height: 50vw;
    background: radial-gradient(circle, rgba(188,19,254,0.1) 0%, rgba(0,0,0,0) 70%);
    animation-delay: -4s;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.2); opacity: 1; }
}

/* Glass & Card Styles */
.glass-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Typography */
h1, h2, h3 {
    background: linear-gradient(to right, var(--neon-cyan), var(--neon-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

/* Form Controls */
.input-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.input-field {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-glass);
    color: #fff;
    padding: 0.875rem 1rem;
    border-radius: 8px;
    outline: none;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.input-field:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 2.2rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.3s ease;
    user-select: none;
}

.password-toggle:hover {
    color: var(--neon-cyan);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(45deg, #0051ff, var(--neon-purple));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(188, 19, 254, 0.4);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
}

.btn-outline:hover {
    background: rgba(0, 243, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
}

.btn-danger {
    background: transparent;
    border: 1px solid var(--danger);
    color: var(--danger);
}

.btn-danger:hover {
    background: rgba(255, 71, 87, 0.1);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    max-width: 400px;
    width: 90%;
    padding: 2rem;
    text-align: center;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.toast {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border-left: 4px solid var(--neon-cyan);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    animation: slideInRight 0.3s forwards, fadeOut 0.3s 2.7s forwards;
    min-width: 250px;
}

.toast.error { border-left-color: var(--danger); }
.toast.success { border-left-color: var(--success); }

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
    to { opacity: 0; visibility: hidden; margin-top: -50px; }
}

/* Specific Layouts */
.login-wrapper { max-width: 400px; margin: auto; width: 100%; }
.header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.user-info { display: flex; align-items: center; gap: 1rem; }
.badge { padding: 0.25rem 0.75rem; border-radius: 50px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; }
.badge.admin { background: rgba(188, 19, 254, 0.2); color: var(--neon-purple); border: 1px solid var(--neon-purple); }
.badge.user { background: rgba(0, 243, 255, 0.2); color: var(--neon-cyan); border: 1px solid var(--neon-cyan); }
.admin-section { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--border-glass); }
.key-display { font-family: monospace; font-size: 1.2rem; color: var(--neon-cyan); letter-spacing: 2px; margin: 1rem 0; padding: 1rem; background: rgba(0,0,0,0.3); border-radius: 8px; text-align: center;}
.hidden { display: none !important; }

/* Responsive */
@media (max-width: 768px) {
    .container { padding: 1rem; }
    #toast-container { bottom: 1rem; right: 1rem; left: 1rem; }
    .toast { width: 100%; min-width: auto; }
}