/*
=================================================================
USERBOT CONTROL PANEL - CYBERPUNK NEON THEME
=================================================================
1. :root Variables      - Color Palette, Gradients, Shadows
2. Global Styles        - Body, Typography, Scrollbar
3. Layout & Containers  - Containers, General Layout
4. Core Components      - Cards, Buttons, Forms, Alerts, Modals
5. Page-Specific Styles - Dashboard, Login, Statistics, etc.
6. Animations & FX      - Transitions, Keyframes, Special Effects
=================================================================
*/


/* 1. :root Variables */

:root {
    --bg-color-dark: #0A0C10;
    /* Deep space blue/black */
    --bg-color-medium: #151922;
    /* Slightly lighter for surfaces */
    --bg-color-light: #1F2430;
    /* For hovered elements */
    --primary-neon: #00BFFF;
    /* DeepSkyBlue */
    --secondary-neon: #9400D3;
    /* DarkViolet */
    --accent-neon: #32CD32;
    /* LimeGreen */
    --danger-neon: #FF4500;
    /* OrangeRed */
    --text-color-primary: #E6F1FF;
    /* Light, almost white blue */
    --text-color-secondary: #A8B2C1;
    /* Muted gray for hints */
    --text-color-disabled: #6A7382;
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', 'Menlo', monospace;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --border-color: rgba(0, 191, 255, 0.2);
    /* Neon blue border */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-neon-primary: 0 0 12px rgba(0, 191, 255, 0.5), 0 0 24px rgba(0, 191, 255, 0.3);
    --shadow-neon-accent: 0 0 10px rgba(50, 205, 50, 0.6);
    --transition-fast: 0.2s ease-in-out;
    --transition-medium: 0.4s ease-in-out;
}


/* 2. Global Styles */

body {
    background-color: var(--bg-color-dark);
    background-image: /* Grid pattern */
    linear-gradient(rgba(0, 191, 255, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 191, 255, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
    color: var(--text-color-primary);
    font-family: var(--font-primary);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


/* Custom Scrollbar */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color-dark);
}

::-webkit-scrollbar-thumb {
    background-color: var(--primary-neon);
    border-radius: 10px;
    border: 2px solid var(--bg-color-dark);
}

h1,
.h1,
h2,
.h2,
h3,
.h3,
h4,
.h4 {
    font-weight: 700;
    color: var(--text-color-primary);
    text-shadow: 0 0 5px rgba(230, 241, 255, 0.2);
    letter-spacing: -0.5px;
}

a {
    color: var(--primary-neon) !important;
    text-decoration: none;
    transition: all var(--transition-fast);
}

a:hover {
    filter: brightness(1.2);
    text-shadow: 0 0 8px var(--primary-neon);
}


/* 3. Layout & Containers */

.container,
.container-fluid {
    max-width: 1200px;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
}


/* 4. Core Components */


/* --- Cards (Glassmorphism) --- */

.card {
    background: rgba(21, 25, 34, 0.6);
    /* Semi-transparent dark bg */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-medium);
    overflow: hidden;
    position: relative;
}

.card:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 191, 255, 0.5);
    box-shadow: 0 0 20px rgba(0, 191, 255, 0.2), var(--shadow-lg);
}

.card-header {
    background: rgba(0, 191, 255, 0.05);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    font-weight: 600;
}

.card-title {
    color: var(--text-color-primary) !important;
}

.card-body {
    padding: 1.5rem;
}


/* --- Buttons --- */

.btn {
    border: 1px solid transparent;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    padding: 10px 24px;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--primary-neon);
    color: var(--bg-color-dark) !important;
    border-color: var(--primary-neon);
    box-shadow: var(--shadow-neon-primary);
}

.btn-primary:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-neon) !important;
    border-color: var(--primary-neon);
}

.btn-secondary:hover {
    background-color: rgba(0, 191, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 191, 255, 0.3);
}

.btn-danger {
    background-color: transparent;
    color: var(--danger-neon) !important;
    border-color: var(--danger-neon);
}

.btn-danger:hover {
    background-color: rgba(255, 69, 0, 0.1);
    box-shadow: 0 0 15px rgba(255, 69, 0, 0.4);
}


/* --- Forms --- */

.form-control,
.form-select {
    background-color: var(--bg-color-medium);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    color: var(--text-color-primary) !important;
    padding: 12px;
}

