/* admin_style.css - Premium Modern Dark-Mode & Glassmorphism Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-primary: #06040f;
    --bg-secondary: #120b2d;
    --glass-bg: rgba(255, 255, 255, 0.045);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-hover: rgba(255, 255, 255, 0.12);
    --accent-purple: #8a2be2;
    --accent-blue: #00d2ff;
    --accent-pink: #ff007f;
    --text-primary: #ffffff;
    --text-secondary: #9db0c9;
    --success: #00e676;
    --warning: #ffb300;
    --danger: #ff1744;
    --sidebar-width: 230px;
    --gradient-purple-blue: linear-gradient(135deg, #8a2be2 0%, #00d2ff 100%);
    --gradient-pink-purple: linear-gradient(135deg, #ff007f 0%, #8a2be2 100%);
    --gradient-card: linear-gradient(145deg, rgba(22, 13, 47, 0.92) 0%, rgba(8, 5, 20, 0.95) 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background:
        radial-gradient(circle at top left, rgba(138, 43, 226, 0.16), transparent 28%),
        radial-gradient(circle at bottom right, rgba(0, 210, 255, 0.14), transparent 24%),
        var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

::selection {
    background: rgba(138, 43, 226, 0.45);
    color: white;
}

/* Scrollbar customization */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-purple);
}

/* Background Gradients */
.glow-bg {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(138, 43, 226, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    top: -200px;
    left: -200px;
    z-index: -1;
    pointer-events: none;
}
.glow-bg-right {
    position: fixed;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 210, 255, 0.12) 0%, rgba(0, 0, 0, 0) 70%);
    bottom: -150px;
    right: -150px;
    z-index: -1;
    pointer-events: none;
}

/* Login Page Container */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: var(--bg-primary);
    padding: 20px;
}

.login-card {
    background: var(--gradient-card);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    width: 100%;
    max-width: 420px;
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.login-logo {
    font-size: 2.2rem;
    font-weight: 800;
    background: var(--gradient-purple-blue);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Standard Inputs */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--glass-border);
    outline: none;
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 15px rgba(138, 43, 226, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

.form-select {
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--glass-border);
    outline: none;
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.form-select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.form-select:focus {
    border-color: var(--accent-purple);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Buttons */
.btn-primary {
    width: 100%;
    background: var(--gradient-purple-blue);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 14px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(138, 43, 226, 0.28);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(138, 43, 226, 0.38);
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(12px);
}

.btn-secondary:hover {
    background: var(--glass-hover);
    border-color: rgba(255,255,255,0.24);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    background: var(--glass-bg);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-action:hover {
    background: var(--accent-purple);
    border-color: var(--accent-purple);
    transform: scale(1.05);
}

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

.btn-action.delete:hover {
    background: var(--danger);
    border-color: var(--danger);
}

/* Alert Notification */
.alert {
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: left;
}

.alert-danger {
    background: rgba(255, 23, 68, 0.15);
    border: 1px solid var(--danger);
    color: #ff5252;
}

.alert-success {
    background: rgba(0, 230, 118, 0.15);
    border: 1px solid var(--success);
    color: #69f0ae;
}

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

/* Sidebar Navigation */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(18, 11, 45, 0.82);
    backdrop-filter: blur(24px);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.22);
}

.sidebar-brand {
    padding: 20px 16px;
    font-size: 1.15rem;
    font-weight: 800;
    background: var(--gradient-purple-blue);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.02em;
}

.sidebar-menu {
    list-style: none;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
    overflow-y: auto;
}

.sidebar-menu::-webkit-scrollbar {
    width: 4px;
}

.sidebar-menu::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

.sidebar-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.88rem;
    border-radius: 8px;
    transition: all 0.25s ease;
    border: 1px solid transparent;
}

.sidebar-link i {
    font-size: 1rem;
}

.sidebar-link:hover, .sidebar-link.active {
    background: var(--glass-hover);
    color: var(--text-primary);
    border-color: rgba(255,255,255,0.12);
    transform: translateX(2px);
}

.sidebar-link.active {
    background: var(--gradient-purple-blue);
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(138, 43, 226, 0.26);
}

.sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--glass-border);
}

