/* High-Tech Game Server Panel Theme */
:root {
    --primary-cyan: #00d9ff;
    --primary-blue: #0066ff;
    --primary-purple: #7b2cbf;
    --accent-green: #00ff88;
    --accent-orange: #ff6b35;
    --accent-red: #ff3366;
    --accent-yellow: #ffd700;
    --bg-primary: #0a0e27;
    --bg-secondary: #0f1629;
    --bg-tertiary: #151b2e;
    --bg-card: rgba(15, 22, 41, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.05);
    --bg-glass-hover: rgba(255, 255, 255, 0.1);
    --text-primary: #e0e6ed;
    --text-secondary: #a0a8b8;
    --text-muted: #6b7280;
    --border-color: rgba(0, 217, 255, 0.2);
    --border-glow: rgba(0, 217, 255, 0.4);
    --shadow-glow: 0 0 20px rgba(0, 217, 255, 0.3);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
    --gradient-primary: linear-gradient(135deg, #0066ff 0%, #7b2cbf 100%);
    --gradient-cyan: linear-gradient(135deg, #00d9ff 0%, #0066ff 100%);
    --gradient-card: linear-gradient(135deg, rgba(0, 217, 255, 0.1) 0%, rgba(123, 44, 191, 0.1) 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(0, 217, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(123, 44, 191, 0.1) 0%, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

/* Navbar Styling */
.navbar {
    background: rgba(10, 14, 39, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-cyan);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
}

.nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    margin: 0 0.25rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-cyan) !important;
    background: var(--bg-glass);
}

/* Sub-Navbar */
.subnavbar {
    background: rgba(10, 14, 39, 0.8);
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 0;
    backdrop-filter: blur(10px);
    margin-bottom: 2rem;
}

.subnav-link {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.4rem 1rem;
    margin-right: 0.5rem;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
}

.subnav-link i {
    margin-right: 0.5rem;
    font-size: 1rem;
}

.subnav-link:hover {
    color: var(--primary-cyan);
    background: var(--bg-glass-hover);
}

.subnav-link.active {
    color: var(--primary-cyan);
    background: rgba(0, 217, 255, 0.1);
    border: 1px solid rgba(0, 217, 255, 0.2);
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 0.625rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.6);
}

.btn-outline-light {
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    background: transparent;
}

.btn-outline-light:hover {
    background: var(--bg-glass-hover);
    border-color: var(--primary-cyan);
}

.btn-outline-danger {
    border: 1px solid var(--accent-red);
    color: var(--accent-red);
    background: transparent;
}

.btn-outline-danger:hover {
    background: var(--accent-red);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--accent-red) 0%, #cc0033 100%);
    color: white;
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.875rem;
}

/* Cards */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.card:hover {
    border-color: var(--border-glow);
    box-shadow: var(--shadow-card), var(--shadow-glow);
    transform: translateY(-2px);
}

.card-header {
    background: var(--gradient-card);
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.card-body {
    padding: 1.5rem;
    color: var(--text-primary);
}

/* Widget Cards */
.widget-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.widget-card:hover {
    border-color: var(--border-glow);
    box-shadow: var(--shadow-card), var(--shadow-glow);
    transform: translateY(-5px);
}

.widget-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-cyan);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.widget-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.widget-icon {
    font-size: 3.5rem;
    opacity: 0.3;
    color: var(--primary-cyan);
}

.widget-card.bg-blue .widget-icon { color: var(--primary-blue); }
.widget-card.bg-teal .widget-icon { color: var(--primary-cyan); }
.widget-card.bg-orange .widget-icon { color: var(--accent-orange); }
.widget-card.bg-green .widget-icon { color: var(--accent-green); }

/* Tables - Forced Colors for Bootstrap Override */
.table {
    --bs-table-bg: transparent !important;
    --bs-table-accent-bg: transparent !important;
    --bs-table-striped-color: var(--text-primary) !important;
    --bs-table-striped-bg: rgba(0, 217, 255, 0.05) !important;
    --bs-table-active-color: var(--text-primary) !important;
    --bs-table-active-bg: rgba(255, 255, 255, 0.1) !important;
    --bs-table-hover-color: var(--text-primary) !important;
    --bs-table-hover-bg: rgba(255, 255, 255, 0.05) !important;
    
    width: 100%;
    color: var(--text-primary) !important;
    background-color: transparent !important;
}

.table > :not(caption) > * > * {
    background-color: transparent !important; /* Force transparent cells */
    color: var(--text-primary) !important; /* Force text color */
    box-shadow: none !important;
}

.table thead th {
    border-bottom: 2px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2) !important; /* Slightly darker header */
}

