/**
 * EducationistGuru - YouTube Video Hub Stylesheet
 * Brand colors: #ff3115 (EG Red), #ff0000 (YouTube Red), #111827 (Dark), #f8fafc (Light Slate)
 */

/* ================= HERO & CHANNEL SPOTLIGHT ================= */
.eg-yt-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #090d16 100%);
    position: relative;
    padding: 60px 0 50px;
    color: #ffffff;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.eg-yt-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 0, 0, 0.18) 0%, rgba(255, 49, 21, 0) 70%);
    pointer-events: none;
    z-index: 1;
}

.eg-yt-hero .container {
    position: relative;
    z-index: 2;
}

.eg-yt-channel-card {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 28px 32px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.eg-yt-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.eg-yt-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 3px solid #ff0000;
    box-shadow: 0 0 25px rgba(255, 0, 0, 0.4);
    object-fit: cover;
    background: #fff;
    padding: 3px;
}

.eg-yt-badge-live {
    position: absolute;
    bottom: -2px;
    right: -4px;
    background: #ff0000;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 10px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    gap: 4px;
}

.eg-yt-live-dot {
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    animation: egYtPulse 1.4s infinite;
}

@keyframes egYtPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.6); opacity: 0.5; }
}

.eg-yt-channel-info {
    flex: 1;
    min-width: 260px;
}

.eg-yt-channel-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 0, 0, 0.15);
    color: #ff6b6b;
    border: 1px solid rgba(255, 0, 0, 0.3);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.eg-yt-channel-title {
    font-size: 28px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.5px;
}

.eg-yt-verified {
    color: #38bdf8;
    font-size: 20px;
}

.eg-yt-handle {
    color: #94a3b8;
    font-size: 14px;
    margin-bottom: 12px;
}

.eg-yt-stats-row {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #cbd5e1;
}

.eg-yt-stat-item strong {
    color: #ffffff;
    font-size: 15px;
}

.eg-yt-channel-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.eg-btn-subscribe {
    background: #ff0000;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 14px;
    padding: 12px 24px;
    border-radius: 24px;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none !important;
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.4);
    transition: all 0.25s ease;
}

.eg-btn-subscribe:hover {
    background: #cc0000;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 0, 0, 0.6);
}

.eg-btn-add-video {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff !important;
    font-weight: 700;
    font-size: 14px;
    padding: 12px 22px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.eg-btn-add-video:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: #ffffff;
    transform: translateY(-2px);
}

/* ================= TOOLBAR (SEARCH & CATEGORIES) ================= */
.eg-yt-toolbar {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
    padding: 20px 24px;
    margin: -30px auto 40px;
    position: relative;
    z-index: 10;
}

.eg-yt-search-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.eg-yt-search-box {
    position: relative;
    flex: 1;
    min-width: 280px;
}

.eg-yt-search-box i.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 16px;
}

.eg-yt-search-input {
    width: 100%;
    padding: 12px 42px 12px 45px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 14px;
    background: #f8fafc;
    transition: all 0.2s ease;
    outline: none;
}

.eg-yt-search-input:focus {
    background: #ffffff;
    border-color: #ff0000;
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.12);
}

.eg-yt-search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: #e2e8f0;
    border: none;
    color: #64748b;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 11px;
}

.eg-yt-categories-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding: 6px 0 2px;
    scrollbar-width: thin;
}

.eg-yt-cat-pill {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    user-select: none;
}

.eg-yt-cat-pill:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.eg-yt-cat-pill.active {
    background: #ff0000;
    color: #ffffff;
    border-color: #ff0000;
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.3);
}

/* ================= FEATURED VIDEO BANNER ================= */
.eg-yt-featured-section {
    margin-bottom: 45px;
}

.eg-yt-featured-card {
    background: #0f172a;
    border-radius: 16px;
    overflow: hidden;
    color: #ffffff;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.eg-yt-featured-media {
    flex: 1 1 55%;
    min-width: 320px;
    position: relative;
    background: #000;
    cursor: pointer;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.eg-yt-featured-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.eg-yt-featured-card:hover .eg-yt-featured-media img {
    transform: scale(1.03);
}

.eg-yt-play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.eg-yt-play-btn {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: rgba(255, 0, 0, 0.9);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    padding-left: 4px;
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.6);
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.eg-yt-featured-card:hover .eg-yt-play-btn {
    transform: scale(1.15);
    background: #ff0000;
}

.eg-yt-featured-content {
    flex: 1 1 45%;
    min-width: 300px;
    padding: 35px 35px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.eg-yt-featured-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 0, 0, 0.2);
    color: #ff6b6b;
    border: 1px solid rgba(255, 0, 0, 0.4);
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    width: fit-content;
    margin-bottom: 12px;
}

.eg-yt-featured-title {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.35;
    color: #ffffff;
    margin: 0 0 14px;
}

