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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1a1a2e;
    color: #e0e0e0;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: linear-gradient(180deg, #16213e 0%, #1a1a2e 100%);
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(233, 69, 96, 0.2);
}

.sidebar-header {
    padding: 25px 20px;
    background: linear-gradient(90deg, #e94560 0%, #ff6b6b 100%);
}

.sidebar-header h2 {
    color: white;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 5px;
}

.sidebar-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #a0a0a0;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(233, 69, 96, 0.1);
    color: white;
}

.nav-item.active {
    background: rgba(233, 69, 96, 0.15);
    color: #e94560;
    border-left-color: #e94560;
}

.nav-icon {
    font-size: 20px;
    margin-right: 12px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-item.logout {
    color: #ff6b6b;
}

.nav-item.logout:hover {
    background: rgba(255, 107, 107, 0.1);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.top-bar {
    padding: 20px 30px;
    background: rgba(22, 33, 62, 0.5);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-bar h1 {
    color: white;
    font-size: 24px;
    font-weight: 600;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.role-badge {
    background: #e94560;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.count-badge {
    background: rgba(233, 69, 96, 0.2);
    color: #e94560;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.content-section {
    padding: 30px;
    flex: 1;
    overflow-y: auto;
}

.content-section h2 {
    color: white;
    font-size: 20px;
    margin-bottom: 20px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 30px;
}

.stat-card {
    background: linear-gradient(135deg, rgba(22, 33, 62, 0.8) 0%, rgba(26, 26, 46, 0.8) 100%);
    border-radius: 15px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 40px;
}

.stat-info h3 {
    color: white;
    font-size: 32px;
    font-weight: 700;
}

.stat-info p {
    color: #a0a0a0;
    font-size: 14px;
}

/* Tables */
.table-container {
    background: rgba(22, 33, 62, 0.5);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: rgba(233, 69, 96, 0.1);
}

.data-table th {
    padding: 15px 20px;
    text-align: left;
    color: white;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
}

.data-table td {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #e0e0e0;
    font-size: 14px;
}

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

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #e94560;
    color: white;
}

.btn-primary:hover {
    background: #ff6b6b;
    transform: scale(1.05);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-success {
    background: #4ecdc4;
    color: white;
}

.btn-success:hover {
    background: #45b7aa;
}

.btn-danger {
    background: #ff6b6b;
    color: white;
}

.btn-danger:hover {
    background: #e94560;
}

.btn-warning {
    background: #f39c12;
    color: white;
}

.btn-warning:hover {
    background: #e67e22;
}

.btn-info {
    background: #3498db;
    color: white;
}

.btn-info:hover {
    background: #2980b9;
}

.btn-sm {
    padding: 5px 12px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: white;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #e94560;
    background: rgba(255, 255, 255, 0.15);
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 14px;
}

/* Badges */
.badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: #4ecdc4;
    color: white;
}

.badge-danger {
    background: #e94560;
    color: white;
}

.badge-warning {
    background: #f39c12;
    color: white;
}

/* Health Bar */
.health-bar {
    width: 100px;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
}

.health-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ecdc4 0%, #44a08d 100%);
    transition: width 0.3s ease;
}

/* Screens Grid */
.screens-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.screenshot-card {
    background: rgba(22, 33, 62, 0.5);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.screenshot-image {
    width: 100%;
    height: 200px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.screenshot-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.screenshot-info {
    padding: 15px;
}

.screenshot-info h4 {
    color: white;
    font-size: 16px;
    margin-bottom: 5px;
}

.screenshot-info p {
    color: #a0a0a0;
    font-size: 13px;
    margin-bottom: 3px;
}

.screenshot-info .timestamp {
    color: #e94560;
    font-size: 12px;
}

/* Map */
.map-container {
    width: 100%;
    height: 500px;
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.players-list {
    margin-top: 20px;
    background: rgba(22, 33, 62, 0.5);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.players-list h3 {
    color: white;
    margin-bottom: 15px;
}

.players-list ul {
    list-style: none;
}

.players-list li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
}

.players-list li:last-child {
    border-bottom: none;
}

.coords {
    color: #a0a0a0;
    font-size: 13px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #1a1a2e;
    border-radius: 15px;
    width: 500px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header {
    padding: 20px 25px;
    background: linear-gradient(90deg, #e94560 0%, #ff6b6b 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: white;
    font-size: 18px;
}

.close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 20px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

.modal-content form {
    padding: 25px;
}

/* Checkbox Group */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e0e0e0;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
}

/* Login Page */
.login-page {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: rgba(22, 33, 62, 0.8);
    border-radius: 20px;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: white;
    font-size: 24px;
    margin-bottom: 10px;
}

.login-header p {
    color: #a0a0a0;
    font-size: 14px;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
}

.login-footer p {
    color: #a0a0a0;
    font-size: 12px;
}

/* Alert */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background: rgba(233, 69, 96, 0.2);
    color: #ff6b6b;
    border: 1px solid rgba(233, 69, 96, 0.3);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #a0a0a0;
}

/* Text Utilities */
.text-muted {
    color: #a0a0a0;
}

/* Server Option */
.server-option {
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.server-option:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #e94560;
}

.server-option label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
    color: #e0e0e0;
}

.server-option input[type="radio"] {
    margin-right: 15px;
}

/* API Key Display */
.api-key-display {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(233, 69, 96, 0.3);
    margin-bottom: 10px;
}

.api-key-display code {
    color: #4ecdc4;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    word-break: break-all;
    display: block;
}

.success-message {
    text-align: center;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: rgba(78, 205, 196, 0.2);
    color: #4ecdc4;
    border: 1px solid #4ecdc4;
}

.badge-warning {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid #ffc107;
}

.badge-danger {
    background: rgba(233, 69, 96, 0.2);
    color: #e94560;
    border: 1px solid #e94560;
}

/* Filter Section */
.filter-section {
    display: flex;
    gap: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }
    
    .sidebar-header h2,
    .sidebar-header p,
    .nav-item span:not(.nav-icon) {
        display: none;
    }
    
    .nav-item {
        justify-content: center;
        padding: 15px;
    }
    
    .nav-icon {
        margin-right: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .screens-grid {
        grid-template-columns: 1fr;
    }
}
