/* 
   Premium Dark Mode Design System 
   Theme: Cyber/Security/Glassmorphism 2.0
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-dark: #0a0e17;
    --bg-card: rgba(16, 22, 34, 0.6);
    --primary: #00f2ff;
    --primary-hover: #00d4ff;
    --primary-dim: rgba(0, 242, 255, 0.15);
    --secondary: #7000ff;
    --secondary-hover: #8e2eff;
    --text-main: #e6edf3;
    --text-muted: #8b949e;
    --border-color: rgba(255, 255, 255, 0.08);
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --success: #2ea043;
    --danger: #da3633;
    --danger-dim: rgba(218, 54, 51, 0.15);
    --font-main: 'Outfit', sans-serif;
    --radius-lg: 20px;
    --radius-md: 12px;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    min-height: 100vh;
    background-image:
        radial-gradient(circle at 15% 50%, rgba(112, 0, 255, 0.1), transparent 30%),
        radial-gradient(circle at 85% 30%, rgba(0, 242, 255, 0.1), transparent 30%);
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #ffffff;
}

/* Glassmorphism Card */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    padding: 2rem;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transition: opacity 0.5s;
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 50px rgba(0, 242, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.glass-card:hover::before {
    opacity: 1;
}

/* Form Elements */
.form-control {
    background-color: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid var(--border-color);
    color: var(--text-main) !important;
    border-radius: var(--radius-md);
    padding: 14px 18px;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.form-control:focus {
    background-color: rgba(0, 0, 0, 0.6) !important;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-dim) !important;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.2) !important;
}

.input-group-text {
    background-color: rgba(0, 0, 0, 0.2);
    border-color: var(--border-color);
    color: var(--text-muted);
}

.form-label {
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: #fff;
    box-shadow: 0 6px 20px rgba(0, 242, 255, 0.2);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    z-index: -1;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.btn-primary:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 242, 255, 0.4);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-outline-secondary {
    border: 1px solid var(--border-color);
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.02);
}

.btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--danger-dim);
    color: #ff6b6b;
    border: 1px solid rgba(218, 54, 51, 0.4);
}

.btn-danger:hover {
    background: var(--danger);
    color: #fff;
    box-shadow: 0 6px 20px rgba(218, 54, 51, 0.3);
    transform: translateY(-1px);
}

/* Tables */
.table {
    color: var(--text-main);
    --bs-table-bg: transparent;
    --bs-table-color: var(--text-main);
    margin-bottom: 0;
}

.table thead th {
    background-color: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 16px;
    border-top: none;
}

.table tbody td {
    padding: 18px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

.table-hover tbody tr {
    transition: background-color 0.2s ease;
}

.table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.04);
}

/* Alerts */
.alert-danger {
    background: rgba(218, 54, 51, 0.15);
    border: 1px solid rgba(218, 54, 51, 0.3);
    color: #ff8e8e;
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
}

/* Utilities */
.text-gradient {
    background: linear-gradient(135deg, #ffffff 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cyber-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: -1;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .glass-card {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }

    h1.display-3 {
        font-size: 2.5rem;
    }

    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .table-responsive {
        border-radius: var(--radius-md);
        border: 1px solid rgba(255, 255, 255, 0.05);
    }

    .stats-card {
        margin-bottom: 1rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}