/* --- MODERN FLOATING SEARCH --- */
.search-container {
    padding: 10px 20px 15px 20px;
    position: sticky;
    top: 0;
    z-index: 5;
    background: rgba(245, 247, 250, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(0,0,0,0.02);
}

.search-box-inner {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 14px 45px;
    border-radius: 20px;
    border: 2px solid #E5E5EA;
    background: #ffffff;
    font-size: 14px;
    font-weight: 600;
    color: #1C1C1E;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}

.search-input:focus {
    border-color: #007AFF;
    box-shadow: 0 4px 20px rgba(0, 122, 255, 0.15);
    outline: none;
    transform: translateY(-2px);
}

.search-icon {
    position: absolute;
    left: 16px; top: 50%;
    transform: translateY(-50%);
    color: #8E8E93;
    font-size: 16px;
}

.clear-search {
    position: absolute;
    right: 16px; top: 50%;
    transform: translateY(-50%);
    background: #F2F2F7;
    border: none;
    width: 24px; height: 24px;
    border-radius: 50%;
    color: #8E8E93;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: 0.2s;
}
.clear-search.hidden { opacity: 0; pointer-events: none; transform: translateY(-50%) scale(0.8); }

/* --- PREMIUM COURSE CARD --- */
.course-card {
    background: #ffffff;
    border-radius: 24px;
    margin: 0 20px 25px 20px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.03);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    animation: slideUpFade 0.5s ease backwards;
}

.course-card:active {
    transform: scale(0.97);
    box-shadow: 0 5px 15px rgba(0,0,0,0.04);
}

@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- BANNER AREA --- */
.course-banner {
    position: relative;
    width: 100%;
    height: 180px;
    background: #1C1C1E;
    overflow: hidden;
}

.course-banner img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.course-card:hover .course-banner img {
    transform: scale(1.05);
}

/* Gradient Overlay for Text Readability if needed */
.course-banner::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; width: 100%; height: 40%;
    background: linear-gradient(to top, rgba(0,0,0,0.4), transparent);
}

.status-badge-corner {
    position: absolute;
    top: 12px; right: 12px;
    padding: 6px 12px;
    border-radius: 14px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 2;
}
.badge-unlocked { background: rgba(52, 199, 89, 0.9); color: white; }
.badge-locked { background: rgba(28, 28, 30, 0.8); color: white; border: 1px solid rgba(255,255,255,0.2); }

/* --- COURSE INFO --- */
.course-info { padding: 18px 20px 10px 20px; }

.course-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.tag {
    background: #eef2ff; color: #007AFF;
    padding: 5px 12px; border-radius: 10px;
    font-size: 10px; font-weight: 800; text-transform: uppercase;
}

