/* Streampanel Modern Dark Theme CSS */
:root {
    --primary: #ff7a00;
    --primary-dark: #e66a00;
    --accent: #00b3ad;
    --accent-light: #00d4aa;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --dark-lighter: #334155;
    --gray: #64748b;
    --gray-light: #94a3b8;
    --white: #ffffff;
    --sidebar-bg: #0f172a;
    --card-bg: #1e293b;
    --border: #334155;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-primary: linear-gradient(135deg, #ff7a00 0%, #ff9500 100%);
    --gradient-accent: linear-gradient(135deg, #00b3ad 0%, #00d4aa 100%);
}

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

body { 
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--dark);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    padding: 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    transition: all 0.3s ease;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo {
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-logo::before {
    content: '🎵';
    font-size: 1.8rem;
}

.nav-menu {
    padding: 1rem 0;
}

.nav-item {
    margin: 0.25rem 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 1.5rem;
    color: var(--gray-light);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 500;
}

.nav-link:hover {
    background: var(--dark-light);
    color: var(--white);
}

.nav-link.active {
    background: var(--accent);
    color: var(--white);
    font-weight: 600;
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary);
}

.nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.nav-text {
    flex: 1;
}

.nav-subtitle {
    font-size: 12px;
    color: var(--gray);
    margin-top: 2px;
}

.nav-arrow {
    transition: transform 0.3s ease;
}

.nav-item.has-submenu .nav-arrow {
    transform: rotate(90deg);
}

/* System Status */
.system-status {
    position: absolute;
    bottom: 80px;
    left: 0;
    right: 0;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.5rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2s infinite;
}

.status-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--success);
}

.logout-link {
    position: absolute;
    bottom: 20px;
    left: 1.5rem;
    right: 1.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-light);
    text-decoration: none;
    padding: 8px 0;
    transition: color 0.3s ease;
}

.logout-link:hover {
    color: var(--danger);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    background: var(--dark);
    min-height: 100vh;
}

.content-header {
    background: var(--dark-light);
    border-bottom: 1px solid var(--border);
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--gray-light);
    font-size: 1rem;
}

.status-badge {
    background: var(--success);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-badge::before {
    content: '●';
    font-size: 12px;
}

.content-body {
    padding: 2rem;
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--white);
}

.card-icon.primary { background: var(--gradient-primary); }
.card-icon.accent { background: var(--gradient-accent); }
.card-icon.success { background: var(--success); }
.card-icon.warning { background: var(--warning); }

.card-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.card-subtitle {
    color: var(--gray-light);
    font-size: 14px;
}

/* Service Status Cards */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.service-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.service-card:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.service-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.service-name {
    font-weight: 600;
    color: var(--white);
}

.service-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.service-status.running {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.service-status.online {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.service-status.active {
    background: rgba(0, 179, 173, 0.2);
    color: var(--accent);
}

.service-details {
    color: var(--gray-light);
    font-size: 12px;
    line-height: 1.4;
}

/* Lists */
.list-section {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.list-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.list-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.list-subtitle {
    color: var(--gray-light);
    font-size: 14px;
}

.list-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.3s ease;
}

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

.list-item:hover {
    background: var(--dark-light);
}

.list-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 14px;
}

.list-content {
    flex: 1;
}

.list-name {
    font-weight: 600;
    color: var(--white);
    margin-bottom: 2px;
}

.list-email {
    color: var(--gray-light);
    font-size: 14px;
}

.list-meta {
    color: var(--gray);
    font-size: 12px;
}

.list-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: var(--dark-light);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-light);
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: var(--accent);
    color: var(--white);
    border-color: var(--accent);
}

/* Buttons */
.btn {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 4px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--accent);
}

.btn-secondary:hover {
    background: var(--accent-light);
}

.btn-danger {
    background: var(--danger);
}

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

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--white);
    font-weight: 600;
    font-size: 14px;
}

input, select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    background: var(--card-bg);
    color: var(--white);
    transition: all 0.3s ease;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 179, 173, 0.1);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--card-bg);
    margin: 5% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xl);
}

.close {
    color: var(--gray-light);
    float: right;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: var(--danger);
}

/* Animations */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .service-grid {
        grid-template-columns: 1fr;
    }
}
