/* Dark Red Premium Theme - Super Premium Upgrade */
:root {
    --bg-color: #050505;
    --card-bg: #111111;
    --glass-bg: rgba(20, 20, 20, 0.7);
    --primary-red: #8b0000;
    --accent-red: #ff3333;
    --glow-red: rgba(255, 51, 51, 0.4);
    --text-color: #f5f5f5;
    --text-muted: #a0a0a0;
    --nav-glass: rgba(5, 5, 5, 0.85);
    --border-color: #2a2a2a;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    background-image: radial-gradient(circle at top right, #1a0000 0%, transparent 40%),
        radial-gradient(circle at bottom left, #0f0000 0%, transparent 30%);
    color: var(--text-color);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* Glassmorphism Classes */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--nav-glass);
    border-bottom: 1px solid rgba(139, 0, 0, 0.3);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.logo {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--accent-red);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 15px var(--primary-red);
}

.search-bar form {
    display: flex;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    overflow: hidden;
}

.search-input {
    background: rgba(40, 40, 40, 0.6);
    border: 1px solid #333;
    color: white;
    padding: 10px 15px;
    width: 300px;
    outline: none;
    transition: all 0.3s;
}

.search-input:focus {
    background: rgba(50, 50, 50, 0.9);
    border-color: var(--primary-red);
}

.search-btn {
    background: var(--primary-red);
    border: none;
    color: white;
    padding: 10px 20px;
    cursor: pointer;
    transition: background 0.3s;
}

.search-btn:hover {
    background: var(--accent-red);
    box-shadow: 0 0 10px var(--accent-red);
}

/* Main Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.section-title {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    font-size: 1.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title::before {
    content: '';
    display: block;
    width: 6px;
    height: 30px;
    background: var(--accent-red);
    margin-right: 15px;
    box-shadow: 0 0 10px var(--accent-red);
    border-radius: 2px;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
}

.video-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.video-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5), 0 0 15px var(--glow-red);
    border-color: var(--primary-red);
    z-index: 10;
}

.thumbnail-wrapper {
    position: relative;
    padding-top: 56.25%;
    /* 16:9 Aspect Ratio */
    overflow: hidden;
    background: #000;
}

.thumbnail-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    opacity: 0.9;
}

.video-card:hover .thumbnail-wrapper img {
    transform: scale(1.1);
    opacity: 1;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    font-size: 3.5rem;
    color: var(--accent-red);
    opacity: 0;
    transition: all 0.3s ease;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}

.video-card:hover .play-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.card-body {
    padding: 18px;
    background: linear-gradient(to bottom, #151515, #111111);
}

.card-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    color: #e0e0e0;
}

.sidebar-info h3 {
    font-size: 0.9rem;
    line-height: 1.35;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


.card-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.d-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
}

/* Player Page */
.player-container {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
}

.video-player-wrapper {
    position: relative;
    padding-top: 56.25%;
    /* 16:9 */
    background: black;
    box-shadow: 0 0 50px rgba(139, 0, 0, 0.15);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 25px;
    border: 1px solid #222;
}

.video-info h1 {
    font-size: 2rem;
    margin-bottom: 15px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.video-info .meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.category-tag {
    background: linear-gradient(135deg, var(--primary-red), #600000);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(139, 0, 0, 0.3);
}

/* Sidebar */
.sidebar .sidebar-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-red);
    display: inline-block;
    padding-bottom: 8px;
}

.sidebar-item {
    display: flex;
    gap: 12px;
    background: var(--card-bg);
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s;
    border: 1px solid transparent;
    margin-bottom: 12px;
}

.sidebar-item:hover {
    background: #1e1e1e;
    transform: translateX(5px);
    border-color: #333;
}

.sidebar-thumb {
    width: 130px;
    height: 74px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
}

