:root {
    /* High Contrast Midnight Theme */
    --bg-dark: #000000;
    --bg-card: rgba(20, 20, 25, 0.98); /* Almost solid for max contrast */
    --bg-input: rgba(255, 255, 255, 0.1);
    
    /* Neon Accents */
    --primary: #00e1ff; /* Bright Neon Cyan */
    --primary-gradient: linear-gradient(135deg, #00e1ff 0%, #8b5cf6 100%);
    --primary-glow: rgba(0, 225, 255, 0.5);
    --button-gradient: linear-gradient(90deg, #00e1ff, #8b5cf6, #00e1ff); /* Animated gradient source */
    
    --success: #00ff9d;
    
    /* Text */
    --text-main: #ffffff;
    --text-muted: #e2e8f0; /* Much brighter grey (Slate 200) for visibility */
    --text-subtle: #94a3b8;
    
    /* Borders & UI */
    --border: rgba(255, 255, 255, 0.2); 
    --radius: 20px;
    
    --font-heading: "Outfit", sans-serif;
    --font-body: "Plus Jakarta Sans", sans-serif;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    background-color: var(--bg-dark);
    /* Vivid background spots */
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(0, 225, 255, 0.15), transparent 40%), 
        radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.15), transparent 40%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
}

/* --- Glassmorphism Cards --- */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.05), 0 20px 40px -10px rgba(0,0,0,0.6);
    z-index: 10;
    position: relative;
}

/* --- High Contrast Inputs --- */
.form-control {
    background: var(--bg-input) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important; /* Subtle base border */
    color: #ffffff !important; /* Force White Text */
    padding: 1rem 1.1rem;
    border-radius: 14px;
    font-size: 1rem;
    transition: var(--transition);
    z-index: 20; /* Ensure clickable */
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.7) !important; /* High contrast placeholder */
    opacity: 1;
}

/* UPDATED: Ensure transparent border on direct hover */
.form-control:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: transparent !important;
}

/* Unified Hover Effect: Remove borders for the whole group on hover */
.input-group:hover .form-control,
.input-group:hover .input-group-text,
.input-group:hover .btn-toggle-password {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: transparent !important;
}

/* UPDATED: Focus state (Click) - No Border, No Glow */
.form-control:focus {
    background: #000 !important;
    border-color: transparent !important;
    box-shadow: none !important; /* Removed Glow */
    color: #ffffff !important;
    outline: none;
}

/* Fix AutoFill Background color in Chrome/Edge */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active{
    -webkit-box-shadow: 0 0 0 30px #1a1a20 inset !important;
    -webkit-text-fill-color: white !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Input Group Icons */
.input-group-text {
    background: var(--bg-input);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-muted);
    border-radius: 14px 0 0 14px;
}

/* Middle segments for password toggle */
.input-group .form-control:not(:last-child) {
    border-right: none !important;
}

/* Password Toggle Button */
.btn-toggle-password {
    background: var(--bg-input);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-left: none;
    color: var(--text-muted);
    border-top-right-radius: 14px !important;
    border-bottom-right-radius: 14px !important;
    cursor: pointer;
    transition: var(--transition);
    z-index: 20;
}
.btn-toggle-password:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.15);
}

/* UPDATED: Remove borders on the icon and eye button when input is clicked */
.input-group:focus-within .input-group-text,
.input-group:focus-within .btn-toggle-password {
    border-color: transparent;
    color: var(--primary);
    background: #000; /* Match the input focus background */
}

/* --- Tool Cards --- */
.tool-card {
    background: rgba(20, 20, 25, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.tool-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px -10px var(--primary-glow);
    background: rgba(25, 25, 30, 0.95);
}

.card-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    color: var(--text-main);
    transition: var(--transition);
}

.tool-card:hover .card-icon-wrapper {
    background: var(--primary-gradient);
    border-color: transparent;
    transform: scale(1.05);
    box-shadow: 0 10px 20px -5px var(--primary-glow);
}

/* --- "Superb" Buttons --- */
.btn-custom {
    background: var(--button-gradient);
    background-size: 200% auto;
    border: none;
    color: white; /* Force white text */
    padding: 0.9rem 1.5rem;
    border-radius: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px -3px rgba(0, 225, 255, 0.3);
    animation: shine 3s infinite linear;
    width: 100%;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.btn-custom:hover {
    background-position: right center;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px var(--primary-glow);
    color: white;
}

/* New "Superb" Launch Buttons */
.btn-launch {
    background: var(--button-gradient);
    background-size: 200% auto;
    border: none;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px -3px rgba(0, 225, 255, 0.3);
    animation: shine 3s infinite linear;
}

.btn-launch:hover {
    background-position: right center;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px -5px var(--primary-glow);
    color: white;
}

@keyframes shine {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --- Navbar --- */
.navbar {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border);
    padding: 0.8rem 0;
}

/* Modern Mobile User Badge */
.user-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* UPDATED: Balanced padding for when text is hidden */
    padding: 0.35rem 0.4rem; 
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    max-width: 100%;
    transition: var(--transition);
    cursor: pointer; /* Added cursor pointer */
}

.user-badge:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.user-avatar {
    width: 28px;
    height: 28px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 2px 10px rgba(0, 225, 255, 0.3);
}

/* --- Centering Logic --- */
#login-view {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    position: relative;
    z-index: 5;
}

.login-card-container {
    width: 100%;
    max-width: 420px;
    animation: floatIn 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* --- Modal --- */
.modal-content {
    background-color: #0f1014;
    border: 1px solid var(--border);
    color: var(--text-main);
    border-radius: var(--radius);
}
.modal-header, .modal-footer { border-color: var(--primary); }
.btn-close { filter: invert(1); opacity: 0.8; }
.btn-close:hover { opacity: 1; }

.template-option {
    cursor: pointer;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.03);
    border-radius: 16px;
    padding: 1.2rem;
    transition: var(--transition);
}
.template-option:hover {
    border-color: var(--primary);
    background: rgba(0, 225, 255, 0.08);
    transform: translateX(5px);
}

@keyframes floatIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: floatIn 0.5s ease-out; }

/* Utility for text readability */
.text-bright { color: var(--text-muted) !important; }