.table tbody tr {
    border-bottom: 1px solid rgba(0, 217, 255, 0.1);
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background: var(--bg-glass) !important;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    color: var(--text-primary) !important;
}

/* Badges */
.badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bg-success {
    background: linear-gradient(135deg, var(--accent-green) 0%, #00cc6a 100%) !important;
    color: white !important;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.4);
}

.bg-danger {
    background: linear-gradient(135deg, var(--accent-red) 0%, #cc0033 100%) !important;
    color: white !important;
    box-shadow: 0 0 10px rgba(255, 51, 102, 0.4);
}

.bg-warning {
    background: linear-gradient(135deg, var(--accent-yellow) 0%, #ffcc00 100%) !important;
    color: var(--bg-primary) !important;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

.bg-secondary {
    background: var(--bg-tertiary) !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border-color);
}

/* Typography */
h1, h2, h3, h4, h5 {
    color: var(--text-primary);
    font-weight: 700;
}

h1 {
    background: var(--gradient-cyan);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-muted { color: var(--text-muted) !important; }
.text-light { color: var(--text-primary) !important; }

/* Forms */
label {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
}

.form-control, .form-select {
    background: var(--bg-tertiary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px;
    color: var(--text-primary) !important;
    padding: 0.75rem 1rem;
    width: 100%;
}

.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary-cyan) !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 217, 255, 0.25) !important;
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
}

/* Utilities */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

footer {
    background: var(--bg-secondary) !important;
    border-top: 1px solid var(--border-color) !important;
    color: var(--text-secondary) !important;
    padding: 2rem 0 !important;
    margin-top: auto;
    text-align: center;
}

main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.border-bottom {
    border-bottom: 1px solid var(--border-color) !important;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

/* Login Page Styles */
.login-page-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    padding: 2rem;
}

.login-box {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    box-shadow: var(--shadow-card), var(--shadow-glow);
}

.login-brand {
    background: var(--gradient-cyan);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
}

.input-group-text {
    background: var(--bg-tertiary) !important;
    border: 1px solid var(--border-color) !important;
    border-right: none !important;
    color: var(--primary-cyan) !important;
    border-radius: 8px 0 0 8px !important;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
}

.login-input {
    background: var(--bg-tertiary) !important;
    border: 1px solid var(--border-color) !important;
    border-left: none !important;
    color: var(--text-primary) !important;
    border-radius: 0 8px 8px 0 !important;
    padding: 0.75rem 1rem;
    width: 100%;
    font-size: 1rem;
}

.login-input:focus {
    outline: none;
    border-color: var(--primary-cyan) !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 217, 255, 0.25) !important;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-cyan);
}

/* Reconnect Modal */
#components-reconnect-modal {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 9999;
    background-color: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(5px);
    color: var(--text-primary);
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

#components-reconnect-modal.components-reconnect-show {
    display: flex;
}

#components-reconnect-modal.components-reconnect-hide {
    display: none;
}

#components-reconnect-modal .show,
#components-reconnect-modal .failed,
#components-reconnect-modal .rejected {
    display: none;
    padding: 2rem;
    border-radius: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card), var(--shadow-glow);
    text-align: center;
}

#components-reconnect-modal.components-reconnect-show .show {
    display: block;
}