.eg-yt-featured-desc {
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.eg-yt-featured-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* ================= VIDEO GRID & CARDS ================= */
.eg-yt-grid-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 25px;
}

.eg-yt-grid-title {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.eg-yt-video-card {
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.eg-yt-video-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}

.eg-yt-card-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #0f172a;
    overflow: hidden;
    cursor: pointer;
}

.eg-yt-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.eg-yt-video-card:hover .eg-yt-card-thumb img {
    transform: scale(1.05);
}

.eg-yt-card-play {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.eg-yt-video-card:hover .eg-yt-card-play {
    opacity: 1;
}

.eg-yt-card-play-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ff0000;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    padding-left: 3px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transform: scale(0.9);
    transition: transform 0.2s ease;
}

.eg-yt-video-card:hover .eg-yt-card-play-icon {
    transform: scale(1);
}

.eg-yt-card-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.3px;
}

.eg-yt-card-category {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(4px);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.eg-yt-card-body {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.eg-yt-card-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    color: #0f172a;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 44px;
}

.eg-yt-card-title a {
    color: inherit;
    text-decoration: none;
}

.eg-yt-card-title a:hover {
    color: #ff0000;
}

.eg-yt-card-desc {
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.eg-yt-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #94a3b8;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.eg-yt-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.eg-yt-btn-watch {
    background: #fee2e2;
    color: #dc2626 !important;
    border: none;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none !important;
}

.eg-yt-btn-watch:hover {
    background: #ff0000;
    color: #ffffff !important;
}

.eg-yt-btn-ext {
    color: #94a3b8;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s;
    text-decoration: none;
}

.eg-yt-btn-ext:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.eg-yt-btn-delete {
    color: #ef4444;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    font-size: 13px;
    border-radius: 4px;
    transition: background 0.2s;
}

.eg-yt-btn-delete:hover {
    background: #fee2e2;
}

/* ================= MODAL: ADD VIDEO & AUTO THUMBNAIL GRABBER ================= */
.eg-yt-modal-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    color: #fff;
    padding: 20px 25px;
    border-bottom: 2px solid #ff0000;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.eg-yt-modal-header h5 {
    color: #fff;
    margin: 0;
    font-size: 19px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.eg-yt-form-group {
    margin-bottom: 18px;
}

.eg-yt-form-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 6px;
}

.eg-yt-form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    color: #0f172a;
    transition: all 0.2s ease;
    outline: none;
}

.eg-yt-form-control:focus {
    border-color: #ff0000;
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.12);
}

/* Auto-Grab Thumbnail Preview Box */
.eg-yt-thumb-preview-box {
    background: #0f172a;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    border: 1px dashed #cbd5e1;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 12px;
    transition: all 0.2s ease;
}

.eg-yt-thumb-preview-box.has-thumb {
    border: 2px solid #10b981;
    background: #000;
    padding: 0;
}

.eg-yt-thumb-preview-box img {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    display: none;
}

.eg-yt-thumb-preview-box.has-thumb img {
    display: block;
}

.eg-yt-thumb-placeholder {
    color: #94a3b8;
    padding: 25px;
}

.eg-yt-thumb-placeholder i {
    font-size: 36px;
    color: #ff0000;
    margin-bottom: 8px;
    display: block;
}

.eg-yt-thumb-status {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(16, 185, 129, 0.9);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    display: none;
}

.eg-yt-thumb-preview-box.has-thumb .eg-yt-thumb-status {
    display: block;
}

/* ================= LIGHTBOX VIDEO PLAYER MODAL ================= */
.eg-yt-player-modal .modal-dialog {
    max-width: 900px;
}

.eg-yt-player-modal .modal-content {
    background: #000000;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    overflow: hidden;
}

.eg-yt-iframe-wrap {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
}

.eg-yt-iframe-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.eg-yt-player-info {
    padding: 20px 24px;
    background: #0f172a;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.eg-yt-player-title {
    font-size: 18px;
    font-weight: 800;
    margin: 0;
    color: #fff;
}

/* ================= EMPTY STATE ================= */
.eg-yt-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
    border-radius: 16px;
    border: 1px dashed #cbd5e1;
    margin: 20px 0;
}

.eg-yt-empty-icon {
    font-size: 48px;
    color: #ff0000;
    margin-bottom: 12px;
}

.eg-yt-empty-title {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 6px;
}

.eg-yt-empty-desc {
    color: #64748b;
    font-size: 14px;
    max-width: 480px;
    margin: 0 auto 20px;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .eg-yt-channel-card {
        padding: 20px;
        text-align: center;
        justify-content: center;
    }

    .eg-yt-channel-title {
        font-size: 22px;
        justify-content: center;
    }

    .eg-yt-stats-row {
        justify-content: center;
    }

    .eg-yt-channel-actions {
        justify-content: center;
        width: 100%;
    }

    .eg-yt-toolbar {
        padding: 16px;
        margin-top: -20px;
    }

    .eg-yt-featured-content {
        padding: 20px;
    }
}
