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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --success: #10b981;
    --success-dark: #059669;
    --warning: #f59e0b;
    --danger: #ef4444;
    --danger-dark: #dc2626;
    --dark: #0f172a;
    --gray-900: #1e293b;
    --gray-800: #334155;
    --gray-700: #475569;
    --gray-600: #64748b;
    --gray-500: #94a3b8;
    --gray-400: #cbd5e1;
    --gray-300: #e2e8f0;
    --gray-200: #f1f5f9;
    --gray-100: #f8fafc;
    --white: #ffffff;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--gray-100);
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

/* Navbar - Modern Design */
.navbar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 16px 32px;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
}

.navbar-brand {
    margin-right: 32px;
}

.navbar-brand h1 {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.navbar-menu {
    display: flex;
    list-style: none;
    gap: 8px;
    flex: 1;
    margin: 0;
    padding: 0;
}

.navbar-menu a {
    color: var(--gray-700);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
}

.navbar-menu a:hover {
    background: var(--gray-100);
    color: var(--primary);
    transform: translateY(-1px);
}

.navbar-menu a.active {
    background: var(--primary);
    color: var(--white);
}

.navbar-user {
    display: flex;
    align-items: center;
    margin-left: 16px;
}

/* User Dropdown */
.user-dropdown {
    position: relative;
}

.user-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--white);
    border: 1px solid var(--border);
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 100;
}

.user-dropdown-toggle:hover {
    background: var(--gray-50);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-color: var(--gray-300);
}

.user-dropdown-toggle svg {
    transition: transform 0.2s;
}

.user-dropdown-toggle.active svg {
    transform: rotate(180deg);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 600;
    font-size: 14px;
}

.user-name {
    font-weight: 500;
    color: var(--gray-800);
    font-size: 14px;
}

.user-dropdown .user-dropdown-menu {
    display: none !important;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    padding: 8px;
    z-index: 1000;
}

.user-dropdown .user-dropdown-menu.active {
    display: block !important;
    animation: dropdownFadeIn 0.2s ease;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-dropdown-header {
    padding: 12px;
    border-radius: 8px;
    background: var(--gray-50);
    margin-bottom: 4px;
}

.user-dropdown-name {
    font-weight: 600;
    color: var(--gray-900);
    font-size: 14px;
}

.user-dropdown-role {
    font-size: 12px;
    color: var(--gray-600);
    text-transform: capitalize;
    margin-top: 2px;
}

.user-dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 0;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: var(--gray-700);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 500;
}

.user-dropdown-item:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.user-dropdown-item svg {
    color: var(--gray-500);
    transition: color 0.2s;
}

.user-dropdown-item:hover svg {
    color: var(--primary);
}

.user-dropdown-item-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.user-dropdown-item-danger:hover svg {
    color: var(--danger);
}

/* Buttons - Enhanced */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--white);
    border: 1px solid var(--border);
    color: var(--gray-700);
    box-shadow: var(--shadow-sm);
}

.btn:hover {
    background: var(--gray-50);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border-color: transparent;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
    border-color: transparent;
}

.btn-danger:hover {
    background: var(--danger-dark);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.btn-success {
    background: var(--success);
    color: var(--white);
    border-color: transparent;
}

.btn-success:hover {
    background: var(--success-dark);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-warning {
    background: var(--warning);
    color: var(--white);
    border-color: transparent;
}

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

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
    display: flex;
}

.btn-icon {
    padding: 10px;
    aspect-ratio: 1;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--gray-700);
    font-size: 14px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
textarea,
select,
.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s;
    background: var(--white);
    color: var(--gray-800);
    font-family: inherit;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

input::placeholder {
    color: var(--gray-400);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

/* Cards - Enhanced */
.card {
    background: var(--white);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    border: 1px solid var(--border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.card-header {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

/* Tables - Modern */
.table-responsive {
    overflow-x: auto;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

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

.table th {
    background: var(--gray-50);
    padding: 16px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-600);
    border-bottom: 2px solid var(--border);
}

.table td {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    color: var(--gray-700);
}

.table tbody tr {
    transition: background 0.2s;
}

.table tbody tr:hover {
    background: var(--gray-50);
}

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

/* Status badges - Refined */
.status {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

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

.status-online::before {
    background: var(--success);
}

.status-offline {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-dark);
}

.status-offline::before {
    background: var(--danger);
}

.status-error {
    background: rgba(245, 158, 11, 0.1);
    color: #b45309;
}

.status-error::before {
    background: var(--warning);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    background: var(--gray-100);
    color: var(--gray-700);
}

.badge-admin {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-dark);
}

.badge-editor {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-dark);
}

.badge-viewer {
    background: var(--gray-200);
    color: var(--gray-700);
}

/* Alerts - Modern */
.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border: 1px solid;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-dark);
    border-color: rgba(16, 185, 129, 0.3);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-dark);
    border-color: rgba(239, 68, 68, 0.3);
}