.form-control:focus,
.form-select:focus {
    background-color: var(--bg-color-medium);
    border-color: var(--primary-neon);
    box-shadow: 0 0 0 3px rgba(0, 191, 255, 0.25);
    outline: none;
}

.form-control::placeholder {
    color: var(--text-color-disabled) !important;
}

.form-label {
    font-weight: 500;
    color: var(--text-color-secondary) !important;
}


/* --- Alerts --- */

.alert {
    border-radius: var(--border-radius-md);
    border-width: 1px;
    border-style: solid;
    padding: 1rem;
    font-weight: 500;
}

.alert-success {
    background-color: rgba(50, 205, 50, 0.1);
    border-color: var(--accent-neon);
    color: var(--accent-neon) !important;
    text-shadow: 0 0 5px var(--accent-neon);
}

.alert-danger {
    background-color: rgba(255, 69, 0, 0.1);
    border-color: var(--danger-neon);
    color: var(--danger-neon) !important;
    text-shadow: 0 0 5px var(--danger-neon);
}

.alert-info {
    background-color: rgba(0, 191, 255, 0.1);
    border-color: var(--primary-neon);
    color: var(--primary-neon) !important;
    text-shadow: 0 0 5px var(--primary-neon);
}


/* --- Modals --- */

.modal-content {
    background: var(--bg-color-medium);
    border: 1px solid var(--primary-neon);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-neon-primary);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
}

.modal-footer {
    border-top: 1px solid var(--border-color);
}

.btn-close {
    filter: invert(1) grayscale(1) brightness(2);
    transition: transform var(--transition-fast);
}

.btn-close:hover {
    transform: rotate(90deg);
}


/* --- Tables --- */

.table {
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--border-color);
    color: var(--text-color-secondary);
}

.table th {
    color: var(--text-color-primary);
    font-weight: 600;
}

.table-hover>tbody>tr:hover>* {
    --bs-table-hover-bg: rgba(0, 191, 255, 0.08);
    color: var(--text-color-primary);
}


/* 5. Page-Specific Styles */


/* --- Login / Index Page --- */

.hero-section {
    position: relative;
    padding: 4rem 0;
}

.hero-logo .logo-icon {
    font-size: 4rem;
    color: var(--primary-neon);
    text-shadow: 0 0 20px var(--primary-neon);
}

.text-gradient {
    background: linear-gradient(90deg, var(--text-color-primary), var(--primary-neon));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}


/* --- Dashboard --- */

.dashboard-page .card-link {
    display: block;
    height: 100%;
}

.dashboard-page .card-link .card {
    height: 100%;
}

.dashboard-page .card-link .card i {
    font-size: 2.5rem;
    color: var(--primary-neon) !important;
    transition: all var(--transition-medium);
}

.dashboard-page .card-link:hover .card i {
    transform: scale(1.2);
    filter: brightness(1.3);
    text-shadow: 0 0 15px var(--primary-neon);
}

.dashboard-page .welcome-card .avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--bg-color-dark) !important;
}


/* 6. Animations & FX */


/* --- General Transition for all elements --- */

* {
    transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}


/* --- Keyframe Animations --- */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 191, 255, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 191, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 191, 255, 0);
    }
}

.pulse-fx {
    animation: pulse 2s infinite;
}


/* --- Utility Classes --- */

.text-primary-neon {
    color: var(--primary-neon) !important;
}

.text-accent-neon {
    color: var(--accent-neon) !important;
}

.text-danger-neon {
    color: var(--danger-neon) !important;
}


/* Force important colors, overriding bootstrap defaults */

.text-dark,
.text-black,
.text-muted,
p,
label {
    color: var(--text-color-secondary) !important;
}

.bg-dark *,
.bg-black *,
.bg-primary *,
.bg-success *,
.bg-danger *,
.bg-warning *,
.bg-info * {
    color: var(--text-color-primary) !important;
}

.badge {
    color: var(--text-color-primary) !important;
}

.badge.bg-light {
    color: var(--bg-color-dark) !important;
}


/* Final overrides to ensure text is visible */

body,
div,
span,
h1,
h2,
h3,
h4,
h5,
h6,
.form-label,
.form-text,
.card-text,
th,
td {
    color: var(--text-color-primary) !important;
}

.text-muted {
    color: var(--text-color-secondary) !important;
}

.bi {
    color: inherit !important;
}

.form-control::placeholder {
    color: var(--text-color-disabled) !important;
}