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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    overflow-x: hidden;
}

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    margin: 10px;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Header */
.app-header {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 15px 15px 0 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    font-size: 2em;
    color: #3498db;
}

.header-left h1 {
    font-size: 1.5em;
    font-weight: 300;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
}

.status-on { color: #2ecc71; }
.status-off { color: #e74c3c; }
.status-partial { color: #f39c12; }

.ip-address {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    border-radius: 20px;
    font-family: 'Courier New', monospace;
}

/* Navigation */
.tabs-nav {
    display: flex;
    background: #f8f9fa;
    padding: 0 30px;
    border-bottom: 1px solid #e9ecef;
}

.tab-btn {
    background: none;
    border: none;
    padding: 15px 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    color: #495057;
    background: rgba(0, 0, 0, 0.05);
}

.tab-btn.active {
    color: #3498db;
    border-bottom-color: #3498db;
    background: white;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 30px;
    background: white;
    border-radius: 0 0 15px 15px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Servers Grid */
.servers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.server-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.server-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.server-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.server-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2c3e50;
}

.server-status {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: 600;
}

.server-status.running {
    background: #d4edda;
    color: #155724;
}

.server-status.stopped {
    background: #f8d7da;
    color: #721c24;
}

.server-info {
    margin: 12px 0;
    color: #6c757d;
}

.server-info p {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
}

.server-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

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

.btn-primary:hover:not(:disabled) {
    background: #2980b9;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #545b62;
}

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

.btn-danger:hover:not(:disabled) {
    background: #c0392b;
}

.btn-start {
    background: #27ae60;
    color: white;
}

.btn-stop {
    background: #e74c3c;
    color: white;
}

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

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8em;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

/* Files Tab */
.files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.files-actions {
    display: flex;
    gap: 10px;
}

.files-list-container {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

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

.files-table th,
.files-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.files-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.files-table tr:hover {
    background: #f8f9fa;
}

.no-files, .no-users, .no-downloads {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 40px;
}

/* Users Tab */
.users-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.users-section {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 25px;
}

.users-section h4 {
    margin-bottom: 20px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-item, .download-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
}

.user-ip, .download-user, .download-time {
    color: #6c757d;
    font-size: 0.9em;
}

/* Logs Tab */
.logs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.logs-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.auto-scroll {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
}

.logs-container {
    background: #1e1e1e;
    border-radius: 10px;
    padding: 20px;
    max-height: 500px;
    overflow-y: auto;
}

#logs-content {
    color: #d4d4d4;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    line-height: 1.4;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Settings Tab */
.settings-sections {
    display: grid;
    gap: 30px;
}

.settings-section {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 25px;
}

.settings-section h4 {
    margin-bottom: 20px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.setting-item {
    margin: 20px 0;
}

.setting-item label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.domain-input {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    width: 300px;
    margin-right: 10px;
}

.setting-help {
    color: #6c757d;
    font-size: 0.9em;
    margin-top: 10px;
}

/* Footer */
.app-footer {
    background: #f8f9fa;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #e9ecef;
    border-radius: 0 0 15px 15px;
    color: #6c757d;
}

/* Responsive */
@media (max-width: 768px) {
    .servers-grid {
        grid-template-columns: 1fr;
    }
    
    .users-container {
        grid-template-columns: 1fr;
    }
    
    .app-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .tabs-nav {
        flex-wrap: wrap;
    }
    
    .quick-actions {
        flex-direction: column;
    }
}