*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #20294a 0, #050814 45%, #000 100%);
    color: #f4f4f8;
    min-height: 100vh;
}
a {
    color: #7fd2ff;
    text-decoration: none;
}
a:hover {
    text-decoration: none;
}
.top-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(16px);
    background: linear-gradient(90deg, rgba(9,12,30,0.9), rgba(9,12,30,0.4));
    position: sticky;
    top: 0;
    z-index: 10;
}
.logo {
    font-weight: 800;
    letter-spacing: 0.12em;
    font-size: 1.1rem;
    text-transform: uppercase;
}
.top-nav a {
    margin-left: 1rem;
}
.btn-primary,
.btn-outline {
    border-radius: 999px;
    padding: 0.45rem 1.2rem;
    border: 1px solid transparent;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-primary {
    background: linear-gradient(135deg, #2dd4ff, #6366f1);
    color: #050814;
    font-weight: 600;
    box-shadow: 0 0 12px rgba(99,102,241,0.7);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 20px rgba(45,212,255,0.9);
}
.btn-outline {
    border-color: rgba(148,163,184,0.7);
    color: #e5e7eb;
    background: transparent;
}
.btn-outline:hover {
    background: rgba(15,23,42,0.8);
}
.btn-outline.small,
.btn-primary.small {
    padding: 0.25rem 0.7rem;
    font-size: 0.75rem;
}

.main-container {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem;
    gap: 1.5rem;
}

/* Landing */
.hero {
    max-width: 900px;
    margin: 3rem auto;
    padding: 3rem;
    border-radius: 24px;
    background: radial-gradient(circle at top left, rgba(56,189,248,0.18), transparent 55%),
                linear-gradient(145deg, rgba(15,23,42,0.95), rgba(15,23,42,0.8));
    box-shadow: 0 40px 120px rgba(15,23,42,0.9);
}
.hero-content h1 {
    font-size: clamp(2.4rem, 3vw, 3.1rem);
    margin-bottom: 1rem;
}
.hero-content p {
    color: #9ca3af;
    margin-bottom: 1.8rem;
    max-width: 480px;
}
.hero-actions {
    display: flex;
    gap: 1rem;
}

/* Layout with sidebar */
.sidebar {
    width: 220px;
    background: radial-gradient(circle at top, rgba(30,64,175,0.45), rgba(15,23,42,0.95));
    border-radius: 18px;
    padding: 1rem;
    box-shadow: 0 18px 45px rgba(15,23,42,0.9);
}
.sidebar ul {
    list-style: none;
}
.sidebar a {
    display: block;
    padding: 0.65rem 0.9rem;
    border-radius: 999px;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    color: #e5e7eb;
}
.sidebar a.active,
.sidebar a:hover {
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    color: #0b1020;
}

.content {
    max-width: 900px;
    flex: 1;
    background: linear-gradient(145deg, rgba(15,23,42,0.97), rgba(15,23,42,0.85));
    border-radius: 24px;
    padding: 1.75rem;
    box-shadow: 0 28px 80px rgba(15,23,42,0.9);
}
.content h2 {
    margin-bottom: 0.7rem;
}
.content p {
    color: #9ca3af;
}

/* Auth card */
.auth-card {
    max-width: 420px;
    width: 100%;
    margin: 3rem auto;
    padding: 2rem;
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(15,23,42,0.97), rgba(15,23,42,0.9));
    box-shadow: 0 28px 80px rgba(15,23,42,0.9);
}
.auth-card h2 {
    margin-bottom: 1rem;
}
.form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.form label {
    font-size: 0.85rem;
    color: #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.form input,
.form select {
    background: rgba(15,23,42,0.9);
    border: 1px solid rgba(75,85,99,0.8);
    border-radius: 999px;
    padding: 0.55rem 0.9rem;
    color: #e5e7eb;
    outline: none;
}
.form input:focus,
.form select:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 1px rgba(56,189,248,0.4);
}
.card {
    margin-top: 1.5rem;
    padding: 1.25rem;
    border-radius: 18px;
    background: rgba(15,23,42,0.85);
    border: 1px solid rgba(75,85,99,0.7);
}
.alert {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 14px;
    font-size: 0.85rem;
}
.alert-error {
    background: rgba(239,68,68,0.16);
    border: 1px solid rgba(248,113,113,0.65);
}
.alert-success {
    background: rgba(34,197,94,0.16);
    border: 1px solid rgba(74,222,128,0.65);
}

/* Video grid */
.video-grid {
    margin-top: 1.2rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}
.video-card {
    background: radial-gradient(circle at top, rgba(56,189,248,0.14), rgba(15,23,42,0.95));
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(55,65,81,0.7);
    display: flex;
    flex-direction: column;
}
.thumb-wrapper {
    position: relative;
    padding-top: 56.25%;
    overflow: hidden;
}
.thumb-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    border-radius: 8px;
    transition: 0.25s;
}
.thumb-image:hover {
    transform: scale(1.03);
    box-shadow: 0 0 25px rgba(56,189,248,0.4);
}
.video-info {
    padding: 0.6rem 0.8rem 0.9rem;
}
.video-info h3 {
    font-size: 0.95rem;
    margin-bottom: 0.15rem;
}
.video-info .meta {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* Table */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    margin-top: 1rem;
}
.table th,
.table td {
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid rgba(31,41,55,0.8);
}
.table th {
    text-align: left;
    color: #9ca3af;
}
.inline-form {
    display: inline-block;
}

/* Stats cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.stat-card {
    padding: 1rem;
    border-radius: 18px;
    background: radial-gradient(circle at top left, rgba(129,140,248,0.26), rgba(15,23,42,0.95));
    border: 1px solid rgba(79,70,229,0.5);
}
.stat-card .label {
    font-size: 0.8rem;
    color: #cbd5f5;
}
.stat-card .value {
    font-size: 1.7rem;
    font-weight: 700;
}

/* VIDEO POP-UP MODAL */
.video-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    padding: 2rem;
}
.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    animation: popIn 0.2s ease;
}
#videoPlayer {
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 0 35px rgba(0, 200, 255, 0.35);
}
.video-close {
    position: absolute;
    top: -15px;
    right: -15px;
    font-size: 32px;
    color: #fff;
    cursor: pointer;
    padding: 4px 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    backdrop-filter: blur(6px);
    transition: 0.2s;
}
.video-close:hover {
    background: rgba(255,255,255,0.3);
}
@keyframes popIn {
    from { transform: scale(0.85); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

/* Footer */
.footer {
    text-align: center;
    padding: 1rem 0;
    color: #6b7280;
    font-size: 0.8rem;
}
