* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #000000;
    --accent-color: #dc0000;
    --accent-hover: #b30000;
    --highlight-color: #dc0000;
    --success-color: #2ecc71;
    --danger-color: #dc0000;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-dark: #000000;
    --text-light: #333333;
    --bg-card: rgba(255, 255, 255, 0.98);
    --border-color: rgba(255, 255, 255, 0.3);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #dc0000 0%, #b30000 50%, #8b0000 100%);
    color: var(--text-dark);
    min-height: 100vh;
    line-height: 1.6;
}

.admin-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--primary-color);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
}

.sidebar-logo {
    height: 80px;
    width: auto;
    object-fit: contain;
    display: block;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(220, 0, 0, 0.15);
    color: var(--text-primary);
    border-left-color: var(--highlight-color);
}

.nav-item.active {
    background: rgba(220, 0, 0, 0.25);
    color: var(--text-primary);
    border-left-color: var(--highlight-color);
    font-weight: 600;
}

.nav-item i {
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

.logout-btn {
    width: 100%;
    padding: 0.75rem;
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid var(--danger-color);
    color: var(--danger-color);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.logout-btn:hover {
    background: var(--danger-color);
    color: white;
}

/* Main Content */
.main-content {
    margin-left: 280px;
    flex: 1;
    padding: 2rem;
    background: #ffffff;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

.section-header {
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.section-header h1 {
    font-size: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-dark);
}

.section-header p {
    color: var(--text-light);
    flex: 1;
}

/* Form & Buttons */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-input {
    width: 100%;
    max-width: 500px;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    color: var(--text-dark);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(220, 0, 0, 0.1);
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
    font-weight: 500;
    font-family: inherit;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
    border: 2px solid var(--accent-color);
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 0, 0, 0.4);
}

.msg {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    max-width: 500px;
}

.msg.error {
    background: rgba(220, 0, 0, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(220, 0, 0, 0.3);
}

.msg.success {
    background: rgba(46, 204, 113, 0.15);
    color: #1e7e34;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

/* Playlist (video list) */
.playlist-container {
    display: grid;
    gap: 1rem;
}

.playlist-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.95) 100%);
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.playlist-item:hover {
    border-color: rgba(220, 0, 0, 0.25);
    box-shadow: 0 8px 25px rgba(220, 0, 0, 0.12);
}

.playlist-item-thumb {
    width: 120px;
    height: 68px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.playlist-item-info {
    flex: 1;
    min-width: 0;
}

.playlist-item-link {
    font-size: 0.9rem;
    word-break: break-all;
    color: var(--text-dark);
}

.playlist-item-actions {
    flex-shrink: 0;
}

.playlist-item-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--highlight-color);
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

/* Login page (centered box like radio) */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.login-box {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.95) 100%);
    backdrop-filter: blur(30px);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 30px;
    padding: 3rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo img {
    height: 80px;
    width: auto;
}

.login-box h2 {
    text-align: center;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }

    .main-content {
        margin-left: 0;
    }

    .playlist-item {
        flex-direction: column;
        text-align: center;
    }

    .playlist-item-actions {
        width: 100%;
        justify-content: center;
    }
}
