:root {
    --primary: #8a2be2;
    --secondary: #ff1493;
    --bg-dark: #0f172a;
    --text-light: #f8fafc;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    min-height: 100vh;
}

.bg-gradient {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    position: relative;
    overflow-x: hidden;
}

.bg-gradient::before {
    content: '';
    position: fixed;
    top: -50%; left: -50%;
    width: 200vw; height: 200vw;
    background: radial-gradient(circle, rgba(138,43,226,0.15) 0%, rgba(0,0,0,0) 60%);
    z-index: 0;
    pointer-events: none;
}

.bg-gradient::after {
    content: '';
    position: fixed;
    bottom: -50%; right: -50%;
    width: 200vw; height: 200vw;
    background: radial-gradient(circle, rgba(255,20,147,0.1) 0%, rgba(0,0,0,0) 60%);
    z-index: 0;
    pointer-events: none;
}

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

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--glass-shadow);
    position: relative;
    z-index: 1;
}

.login-card {
    width: 100%;
    max-width: 400px;
    animation: fadeIn 0.8s ease-out;
}

.text-center { text-align: center; }
.text-gradient {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}
.subtitle {
    color: #94a3b8;
    margin-bottom: 2rem;
    font-weight: 300;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #cbd5e1;
}

.glass-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-light);
    font-family: inherit;
    transition: all 0.3s ease;
}

.glass-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 10px rgba(138,43,226,0.3);
}

.btn-primary {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: inherit;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255,20,147,0.4);
}
.btn-danger {
    background: linear-gradient(90deg, #dc2626, #991b1b);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.btn-danger:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(220,38,38,0.4); }

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid var(--glass-border);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.2); }

.w-100 { width: 100%; }

/* Dashboard layout */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 2rem;
}
.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
}

/* Grids / Items */
.grids-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.grid-item {
    padding: 1.5rem;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}
.grid-item:hover {
    transform: translateY(-5px);
}
.grid-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}
.grid-meta {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 1rem;
    flex-grow: 1;
}
.grid-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.3s;
}
.modal-content {
    width: 100%;
    max-width: 500px;
}

/* Video Grid Display */
.video-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}
@media (max-width: 1200px) {
    .video-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
    .video-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
}
@media (max-width: 600px) {
    .video-grid { grid-template-columns: 1fr; }
}
.video-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--glass-border);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
}
.video-card:hover {
    transform: scale(1.02);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(138,43,226,0.3);
}
.video-thumb-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
    background: #000;
    display: block;
}
.video-thumb {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    filter: blur(12px);
    transition: filter 0.5s ease;
    transform: scale(1.1); /* Prevent blurred edges */
}
/* Unblur on hover effect removed per request */
.video-duration {
    position: absolute;
    bottom: 8px; right: 8px;
    background: rgba(0,0,0,0.7);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}
.video-info {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.video-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    flex-grow: 1;
}
.video-actions {
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
}

/* Header Action Bar */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.2);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 1px solid var(--glass-border);
}

.public-link-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0,0,0,0.4);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* Main Navigation */
.main-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.main-nav-container {
    max-width: 1350px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 12px rgba(138, 43, 226, 0.4);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: #fff;
}

.btn-admin {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 0.55rem 1.1rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-admin:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Main Page Content Containers */
.main-wrapper {
    max-width: 1350px;
    margin: 0 auto;
    padding: 2.5rem 2rem 5rem;
    position: relative;
    z-index: 1;
}

/* Latest Grid Hero & Header */
.latest-grid-hero {
    text-align: center;
    margin-bottom: 3rem;
    padding: 3rem 1.5rem;
    background: radial-gradient(circle at 50% 30%, rgba(138, 43, 226, 0.15), transparent 70%);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    overflow: hidden;
}

.featured-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 20, 147, 0.15);
    border: 1px solid rgba(255, 20, 147, 0.35);
    color: #ff69b4;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.featured-pill svg {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.9); }
}

.latest-grid-title {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #ffffff 30%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.8rem;
    line-height: 1.2;
}

.latest-grid-meta {
    color: #94a3b8;
    font-size: 1.05rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.latest-grid-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Public Video Cards */
.public-video-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 4rem;
}

.public-video-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.35s ease, border-color 0.35s ease;
    animation: fadeIn 0.6s ease-out;
}

.public-video-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.6), 0 0 25px rgba(138, 43, 226, 0.3);
    border-color: rgba(138, 43, 226, 0.5);
}

.public-thumb-wrap {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    background: #000;
    overflow: hidden;
}

.public-thumb-img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    filter: blur(15px);
    transform: scale(1.15);
}

.public-play-overlay {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: 58px; height: 58px;
    background: rgba(229, 9, 20, 0.85);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 5;
    backdrop-filter: blur(4px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.public-play-overlay svg {
    width: 28px; height: 28px;
    color: #fff;
    margin-left: 2px;
}

.public-video-card:hover .public-play-overlay {
    transform: translate(-50%, -50%) scale(1.15);
    background: #ff1493;
    box-shadow: 0 0 30px rgba(255, 20, 147, 0.7);
    border-color: #fff;
}

.public-duration-badge {
    position: absolute;
    bottom: 10px; right: 10px;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 5;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.public-video-info {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.public-video-title {
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #f1f5f9;
}

/* Section Header */
.section-header {
    margin-top: 4rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 1rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1rem;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-subtitle {
    color: #94a3b8;
    font-size: 0.95rem;
    margin-top: 4px;
}

/* Archive Grid & Cards */
.archive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
}

.archive-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    animation: fadeIn 0.5s ease-out;
}

.archive-card:hover {
    transform: translateY(-6px);
    border-color: rgba(138, 43, 226, 0.4);
    box-shadow: 0 12px 30px rgba(0,0,0,0.4), 0 0 15px rgba(138, 43, 226, 0.2);
}

.archive-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 1.25rem;
}

.archive-card-title {
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.35;
    color: #f8fafc;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.badge-count {
    background: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.archive-thumbs-reel {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.archive-thumb {
    position: relative;
    padding-top: 60%;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.archive-thumb img.blurred-thumb {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    filter: blur(10px);
    transform: scale(1.15);
}

.archive-thumbs-empty {
    padding: 1.5rem 0;
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.archive-card-footer {
    margin-top: auto;
}

.archive-btn {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    padding: 0.75rem;
    font-size: 0.95rem;
}

/* Load More Area */
.load-more-section {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.load-more-btn {
    padding: 0.85rem 2.5rem;
    font-size: 1.05rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* Footer */
.main-footer {
    border-top: 1px solid var(--glass-border);
    padding: 2.5rem 0;
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
    margin-top: 5rem;
}

.footer-content {
    max-width: 1350px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Responsive Media Queries */
@media (max-width: 1200px) {
    .public-video-grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
    .archive-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .public-video-grid { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
    .latest-grid-title { font-size: 2.2rem; }
}

@media (max-width: 650px) {
    .public-video-grid { grid-template-columns: 1fr; }
    .archive-grid { grid-template-columns: 1fr; }
    .latest-grid-hero { padding: 2rem 1rem; }
    .latest-grid-title { font-size: 1.8rem; }
    .main-nav-container { flex-direction: column; gap: 1rem; }
    .footer-content { flex-direction: column; text-align: center; }
}

