/* MB VPN Manager - Glassy Futuristic Design */
/* Color Palette based on logo: Purple (#7b2cbf-#9d4edd) to Cyan (#00d4ff-#3a86ff) */

:root {
    /* Primary Colors */
    --primary-purple: #9d4edd;
    --primary-purple-dark: #7b2cbf;
    --primary-cyan: #00d4ff;
    --primary-blue: #3a86ff;

    /* Background Colors */
    --bg-dark: #0d0d1a;
    --bg-darker: #080812;
    --bg-card: rgba(20, 20, 40, 0.6);
    --bg-card-hover: rgba(30, 30, 60, 0.7);

    /* Glass Effect */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.1);

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);

    /* Status Colors */
    --status-success: #00d4a0;
    --status-warning: #fbbf24;
    --status-danger: #ff4d6d;
    --status-info: #00d4ff;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-cyan) 100%);
    --gradient-purple-blue: linear-gradient(135deg, #7b2cbf 0%, #3a86ff 100%);
    --gradient-glow: linear-gradient(135deg, rgba(157, 78, 221, 0.3) 0%, rgba(0, 212, 255, 0.3) 100%);
}

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    background: var(--bg-darker);
    background-image: url('/static/assets/bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
}

/* Ensure background persists with overlay for readability */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(13, 13, 26, 0.85) 0%, rgba(8, 8, 18, 0.95) 100%);
    z-index: -1;
}

/* Glass Card Effect */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 var(--glass-highlight);
}

.glass-card-hover:hover {
    background: var(--bg-card-hover);
    border-color: rgba(157, 78, 221, 0.3);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(157, 78, 221, 0.1),
        inset 0 1px 0 var(--glass-highlight);
    transform: translateY(-2px);
}