/* Main Content Area */
.main-content {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    padding: 24px 28px 32px;
    min-width: 0;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    padding: 20px 22px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.header-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.header-title {
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.header-subtitle {
    font-size: 0.92rem;
    color: var(--text-secondary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    color: var(--text-primary);
    font-size: 0.85rem;
    border: 1px solid var(--glass-border);
}

.header-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
}

.header-user strong {
    color: var(--text-primary);
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-pink-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 8px 18px rgba(255, 0, 127, 0.25);
}

.page-shell {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* Dashboard Hero */
.dashboard-hero {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.16), rgba(0, 210, 255, 0.12));
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 28px 30px;
    margin-bottom: 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.dashboard-hero h2 {
    font-size: 1.6rem;
    margin: 10px 0 8px;
}

.dashboard-hero p {
    color: var(--text-secondary);
    max-width: 620px;
    line-height: 1.6;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    width: auto;
}

/* Stats Cards Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--gradient-card);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: rgba(138, 43, 226, 0.4);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.stat-info h3 {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-info p {
    font-size: 1.6rem;
    font-weight: 700;
}

.stat-info span {
    display: inline-block;
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.stat-icon.purple { background: rgba(138, 43, 226, 0.15); color: #c084fc; }
.stat-icon.blue { background: rgba(0, 210, 255, 0.15); color: #38bdf8; }
.stat-icon.pink { background: rgba(255, 0, 127, 0.15); color: #f472b6; }
.stat-icon.green { background: rgba(0, 230, 118, 0.15); color: #34d399; }
.stat-icon.orange { background: rgba(255, 179, 0, 0.16); color: #ffbf47; }

/* Responsive 50/50 Columns Grid */
.dashboard-equal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}

@media (max-width: 1024px) {
    .dashboard-equal-grid {
        grid-template-columns: 1fr;
    }
}

/* Dashboard Chart and Recent Grid */
.dashboard-details-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 40px;
}

@media (max-width: 1024px) {
    .dashboard-details-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .main-content {
        margin-left: 0;
        padding: 20px;
    }

    .sidebar {
        position: static;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
    }

    .app-container {
        flex-direction: column;
    }

    .dashboard-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-actions {
        width: 100%;
    }

    .hero-btn {
        width: 100%;
    }

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

    .header-actions {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }
}

/* Glass Card */
.glass-card {
    background: var(--gradient-card);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 24px;
    height: 100%;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(16px);
}

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

.glass-card-title {
    font-size: 1.15rem;
    font-weight: 600;
}

/* Glass Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.glass-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.glass-table th {
    padding: 16px;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.glass-table td {
    padding: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    font-size: 0.95rem;
    color: var(--text-primary);
}

.glass-table tr:hover td {
    background: rgba(255, 255, 255, 0.01);
}

/* Badges */
.badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-featured {
    background: rgba(0, 210, 255, 0.15);
    color: #00d2ff;
    border: 1px solid rgba(0, 210, 255, 0.3);
}

.badge-regular {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

.badge-suspended {
    background: rgba(255, 23, 68, 0.15);
    color: #ff1744;
}

.badge-active {
    background: rgba(0, 230, 118, 0.15);
    color: #00e676;
}

/* Modal styles (e.g. for Add/Edit popups) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 2, 15, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--gradient-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    width: 100%;
    max-width: 650px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 30px;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-close:hover {
    color: var(--text-primary);
}

/* Layout helpers */
.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gap-10 {
    gap: 10px;
}

.flex-center {
    display: flex;
    align-items: center;
}

/* Media Thumbnail Preview */
.thumbnail-preview {
    width: 60px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    background: rgba(255,255,255,0.05);
}

/* Grid Layout for Cards */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.video-card {
    background: var(--gradient-card);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.video-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-purple);
}

.video-card-thumb-container {
    position: relative;
    width: 100%;
    height: 160px;
    background: #000;
}

.video-card-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
}

.video-card-content {
    padding: 16px;
}

.video-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-card-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 34px;
}

.video-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--glass-border);
    padding-top: 12px;
}

/* Upload Progress/Preview UI */
.file-upload-wrapper {
    border: 2px dashed var(--glass-border);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    background: rgba(255,255,255,0.01);
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload-wrapper:hover {
    border-color: var(--accent-purple);
    background: rgba(138, 43, 226, 0.02);
}

.file-upload-icon {
    font-size: 2rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

/* Custom Chart UI */
.chart-bar-container {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 200px;
    padding-top: 20px;
}

.chart-bar {
    width: 30px;
    background: var(--gradient-purple-blue);
    border-radius: 6px 6px 0 0;
    position: relative;
    transition: height 1s ease;
}

.chart-bar:hover {
    background: var(--gradient-pink-purple);
}

.chart-bar-tooltip {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-secondary);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity 0.2s ease;
    white-space: nowrap;
    border: 1px solid var(--glass-border);
}

.chart-bar:hover .chart-bar-tooltip {
    opacity: 1;
}

.chart-label {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--glass-border);
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background: var(--gradient-purple-blue);
}

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