.sidebar-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-info h3 {
    font-size: 0.9rem;
    line-height: 1.35;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Admin Panel - Super Premium */
.admin-container {
    max-width: 1200px;
    margin: 40px auto;
}

.admin-header {
    background: linear-gradient(to right, #000, #1a0000);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--primary-red);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-red);
    text-shadow: 0 0 10px rgba(255, 77, 77, 0.4);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.admin-table th {
    background: #252525;
    color: var(--accent-red);
    padding: 15px;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.admin-table td {
    padding: 15px;
    border-bottom: 1px solid #222;
    vertical-align: middle;
}

.admin-table tr:hover td {
    background: #1a1a1a;
}

/* Forms & Buttons */
.form-control {
    width: 100%;
    padding: 12px 15px;
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid #333;
    color: white;
    border-radius: 6px;
    transition: all 0.3s;
    font-family: inherit;
}

.form-control:focus {
    border-color: var(--accent-red);
    box-shadow: 0 0 8px rgba(255, 77, 77, 0.2);
    outline: none;
    background: #000;
}

/* Buttons - Super Premium Animated */
.btn {
    position: relative;
    padding: 12px 24px;
    border-radius: 50px;
    /* Pill shape for modern feel */
    border: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    color: white;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: width 0.4s ease;
    z-index: -1;
    transform: skewX(-15deg);
    transform-origin: left;
}

.btn:hover::before {
    width: 150%;
}

.btn:active {
    transform: scale(0.96);
}

/* Primary Button with "Heartbeat" Glow */
.btn-primary {
    background: linear-gradient(135deg, #8b0000 0%, #c00000 50%, #8b0000 100%);
    background-size: 200% auto;
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.4);
    animation: gradientShift 3s infinite alternate;
}

.btn-primary:hover {
    box-shadow: 0 6px 25px rgba(255, 50, 50, 0.6);
    background-position: right center;
    transform: translateY(-2px);
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 100% 50%;
    }
}

/* Secondary / Danger Button */
.btn-danger {
    background: linear-gradient(135deg, #333 0%, #555 100%);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #cc0000 0%, #ff3333 100%);
    box-shadow: 0 6px 20px rgba(204, 0, 0, 0.5);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.75rem;
    border-radius: 4px;
    /* Keep small buttons slightly squarer or rounded */
}

/* Search Button Specifics */
.search-btn {
    border-radius: 0 4px 4px 0;
    /* Match input field */
    background: linear-gradient(to bottom, #a00000, #800000);
    padding: 0 25px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background: var(--accent-red);
    box-shadow: 0 0 15px var(--primary-red);
}

/* Line Clamp Fixes */
.card-title {
    /* ... existing styles ... */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    /* Standard property */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Floating Animation for Cards */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-5px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Add specialized glow text */
.glow-text {
    animation: textGlow 2s ease-in-out infinite alternate;
}

@keyframes textGlow {
    from {
        text-shadow: 0 0 10px rgba(255, 77, 77, 0.2);
    }

    to {
        text-shadow: 0 0 20px rgba(255, 77, 77, 0.6), 0 0 10px rgba(255, 77, 77, 0.4);
    }
}

/* Responsive */
@media (max-width: 900px) {
    .player-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
    }

    .search-input {
        width: 100%;
    }

    .stats-row {
        grid-template-columns: 1fr;
    }

    .admin-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

/* Custom Modal / Popup */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    background: #111;
    border: 1px solid var(--primary-red);
    box-shadow: 0 0 30px rgba(139, 0, 0, 0.3);
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.modal-overlay.active .modal-box {
    transform: scale(1);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: white;
}

.modal-message {
    color: #ccc;
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.modal-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

/* Admin Login Page - Premium Design */
.admin-login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #1a0000 0%, #000 100%);
    padding: 20px;
}

.admin-login-box {
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid var(--primary-red);
    box-shadow: 0 0 50px rgba(139, 0, 0, 0.3), 0 0 100px rgba(0, 0, 0, 0.8);
    padding: 40px;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.admin-login-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--accent-red), transparent);
    animation: scanline 2s linear infinite;
}

@keyframes scanline {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.admin-login-title {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 5px;
    color: white;
}

.admin-login-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 2px;
}