.course-title {
    font-size: 18px; font-weight: 800;
    color: #1C1C1E; line-height: 1.3; margin-bottom: 4px; letter-spacing: -0.5px;
}
.course-meta { font-size: 12px; color: #8E8E93; font-weight: 600; }

/* --- PLAYLIST STYLES (The Squircle Look) --- */
.course-playlist { padding: 0 16px 16px 16px; display: flex; flex-direction: column; gap: 8px; }

.playlist-item {
    display: flex; align-items: center; gap: 14px;
    padding: 12px; border-radius: 16px;
    background: #FAFAFC; border: 1px solid rgba(0,0,0,0.03);
    transition: all 0.2s ease;
}

.playlist-item.playable { cursor: pointer; }
.playlist-item.playable:hover { background: #ffffff; box-shadow: 0 4px 12px rgba(0,0,0,0.04); }
.playlist-item.playable:active { transform: scale(0.98); background: #f0f7ff; border-color: rgba(0, 122, 255, 0.2); }

.playlist-item.locked { opacity: 0.6; background: #F2F2F7; filter: grayscale(50%); pointer-events: none; }

.play-icon {
    width: 36px; height: 36px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; flex-shrink: 0;
}
.playable .play-icon { background: #eef2ff; color: #007AFF; }
.locked .play-icon { background: #E5E5EA; color: #8E8E93; }

.vid-details { flex: 1; overflow: hidden; }
.vid-title {
    font-size: 13px; font-weight: 700; color: #1C1C1E;
    margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vid-duration {
    font-size: 11px; color: #8E8E93; font-weight: 600;
    display: flex; align-items: center; gap: 8px;
}

.free-badge {
    background: #FF9500; color: white;
    padding: 3px 6px; border-radius: 6px;
    font-size: 9px; font-weight: 800; letter-spacing: 0.5px;
}

/* --- PREMIUM ACTIVATE BUTTON --- */
.premium-activate-btn {
    background: linear-gradient(135deg, #AF52DE 0%, #5856D6 100%); /* Purple/Deep Blue gradient looks rich */
    color: white; width: 100%; border: none; padding: 18px;
    font-size: 14px; font-weight: 800; cursor: pointer;
    display: flex; justify-content: center; align-items: center; gap: 10px;
    transition: opacity 0.2s;
    letter-spacing: 0.5px; text-transform: uppercase;
}
.premium-activate-btn:active { opacity: 0.8; }

/* --- SKELETON LOADERS --- */
.skeleton-card {
    background: #ffffff; border-radius: 24px;
    margin: 0 20px 25px 20px; overflow: hidden;
    border: 1px solid rgba(0,0,0,0.03);
}
.skeleton-banner { width: 100%; height: 180px; background: #E5E5EA; }
.skeleton-text { background: #E5E5EA; border-radius: 8px; height: 14px; }
.pulse { animation: pulseAnim 1.5s infinite ease-in-out; }
@keyframes pulseAnim {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

/* --- ACTUAL VIDEO PLAYER MODAL --- */
.video-modal-content {
    background: #000; /* Pitch black for cinematic feel */
    width: 100%; padding: 0;
    border-radius: 24px 24px 0 0;
    overflow: hidden;
}
.video-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 20px; background: #111; border-bottom: 1px solid #333;
}
.video-header h3 {
    color: white; font-size: 14px; font-weight: 700;
    margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.video-header .modal-close-x {
    position: relative; top: 0; right: 0; background: #333; color: white;
}
.iframe-wrapper {
    position: relative; width: 100%; padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
}
.iframe-wrapper iframe {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none;
}

/* --- ACTIVATION BOTTOM SHEET FIXES --- */
.activation-header { text-align: center; margin-bottom: 20px; }
.lock-icon-circle {
    width: 60px; height: 60px; background: #eef2ff; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; color: #007AFF; margin: 0 auto 15px;
}
.activation-header h3 { font-size: 20px; font-weight: 800; color: #1C1C1E; margin-bottom: 5px; }
.activation-header p { font-size: 13px; color: #8E8E93; }
.price-display { font-size: 32px; font-weight: 900; color: #1C1C1E; text-align: center; margin-bottom: 25px; letter-spacing: -1px; }
.modern-input {
    width: 100%; padding: 18px; border: 2px solid #E5E5EA; border-radius: 16px;
    font-size: 16px; font-weight: 700; background: #FAFAFC; text-align: center;
    text-transform: uppercase; letter-spacing: 1px; transition: 0.2s; outline: none;
}
.modern-input:focus { border-color: #007AFF; background: white; }



/* === WATERMARK OVERLAY === */
.watermark-overlay {
    position: fixed; 
    top: -50vh; 
    left: -50vw; 
    width: 200vw; 
    height: 200vh;
    z-index: 9999;
    pointer-events: none;
    display: flex; 
    flex-wrap: wrap; 
    justify-content: center; 
    align-content: center;
    transform: rotate(-30deg); 
    opacity: 0.04; 
    mix-blend-mode: multiply;
}

.watermark-item {
    width: 200px; 
    height: 100px; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-weight: 900; 
    font-size: 16px; 
    color: #000; 
    text-transform: uppercase;
}










.custom-player-frame {
    background: #000;
    border: 8px solid #ffffff; /* Desktop-style border */
    border-radius: 32px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    width: 95% !important;
    max-width: 800px !important;
    position: relative;
    overflow: hidden;
}

.video-internal-watermark {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    font-weight: 900;
    font-size: 22px;
    color: rgba(255,255,255,0.07);
    pointer-events: none;
    z-index: 5;
    text-transform: uppercase;
}

.gesture-layer {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex;
    z-index: 4;
}

.tap-zone { flex: 1; height: 100%; }

.custom-controls {
    background: #111;
    padding: 15px 20px;
    border-top: 1px solid #333;
}