/* ================================================================
   ENTERTAINMENT HUB
   ================================================================ */

/* ----------------------------------------------------------------
   §34. ENTERTAINMENT HUB MODAL
   ---------------------------------------------------------------- */
.entertainment-modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2500;
    align-items: center;
    justify-content: center;
    padding: clamp(8px, 2vw, 24px);
}
.entertainment-modal.active { display: flex; }
.ent-container {
    background: #fff;
    border-radius: var(--radius);
    border: 2px solid var(--color-border);
    width: 100%;
    max-width: 1100px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
    animation: entSlideIn 0.3s ease;
}
@keyframes entSlideIn {
    from { opacity: 0; transform: scale(0.95) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.ent-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: clamp(12px, 1.8vw, 20px) clamp(14px, 2vw, 24px);
    border-bottom: 2px solid var(--color-border);
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
    flex-shrink: 0;
}
.ent-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: clamp(0.95rem, 1.5vw, 1.35rem);
    font-weight: 800;
    color: var(--color-text);
}
.ent-header-title .ent-badge {
    font-size: clamp(0.45rem, 0.6vw, 0.65rem);
    background: #dc3545;
    color: #fff;
    padding: 2px 10px;
    border-radius: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.ent-tabs {
    display: flex;
    border-bottom: 2px solid var(--color-border);
    background: var(--color-bg-card);
    flex-shrink: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.ent-tabs::-webkit-scrollbar { display: none; }
.ent-tab {
    flex: 1;
    min-width: 100px;
    padding: clamp(10px, 1.3vw, 16px) clamp(12px, 1.5vw, 20px);
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-family: inherit;
    font-weight: 700;
    font-size: clamp(0.7rem, 0.9vw, 0.9rem);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}
.ent-tab:hover { background: rgba(230, 180, 44, 0.06); color: var(--color-text); }
.ent-tab.active { color: var(--color-primary-dark); border-bottom-color: var(--color-primary); background: #fff; }
.ent-tab-count {
    font-size: clamp(0.55rem, 0.7vw, 0.7rem);
    background: var(--color-bg-alt);
    color: var(--color-text-muted);
    padding: 1px 8px;
    border-radius: 10px;
    font-weight: 700;
}
.ent-tab.active .ent-tab-count { background: var(--color-primary); color: var(--color-text); }
.ent-actions {
    display: flex;
    gap: clamp(6px, 0.8vw, 10px);
    padding: clamp(10px, 1.3vw, 16px) clamp(14px, 2vw, 24px);
    border-bottom: 1px solid var(--color-border);
    background: #fff;
    flex-wrap: wrap;
    flex-shrink: 0;
}
.ent-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: clamp(8px, 1vh, 10px) clamp(12px, 1.4vw, 18px);
    background: var(--color-primary);
    color: var(--color-text);
    border: 2px solid var(--color-primary-dark);
    border-radius: 8px;
    font-family: inherit;
    font-weight: 700;
    font-size: clamp(0.65rem, 0.8vw, 0.8rem);
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 40px;
}
.ent-upload-btn:hover { background: var(--color-primary-light); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(230, 180, 44, 0.3); }
.ent-upload-btn.admin { background: var(--color-text); color: #fff; border-color: #000; }
.ent-upload-btn.admin:hover { background: #333; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); }
.ent-search-box {
    flex: 1;
    min-width: 180px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-bg-alt);
    transition: border-color 0.2s ease;
}
.ent-search-box:focus-within { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(230, 180, 44, 0.15); }
.ent-search-box i { color: var(--color-text-muted); font-size: 0.85rem; }
.ent-search-box input {
    flex: 1;
    padding: 10px 0;
    border: none;
    background: transparent;
    outline: none;
    font-family: inherit;
    font-size: clamp(0.7rem, 0.85vw, 0.85rem);
    color: var(--color-text);
    min-height: 40px;
}
.ent-content {
    flex: 1;
    overflow-y: auto;
    padding: clamp(14px, 2vw, 24px);
    background: var(--color-bg-alt);
    min-height: 250px;
}
.ent-panel { display: none; }
.ent-panel.active { display: block; }
.ent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: clamp(10px, 1.2vw, 16px);
}
.ent-card {
    background: #fff;
    border: 2px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
}
.ent-card:hover { transform: translateY(-4px); border-color: var(--color-primary); box-shadow: 0 12px 30px rgba(230, 180, 44, 0.2); }
.ent-card-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #2b2b2b, #1a1a1a);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.ent-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ent-card-thumb .ent-type-icon { font-size: clamp(2rem, 4vw, 3rem); color: rgba(255, 255, 255, 0.85); z-index: 1; }
.ent-card-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.7));
    pointer-events: none;
}
.ent-card-play {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 48px; height: 48px;
    border-radius: 50%;
    background: rgba(230, 180, 44, 0.95);
    color: var(--color-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 2;
}
.ent-card:hover .ent-card-play { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
.ent-card-source {
    position: absolute;
    top: 8px; right: 8px;
    font-size: 0.55rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    z-index: 2;
}
.ent-card-source.admin { background: #16a34a; }
.ent-card-source.user { background: #2563eb; }
.ent-card-body { padding: clamp(8px, 1vw, 12px); display: flex; flex-direction: column; gap: 4px; flex: 1; }
.ent-card-title {
    font-size: clamp(0.7rem, 0.85vw, 0.85rem);
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ent-card-artist { font-size: clamp(0.55rem, 0.7vw, 0.7rem); color: var(--color-text-muted); font-weight: 600; }
.ent-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    font-size: clamp(0.5rem, 0.6vw, 0.6rem);
    color: var(--color-text-muted);
    opacity: 0.75;
}
.ent-empty {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: clamp(30px, 6vw, 60px) 20px;
    text-align: center;
    color: var(--color-text-muted);
}
.ent-empty i { font-size: clamp(2rem, 4vw, 3rem); opacity: 0.3; }
.ent-empty p { font-size: clamp(0.7rem, 0.9vw, 0.9rem); font-weight: 600; }
.ent-empty.show { display: flex; }
.ent-footer {
    padding: clamp(8px, 1vh, 12px) clamp(14px, 2vw, 24px);
    border-top: 1px solid var(--color-border);
    background: var(--color-bg-card);
    text-align: center;
    flex-shrink: 0;
}
.ent-footer-note {
    font-size: clamp(0.55rem, 0.7vw, 0.7rem);
    color: var(--color-text-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ----------------------------------------------------------------
   §35. ENTERTAINMENT UPLOAD MODAL
   ---------------------------------------------------------------- */
.ent-upload-modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2600;
    align-items: center;
    justify-content: center;
    padding: clamp(8px, 2vw, 24px);
}
.ent-upload-modal.active { display: flex; }
.upload-container {
    background: #fff;
    border-radius: var(--radius);
    border: 2px solid var(--color-border);
    width: 100%;
    max-width: 520px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
    animation: entSlideIn 0.3s ease;
}
.upload-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: clamp(12px, 1.6vw, 18px) clamp(14px, 2vw, 22px);
    border-bottom: 2px solid var(--color-border);
    background: var(--color-bg-card);
    position: sticky;
    top: 0;
    z-index: 1;
    border-radius: var(--radius) var(--radius) 0 0;
}
.upload-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
    color: var(--color-primary-dark);
}
#uploadForm { padding: clamp(14px, 1.8vw, 22px); }
.file-drop-zone {
    border: 2px dashed var(--color-border);
    border-radius: var(--radius);
    padding: clamp(16px, 2.5vw, 28px) 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    background: var(--color-bg-alt);
}
.file-drop-zone:hover,
.file-drop-zone.drag-over { border-color: var(--color-primary); background: rgba(230, 180, 44, 0.08); }
.file-drop-zone i {
    font-size: clamp(1.5rem, 2.5vw, 2.2rem);
    color: var(--color-primary-dark);
    margin-bottom: 8px;
    display: block;
}
.file-drop-zone p { font-size: clamp(0.7rem, 0.85vw, 0.85rem); color: var(--color-text); font-weight: 600; margin-bottom: 4px; }
.file-drop-zone .browse-link { color: var(--color-accent); text-decoration: underline; cursor: pointer; }
.file-drop-zone small { font-size: clamp(0.5rem, 0.65vw, 0.65rem); color: var(--color-text-muted); display: block; }
.file-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
    padding: 10px 12px;
    background: rgba(34, 197, 94, 0.08);
    border: 2px solid rgba(34, 197, 94, 0.3);
    border-radius: 8px;
}
.file-preview-info { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.file-preview-info > i { font-size: 1.3rem; color: #16a34a; flex-shrink: 0; }
.file-preview-info > div { display: flex; flex-direction: column; min-width: 0; }
.file-preview-name {
    font-size: clamp(0.65rem, 0.8vw, 0.8rem);
    font-weight: 700;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.file-preview-size { font-size: clamp(0.5rem, 0.65vw, 0.65rem); color: var(--color-text-muted); }
.file-remove-btn {
    background: transparent;
    border: none;
    color: #dc3545;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s ease;
    flex-shrink: 0;
}
.file-remove-btn:hover { background: rgba(220, 53, 69, 0.1); }
.upload-progress {
    margin: 12px 0;
    position: relative;
    height: 22px;
    background: var(--color-bg-alt);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--color-border);
}
.upload-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
    transition: width 0.15s linear;
    border-radius: 12px;
}
.upload-progress-text {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(0.55rem, 0.7vw, 0.7rem);
    font-weight: 700;
    color: var(--color-text);
}
.upload-status {
    padding: 10px 12px;
    border-radius: 8px;
    font-size: clamp(0.65rem, 0.8vw, 0.8rem);
    margin: 8px 0;
    font-weight: 600;
}
.upload-status.success { background: #d4edda; color: #155724; border: 2px solid #c3e6cb; }
.upload-status.error { background: #f8d7da; color: #721c24; border: 2px solid #f5c6cb; }
.upload-actions { display: flex; gap: 8px; margin-top: 12px; }
.upload-submit-btn,
.upload-cancel-btn {
    padding: clamp(10px, 1.2vh, 14px) clamp(14px, 1.5vw, 20px);
    border-radius: 8px;
    font-family: inherit;
    font-weight: 700;
    font-size: clamp(0.7rem, 0.85vw, 0.85rem);
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.upload-submit-btn {
    flex: 1;
    background: var(--color-primary);
    color: var(--color-text);
    border: 2px solid var(--color-primary-dark);
}
.upload-submit-btn:hover { background: var(--color-primary-light); transform: translateY(-1px); }
.upload-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.upload-cancel-btn {
    background: var(--color-bg-alt);
    color: var(--color-text-muted);
    border: 2px solid var(--color-border);
}
.upload-cancel-btn:hover { background: #e2e6ea; color: var(--color-text); }