.alert-info {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-dark);
    border-color: rgba(99, 102, 241, 0.3);
}

/* Page header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -0.5px;
}

.actions {
    display: flex;
    gap: 12px;
}

/* Stats grid - Enhanced */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--white);
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gray-300);
}

.stat-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.stat-card h3 {
    font-size: 13px;
    color: var(--gray-600);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1;
}

.stat-success::before {
    background: linear-gradient(180deg, var(--success) 0%, var(--success-dark) 100%);
}

.stat-warning::before {
    background: linear-gradient(180deg, var(--warning) 0%, #d97706 100%);
}

.stat-error::before {
    background: linear-gradient(180deg, var(--danger) 0%, var(--danger-dark) 100%);
}

.stat-primary::before {
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
}

/* Dashboard grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 24px;
}

.dashboard-section {
    background: var(--white);
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.dashboard-section h2 {
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-900);
}

/* Logs */
.log-list {
    max-height: 450px;
    overflow-y: auto;
}

.log-item {
    padding: 12px 16px;
    border-left: 3px solid var(--gray-300);
    margin-bottom: 8px;
    background: var(--gray-50);
    border-radius: 6px;
    transition: all 0.2s;
}

.log-item:hover {
    background: var(--gray-100);
    transform: translateX(4px);
}

.log-error {
    border-left-color: var(--danger);
    background: rgba(239, 68, 68, 0.05);
}

.log-critical {
    border-left-color: #7c2d12;
    background: rgba(124, 45, 18, 0.05);
}

.log-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-weight: 500;
    color: var(--gray-800);
}

.log-time {
    font-size: 12px;
    color: var(--gray-500);
    font-weight: 400;
}

/* Media grid - Enhanced */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.media-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.media-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.media-preview {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.media-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.media-card:hover .media-preview img {
    transform: scale(1.05);
}

.media-placeholder {
    font-weight: 700;
    color: var(--gray-400);
    font-size: 48px;
}

.media-info {
    padding: 16px;
}

.media-info h4 {
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-900);
}

.media-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--gray-600);
}

.media-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

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

/* Playlist designer - Modern */
.playlist-designer {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    margin-top: 20px;
}

.media-library,
.playlist-area {
    background: var(--white);
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.media-library h3,
.playlist-area h3 {
    margin-bottom: 16px;
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
}

.media-list {
    max-height: 600px;
    overflow-y: auto;
}

.media-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 8px;
    background: var(--gray-50);
    border-radius: 8px;
    cursor: move;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.media-item:hover {
    background: var(--gray-100);
    border-color: var(--primary-light);
    transform: translateX(4px);
}

.media-thumb {
    width: 60px;
    height: 40px;
    background: var(--gray-200);
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.media-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-thumb span {
    font-size: 20px;
}

.media-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
}

.playlist-items {
    min-height: 400px;
}

.playlist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 8px;
    background: var(--gray-50);
    border-radius: 8px;
    border: 2px solid var(--border);
    transition: all 0.2s;
}

.playlist-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.playlist-item.drag-over {
    border-color: var(--success);
    background: var(--success-light);
    border-style: dashed;
}

.playlist-item .handle {
    cursor: move;
    color: var(--gray-400);
    font-size: 18px;
    user-select: none;
}

.playlist-item .name {
    flex: 1;
    font-weight: 500;
}

.playlist-item input,
.playlist-item select {
    width: auto;
    padding: 6px 12px;
}