/* Navbar */
.navbar-glass {
    background: rgba(13, 13, 26, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

/* Logo styling */
.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-container img {
    height: 40px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(157, 78, 221, 0.5));
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation Links */
.nav-link {
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: var(--text-primary);
    background: var(--gradient-glow);
    border: 1px solid rgba(157, 78, 221, 0.3);
}

.nav-link.active::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 1px;
}

/* Primary Button */
.btn-primary {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(157, 78, 221, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(157, 78, 221, 0.4);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

/* Secondary Button */
.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Danger Button */
.btn-danger {
    background: linear-gradient(135deg, #ff4d6d 0%, #c9184a 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 77, 109, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 77, 109, 0.4);
}

/* Warning Button */
.btn-warning {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1a1a2e;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(251, 191, 36, 0.4);
}

/* Form Inputs */
.input-glass {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 14px 16px;
    color: var(--text-primary);
    width: 100%;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.input-glass:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(157, 78, 221, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.input-glass::placeholder {
    color: var(--text-muted);
}

/* Select Dropdown */
select.input-glass {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='rgba(255,255,255,0.5)'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 44px;
}

/* Stats Cards */
.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(157, 78, 221, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-icon.purple {
    background: linear-gradient(135deg, rgba(157, 78, 221, 0.2) 0%, rgba(123, 44, 191, 0.2) 100%);
    color: var(--primary-purple);
    box-shadow: 0 0 20px rgba(157, 78, 221, 0.2);
}

.stat-icon.cyan {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2) 0%, rgba(58, 134, 255, 0.2) 100%);
    color: var(--primary-cyan);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

.stat-icon.green {
    background: linear-gradient(135deg, rgba(0, 212, 160, 0.2) 0%, rgba(16, 185, 129, 0.2) 100%);
    color: var(--status-success);
    box-shadow: 0 0 20px rgba(0, 212, 160, 0.2);
}

.stat-icon.yellow {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2) 0%, rgba(245, 158, 11, 0.2) 100%);
    color: var(--status-warning);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.2);
}

.stat-icon.red {
    background: linear-gradient(135deg, rgba(255, 77, 109, 0.2) 0%, rgba(201, 24, 74, 0.2) 100%);
    color: var(--status-danger);
    box-shadow: 0 0 20px rgba(255, 77, 109, 0.2);
}

/* Table Styles */
.table-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
}

.table-glass thead {
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--glass-border);
}

.table-glass th {
    padding: 16px 20px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.table-glass td {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.table-glass tbody tr {
    transition: all 0.2s ease;
}

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

.table-glass tbody tr:last-child td {
    border-bottom: none;
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    gap: 6px;
}

.badge-success {
    background: rgba(0, 212, 160, 0.15);
    color: var(--status-success);
    border: 1px solid rgba(0, 212, 160, 0.3);
}

.badge-warning {
    background: rgba(251, 191, 36, 0.15);
    color: var(--status-warning);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.badge-danger {
    background: rgba(255, 77, 109, 0.15);
    color: var(--status-danger);
    border: 1px solid rgba(255, 77, 109, 0.3);
}

.badge-info {
    background: rgba(0, 212, 255, 0.15);
    color: var(--status-info);
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.badge-purple {
    background: rgba(157, 78, 221, 0.15);
    color: var(--primary-purple);
    border: 1px solid rgba(157, 78, 221, 0.3);
}

.badge-gray {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
}

/* Code blocks */
code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.875rem;
    color: var(--primary-cyan);
    border: 1px solid rgba(0, 212, 255, 0.2);
}

/* Alert Messages */
.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    backdrop-filter: blur(10px);
}

.alert-success {
    background: rgba(0, 212, 160, 0.1);
    border: 1px solid rgba(0, 212, 160, 0.3);
    color: var(--status-success);
}

.alert-danger {
    background: rgba(255, 77, 109, 0.1);
    border: 1px solid rgba(255, 77, 109, 0.3);
    color: var(--status-danger);
}

.alert-warning {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: var(--status-warning);
}

.alert-info {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    color: var(--status-info);
}

/* Login Page Specific */
.login-card {
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 48px;
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    max-width: 420px;
    width: 100%;
}

.login-logo {
    width: 100px;
    height: auto;
    margin-bottom: 24px;
    filter: drop-shadow(0 0 30px rgba(157, 78, 221, 0.5));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.login-title {
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

/* Progress Steps */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.step-circle.completed {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 0 20px rgba(157, 78, 221, 0.4);
}

.step-circle.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 0 20px rgba(157, 78, 221, 0.4);
}

.step-circle.pending {
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    color: var(--text-muted);
}

.step-line {
    width: 60px;
    height: 2px;
    background: var(--glass-border);
    transition: all 0.3s ease;
}

.step-line.completed {
    background: var(--gradient-primary);
}

/* QR Code Container */
.qr-container {
    background: white;
    padding: 20px;
    border-radius: 16px;
    display: inline-block;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Footer */
.footer-glass {
    background: rgba(13, 13, 26, 0.6);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--glass-border);
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

::-webkit-scrollbar-thumb {
    background: rgba(157, 78, 221, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(157, 78, 221, 0.5);
}

/* Glow Effects */
.glow-purple {
    box-shadow: 0 0 30px rgba(157, 78, 221, 0.3);
}

.glow-cyan {
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
}

.glow-text {
    text-shadow: 0 0 20px rgba(157, 78, 221, 0.5);
}

/* Animations */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(157, 78, 221, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(157, 78, 221, 0.5);
    }
}

.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Transition utilities */
.transition-all {
    transition: all 0.3s ease;
}

/* Status indicators */
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.online {
    background: var(--status-success);
    box-shadow: 0 0 10px var(--status-success);
}

.status-dot.offline {
    background: var(--text-muted);
}

.status-dot.warning {
    background: var(--status-warning);
    box-shadow: 0 0 10px var(--status-warning);
}

.status-dot.error {
    background: var(--status-danger);
    box-shadow: 0 0 10px var(--status-danger);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .login-card {
        padding: 32px 24px;
        margin: 16px;
    }

    .stat-card {
        padding: 16px;
    }

    .table-glass th,
    .table-glass td {
        padding: 12px 16px;
    }
}

/* Download cards */
.download-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    cursor: pointer;
}

.download-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary-purple);
    transform: translateX(4px);
}

.download-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

/* Verification code input */
.code-input {
    letter-spacing: 1em;
    text-align: center;
    font-size: 2rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pagination-btn {
    padding: 8px 14px;
    border-radius: 8px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.pagination-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.pagination-btn.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
}

/* Mobile nav menu */
.mobile-menu {
    background: rgba(13, 13, 26, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
}

/* Icon button */
.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.icon-btn.danger:hover {
    background: rgba(255, 77, 109, 0.1);
    color: var(--status-danger);
}

.icon-btn.warning:hover {
    background: rgba(251, 191, 36, 0.1);
    color: var(--status-warning);
}