.btn-remove {
    background: var(--danger);
    color: var(--white);
    border: none;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-remove:hover {
    background: var(--danger-dark);
    transform: rotate(90deg);
}

/* Login page - Complete Redesign */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveBackground 20s linear infinite;
}

@keyframes moveBackground {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.login-container {
    width: 100%;
    max-width: 440px;
    padding: 24px;
    position: relative;
    z-index: 1;
}

.login-box {
    background: var(--white);
    padding: 48px 40px;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
}

.login-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 36px;
    font-weight: 700;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

.login-box h1 {
    text-align: center;
    color: var(--gray-900);
    margin-bottom: 8px;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.login-box h2 {
    text-align: center;
    color: var(--gray-600);
    margin-bottom: 32px;
    font-size: 15px;
    font-weight: 400;
}

.login-box .form-group {
    margin-bottom: 24px;
}

.login-box input {
    padding: 14px 16px;
    font-size: 15px;
    border-radius: 10px;
}

.login-box button[type="submit"] {
    margin-top: 8px;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.p-0 { padding: 0; }
.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }

/* Player Views */
.player-info-bar {
    display: flex;
    gap: 24px;
    padding: 16px;
    background: var(--gray-50);
    border-radius: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.player-info-bar .info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.player-info-bar .info-item label {
    font-size: 12px;
    color: var(--gray-600);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.player-info-bar .info-item span {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
}

.tabs {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid var(--border);
    margin-bottom: 24px;
}

.tab-button {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--gray-600);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: -2px;
}

.tab-button:hover {
    color: var(--primary);
    background: var(--gray-50);
}

.tab-button.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

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

.grid {
    display: grid;
    gap: 24px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.info-list {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 12px;
}

.info-list dt {
    font-weight: 600;
    color: var(--gray-700);
}

.info-list dd {
    margin: 0;
    color: var(--gray-900);
}

.playlist-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.playlist-list li {
    padding: 12px;
    background: var(--gray-50);
    border-radius: 6px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    background: var(--gray-200);
    color: var(--gray-700);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: var(--success-light);
    color: var(--success);
}

.screenshot-placeholder {
    padding: 48px;
    background: var(--gray-100);
    border-radius: 8px;
    text-align: center;
    color: var(--gray-600);
}

.form-help {
    display: block;
    font-size: 12px;
    color: var(--gray-600);
    margin-top: 4px;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.chart-container {
    background: var(--white);
    padding: 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.chart-container h4 {
    margin: 0 0 16px 0;
    font-size: 14px;
    color: var(--gray-700);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.log-container {
    max-height: 600px;
    overflow-y: auto;
    background: var(--gray-900);
    padding: 16px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
}

.log-entry {
    padding: 8px;
    margin-bottom: 4px;
    border-left: 3px solid var(--gray-600);
    background: rgba(255, 255, 255, 0.05);
    display: grid;
    grid-template-columns: 140px 80px 1fr;
    gap: 12px;
    font-size: 13px;
}

.log-entry.log-debug {
    border-left-color: var(--gray-500);
}

.log-entry.log-info {
    border-left-color: var(--primary);
}

.log-entry.log-warning {
    border-left-color: var(--warning);
}

.log-entry.log-error {
    border-left-color: var(--danger);
}

.log-entry.log-critical {
    border-left-color: var(--danger);
    background: rgba(220, 38, 38, 0.1);
}

.log-time {
    color: var(--gray-400);
}

.log-level {
    font-weight: 600;
    text-transform: uppercase;
}

.log-entry.log-debug .log-level {
    color: var(--gray-500);
}

.log-entry.log-info .log-level {
    color: var(--primary);
}

.log-entry.log-warning .log-level {
    color: var(--warning);
}

.log-entry.log-error .log-level {
    color: var(--danger);
}

.log-entry.log-critical .log-level {
    color: var(--danger);
}

.log-message {
    color: var(--gray-700);
    font-size: 14px;
    line-height: 1.5;
}

.log-filters {
    display: flex;
    gap: 12px;
    align-items: center;
}

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

.card-header h3 {
    margin: 0;
}

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

.status-online {
    background: var(--success-light);
    color: var(--success);
}

.status-offline {
    background: var(--gray-200);
    color: var(--gray-700);
}

.status-error {
    background: var(--danger-light);
    color: var(--danger);
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.status-indicator-online {
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
    animation: pulse 2s infinite;
}

.status-indicator-offline {
    background: var(--gray-400);
}

.status-indicator-error {
    background: var(--danger);
    animation: blink 1s infinite;
}

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

@keyframes blink {
    0%, 50%, 100% {
        opacity: 1;
    }
    25%, 75% {
        opacity: 0.3;
    }
}

.btn-group {
    display: flex;
    gap: 4px;
}

.subtitle {
    margin: 8px 0 0 0;
    font-size: 14px;
    color: var(--gray-600);
}

.text-success {
    color: var(--success);
    font-weight: 600;
}

.text-muted {
    color: var(--gray-600);
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
        padding: 12px 16px;
    }

    .navbar-menu {
        order: 3;
        width: 100%;
        margin-top: 12px;
        gap: 4px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .playlist-designer {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .page-header h1 {
        font-size: 24px;
    }

    .login-box {
        padding: 32px 24px;
    }

    .container {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .media-grid {
        grid-template-columns: 1fr;
    }
}

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

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* Loading Spinner */
.spinner {
    border: 3px solid var(--gray-200);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal System */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.modal-overlay.modal-open {
    opacity: 1;
}

.modal {
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-open .modal {
    transform: scale(1);
}

.modal-small { width: 100%; max-width: 400px; }
.modal-medium { width: 100%; max-width: 600px; }
.modal-large { width: 100%; max-width: 800px; }
.modal-xlarge { width: 100%; max-width: 1200px; }

.modal-header {
    padding: 24px 32px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--gray-500);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.modal-body {
    padding: 32px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 20px 32px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-shrink: 0;
}

.modal-form .form-group {
    margin-bottom: 24px;
}

.modal-form .form-group:last-child {
    margin-bottom: 0;
}

/* Tooltip System */
.tooltip {
    position: fixed;
    background: var(--gray-900);
    color: var(--white);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    max-width: 300px;
    z-index: 10000;
    pointer-events: none;
    box-shadow: var(--shadow-lg);
}

.help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--white);
    font-size: 12px;
    font-weight: 600;
    cursor: help;
    margin-left: 6px;
    transition: all 0.2s;
}

.help-icon:hover {
    background: var(--primary);
    transform: scale(1.1);
}

/* Info Banner für Anleitungen */
.info-banner {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(129, 140, 248, 0.05) 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-left: 4px solid var(--primary);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 24px;
    display: flex;
    gap: 16px;
}

.info-banner-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.info-banner-content h4 {
    color: var(--gray-900);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.info-banner-content p {
    color: var(--gray-700);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.info-banner-content ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
    color: var(--gray-700);
    font-size: 14px;
}

.info-banner-content li {
    margin-bottom: 4px;
}

/* Success/Warning/Error Variants */
.info-banner.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.05) 100%);
    border-color: rgba(16, 185, 129, 0.2);
    border-left-color: var(--success);
}

.info-banner.success .info-banner-icon {
    color: var(--success);
}

.info-banner.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(217, 119, 6, 0.05) 100%);
    border-color: rgba(245, 158, 11, 0.2);
    border-left-color: var(--warning);
}

.info-banner.warning .info-banner-icon {
    color: var(--warning);
}

.info-banner.danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.05) 100%);
    border-color: rgba(239, 68, 68, 0.2);
    border-left-color: var(--danger);
}

.info-banner.danger .info-banner-icon {
    color: var(--danger);
}

/* Walkthrough Steps */
.walkthrough {
    background: var(--white);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 24px;
}

.walkthrough-step {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

.walkthrough-step:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.walkthrough-step:first-child {
    padding-top: 0;
}

.walkthrough-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
}

.walkthrough-content h4 {
    color: var(--gray-900);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.walkthrough-content p {
    color: var(--gray-600);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal {
        width: 100%;
        max-width: none;
        max-height: 100%;
        border-radius: 0;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* Mobile Navigation Toggle */
.navbar-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.navbar-toggle:hover {
    background: var(--gray-100);
}

.navbar-toggle-icon {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--gray-700);
    position: relative;
    transition: all 0.3s ease;
}

.navbar-toggle-icon::before,
.navbar-toggle-icon::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--gray-700);
    transition: all 0.3s ease;
}

.navbar-toggle-icon::before {
    top: -7px;
}

.navbar-toggle-icon::after {
    bottom: -7px;
}

/* Toggle active state (X icon) */
.navbar-toggle.active .navbar-toggle-icon {
    background: transparent;
}

.navbar-toggle.active .navbar-toggle-icon::before {
    top: 0;
    transform: rotate(45deg);
}

.navbar-toggle.active .navbar-toggle-icon::after {
    bottom: 0;
    transform: rotate(-45deg);
}

/* Responsive Navbar */
@media (max-width: 768px) {
    .navbar {
        padding: 12px 16px;
        position: relative;
    }

    .navbar-toggle {
        display: block;
        margin-left: auto;
        margin-right: 12px;
        z-index: 102;
    }

    .navbar-user {
        margin-left: 0;
    }

    .user-name {
        display: none;
    }

    .user-dropdown-toggle {
        padding: 4px;
    }

    .user-dropdown-toggle svg {
        display: none;
    }

    .navbar-menu {
        display: none;
        position: fixed;
        top: 65px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--white);
        padding: 16px;
        box-shadow: var(--shadow-md);
        border-bottom: 1px solid var(--border);
        gap: 4px;
        max-height: calc(100vh - 65px);
        overflow-y: auto;
        z-index: 101;
    }

    .navbar-menu.active {
        display: flex;
        animation: slideDown 0.3s ease;
    }

    .navbar-menu a {
        padding: 12px 16px;
        width: 100%;
    }

    .container {
        padding: 16px;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tablet styles */
@media (max-width: 1024px) and (min-width: 769px) {
    .navbar {
        padding: 14px 24px;
    }

    .navbar-menu {
        gap: 4px;
    }

    .navbar-menu a {
        font-size: 13px;
        padding: 8px 12px;
    }

    .container {
        padding: 20px;
    }
}

/* Toggle Switch for Playlist Active/Inactive */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--gray-300);
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--success);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.toggle-switch input:focus + .toggle-slider {
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

/* Empty state styling */
.empty-state {
    animation: fadeIn 0.3s ease;
}

/* Priority input styling */
.priority-input {
    text-align: center;
    font-weight: 600;
}

.priority-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

/* Config Section Styling */
.config-section {
    margin-bottom: 24px;
}

.config-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--gray-50);
}

.config-section-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}

.config-section-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
}

.config-section-body {
    padding: 24px;
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.config-toggle-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.config-toggle-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--gray-50);
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.config-toggle-item:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

.config-toggle-info {
    flex: 1;
    margin-right: 16px;
}

.config-toggle-info strong {
    display: block;
    color: var(--gray-900);
    font-size: 15px;
    margin-bottom: 4px;
}

.config-toggle-info p {
    margin: 0;
    color: var(--gray-600);
    font-size: 13px;
    line-height: 1.4;
}

.config-actions {
    display: flex;
    gap: 12px;
    padding: 20px 0;
    justify-content: flex-end;
}

/* Volume Slider */
.volume-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--gray-200);
    outline: none;
    -webkit-appearance: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

.volume-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
}

.volume-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

.volume-value {
    float: right;
    font-weight: 600;
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 13px;
}

/* Responsive Config */
@media (max-width: 768px) {
    .config-grid {
        grid-template-columns: 1fr;
    }

    .config-toggle-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .config-toggle-info {
        margin-right: 0;
        margin-bottom: 12px;
    }

    .config-actions {
        flex-direction: column;
    }

    .config-actions button {
        width: 100%;
    }
}

/* Profile Page Styling */
.page-header {
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.page-description {
    color: var(--gray-600);
    font-size: 16px;
}

.profile-container {
    max-width: 900px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.profile-info-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 32px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.profile-details h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.role-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.profile-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin-top: 24px;
}

.profile-info-item {
    padding: 20px 32px;
    background: rgba(255, 255, 255, 0.05);
}

.info-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
    margin-bottom: 6px;
}

.info-value {
    font-size: 16px;
    font-weight: 600;
}

.password-change-card .card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--gray-50);
}

.password-change-card .card-header h3 {
    margin: 0;
}

.password-change-card .card-body {
    padding: 24px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .profile-info-grid {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions button {
        width: 100%;
    }
}
