/* "기타사랑" 클라우드 라이브러리 - 프리미엄 스타일시트 */

:root {
    /* Color Palette */
    --bg-darker: #0c0f16;
    --bg-dark: #131722;
    --bg-card: rgba(30, 36, 53, 0.4);
    --bg-card-hover: rgba(43, 52, 77, 0.7);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-hover: rgba(255, 255, 255, 0.15);
    
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --accent-purple: #8b5cf6;
    --accent-purple-hover: #7c3aed;
    --accent-purple-glow: rgba(139, 92, 246, 0.35);
    
    --accent-green: #10b981;
    --accent-green-hover: #059669;
    --accent-green-glow: rgba(16, 185, 129, 0.3);
    
    --accent-orange: #f59e0b;
    --accent-orange-glow: rgba(245, 158, 11, 0.3);
    
    --accent-blue: #3b82f6;
    --accent-blue-glow: rgba(59, 130, 246, 0.3);

    --danger: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.3);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --glass-blur: blur(12px);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-darker);
    color: var(--text-primary);
    font-family: var(--font-body);
    overflow-x: hidden;
    min-height: 100vh;
}

select, input, textarea {
    font-family: inherit;
    color: inherit;
}

/* App Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: var(--bg-dark);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 24px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 10;
}

.sidebar-header {
    margin-bottom: 32px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #a78bfa 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-icon {
    font-size: 24px;
    color: var(--accent-purple);
    -webkit-text-fill-color: initial;
}

.sidebar-header .subtitle {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 4px;
    padding-left: 2px;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.menu-item {
    background: none;
    border: none;
    padding: 12px 16px;
    border-radius: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: var(--transition-smooth);
}

.menu-item:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.03);
}

.menu-item.active {
    color: var(--text-primary);
    background-color: var(--accent-purple-glow);
    border: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.menu-item i {
    font-size: 16px;
}

.sidebar-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 24px 0;
}

.sidebar-filters {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex-grow: 1;
}

.filter-group-title {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-field label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-field select {
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    font-size: 13px;
    color: var(--text-primary);
    outline: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.filter-field select:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 2px var(--accent-purple-glow);
}

.filter-field select option {
    background-color: var(--bg-dark);
    color: var(--text-primary);
}

.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.user-profile-info {
    display: flex;
    flex-direction: column;
    padding: 10px 12px;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 10px;
}

.user-profile-info .user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.user-profile-info .user-role {
    font-size: 11px;
    font-weight: 500;
    color: var(--accent-purple);
    margin-top: 2px;
}

/* Main Content */
.main-content {
    flex-grow: 1;
    padding: 40px;
    overflow-y: auto;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header & Search */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
}

.search-wrapper {
    position: relative;
    flex-grow: 1;
    max-width: 720px;
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
}

#search-input {
    width: 100%;
    background-color: rgba(30, 36, 53, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 14px 18px 14px 48px;
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition-smooth);
}

#search-input:focus {
    background-color: rgba(30, 36, 53, 0.8);
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px var(--accent-purple-glow);
}

.clear-search-btn {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    transition: var(--transition-smooth);
}

.clear-search-btn:hover {
    color: var(--text-primary);
}

.header-stats {
    display: flex;
    align-items: center;
}

.stat-badge {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
}

.stat-badge .stat-label {
    color: var(--text-secondary);
    margin-right: 4px;
}

.stat-badge .stat-value {
    color: var(--accent-purple);
    font-weight: 700;
    margin: 0 2px;
}

/* Stats Cards Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition-smooth);
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-color-hover);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.stat-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-icon-wrapper.purple {
    background-color: rgba(139, 92, 246, 0.1);
    color: var(--accent-purple);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.stat-icon-wrapper.green {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.stat-icon-wrapper.orange {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--accent-orange);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.stat-info h4 {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 2px;
}

.stat-info p {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Active Filters Bar */
.active-filters-bar {
    background-color: rgba(139, 92, 246, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.active-filters-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.active-filters-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-chip {
    background-color: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.25);
    color: var(--text-primary);
    border-radius: 30px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-chip button {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 12px;
    padding: 0;
}

.filter-chip button:hover {
    color: var(--danger);
}

.btn-clear-all-filters {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    margin-left: auto;
    transition: var(--transition-smooth);
}

.btn-clear-all-filters:hover {
    color: var(--danger);
    text-decoration: underline;
}

/* Buttons */
.btn {
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition-smooth);
}

.btn-primary {
    background-color: var(--accent-purple);
    color: #ffffff;
    box-shadow: 0 4px 14px var(--accent-purple-glow);
}

.btn-primary:hover {
    background-color: var(--accent-purple-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px var(--accent-purple-glow);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--border-color-hover);
}

.btn-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 16px;
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn-download:hover {
    background-color: rgba(16, 185, 129, 0.28);
}

.btn-warning {
    background-color: rgba(245, 158, 11, 0.15);
    color: var(--accent-orange);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
    background-color: rgba(245, 158, 11, 0.25);
}

.btn-danger {
    background-color: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background-color: rgba(239, 68, 68, 0.25);
}

.btn-block {
    width: 100%;
}

/* Video Grid & Loader */
.video-grid-section {
    flex-grow: 1;
    position: relative;
    min-height: 300px;
}

.loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--text-secondary);
}

.loader i {
    font-size: 40px;
    color: var(--accent-purple);
    margin-bottom: 12px;
}

.no-results {
    text-align: center;
    color: var(--text-muted);
    padding: 80px 20px;
}

.no-results i {
    font-size: 48px;
    margin-bottom: 16px;
}

.no-results h3 {
    color: var(--text-secondary);
    font-size: 18px;
    margin-bottom: 6px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* Video Card */
.video-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
    position: relative;
    backdrop-filter: var(--glass-blur);
}

.video-card:hover {
    transform: translateY(-4px);
    background-color: var(--bg-card-hover);
    border-color: var(--border-color-hover);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.video-card-thumbnail {
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, rgba(88, 28, 135, 0.4) 0%, rgba(30, 58, 138, 0.4) 100%);
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
}

/* 섬네일 없을 때 곡명 표시 */
.video-card-thumbnail .thumb-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
}

.video-card-thumbnail .thumb-placeholder i {
    font-size: 2rem;
    color: rgba(139, 92, 246, 0.6);
}

.video-card-thumbnail .thumb-title {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    text-align: center;
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-card:hover .video-card-thumbnail {
    background: linear-gradient(135deg, rgba(109, 40, 217, 0.5) 0%, rgba(29, 78, 216, 0.5) 100%);
}

.video-card-thumbnail .play-icon-overlay {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background-color: rgba(139, 92, 246, 0.9);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    padding-left: 4px;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.5);
    opacity: 0.8;
    transform: scale(0.9);
    transition: var(--transition-smooth);
}

.video-card:hover .play-icon-overlay {
    opacity: 1;
    transform: scale(1);
    background-color: var(--accent-purple);
    box-shadow: 0 6px 18px rgba(139, 92, 246, 0.7);
}

.video-card-thumbnail .icon-placeholder {
    position: absolute;
    font-size: 40px;
    color: rgba(255, 255, 255, 0.08);
    transition: var(--transition-smooth);
}

.video-card:hover .icon-placeholder {
    color: rgba(255, 255, 255, 0.12);
}

.video-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: rgba(16, 185, 129, 0.85);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 30px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(4px);
}

.video-card-badge.raw {
    background-color: rgba(59, 130, 246, 0.8);
}

.video-card-content {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.video-card-title {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 42px;
}

.video-card-singer {
    font-size: 13px;
    color: var(--accent-purple);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.video-card-singer.unassigned {
    color: var(--text-muted);
    font-weight: 400;
}

.video-card-footer {
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.video-card-date {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.video-card-actions {
    display: flex;
    gap: 6px;
}

.card-action-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: var(--transition-smooth);
}

.card-action-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.card-action-btn.edit-btn:hover {
    color: var(--accent-purple);
    background-color: rgba(139, 92, 246, 0.1);
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal.active,
.modal.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(8, 10, 16, 0.8);
    backdrop-filter: blur(8px);
}

.modal-container {
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    width: 90%;
    max-width: 1080px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 102;
    transform: scale(0.95);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.modal.active .modal-container,
.modal.open .modal-container {
    transform: scale(1);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-badge {
    background-color: var(--accent-green-glow);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.2);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 30px;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    transition: var(--transition-smooth);
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body-layout {
    display: flex;
    flex-grow: 1;
    overflow: hidden;
    height: 100%;
}

.modal-video-section {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background-color: #000000;
    overflow-y: auto;
}

.video-player-container {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16/9;
    max-height: 55vh;
}

#html5-video-player {
    width: 100%;
    height: auto;
    max-height: 55vh;
    object-fit: contain;
    outline: none;
}

.video-meta-summary {
    padding: 24px;
    background-color: var(--bg-dark);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    border-top: 1px solid var(--border-color);
}

.meta-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.meta-value {
    font-size: 13px;
    font-weight: 500;
}

.meta-value.highlight {
    color: var(--accent-purple);
    font-weight: 700;
}

/* Edit Panel inside Modal */
.modal-edit-section {
    width: 320px;
    border-left: 1px solid var(--border-color);
    padding: 24px;
    overflow-y: auto;
    background-color: rgba(30, 36, 53, 0.15);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.modal-edit-section h4 {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
}

.edit-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.4;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.form-group label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input, .form-group textarea {
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    font-size: 13px;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition-smooth);
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 2px var(--accent-purple-glow);
}

.form-group textarea {
    resize: none;
}

/* Toast System */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background-color: var(--bg-dark);
    border: 1px solid var(--accent-green);
    color: var(--text-primary);
    border-radius: 12px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1000;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}

.toast.active {
    opacity: 1;
    transform: translateY(0);
}

.toast-icon {
    font-size: 18px;
    color: var(--accent-green);
}

.toast-message {
    font-size: 13px;
    font-weight: 500;
}

/* Custom Thin Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background-color: rgba(255, 255, 255, 0.01);
}

::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* AI Analysis Card Styles */
.video-ai-analysis {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(59, 130, 246, 0.08) 100%);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 16px;
    padding: 20px 24px;
    margin: 0 24px 24px 24px;
    backdrop-filter: var(--glass-blur);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
}

.ai-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.ai-glowing-icon {
    color: var(--accent-purple);
    filter: drop-shadow(0 0 5px var(--accent-purple-glow));
    animation: pulseGlow 2s infinite ease-in-out;
}

.ai-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ai-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ai-badge-item {
    font-size: 12px;
    font-weight: 600;
    background-color: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: var(--text-primary);
    padding: 4px 12px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ai-badge-item i {
    color: var(--accent-purple);
}

.ai-description {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

@keyframes pulseGlow {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 3px var(--accent-purple-glow));
    }
    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 8px var(--accent-purple));
    }
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 3px var(--accent-purple-glow));
    }
}

/* Authentication Interface */
.auth-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
    overflow-y: auto;
    padding: 20px;
}

.auth-card {
    background-color: rgba(30, 36, 53, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    width: 100%;
    max-width: 440px;
    padding: 40px;
    backdrop-filter: var(--glass-blur);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo-icon {
    font-size: 40px;
    color: var(--accent-purple);
    margin-bottom: 16px;
    filter: drop-shadow(0 0 10px var(--accent-purple-glow));
}

.auth-header h2 {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.auth-header p {
    font-size: 13px;
    color: var(--text-secondary);
}

.auth-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.auth-form-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.auth-form-group input {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition-smooth);
}

.auth-form-group input:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 2px var(--accent-purple-glow);
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 13px;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--accent-purple);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Admin Member Management CSS */
.admin-section {
    padding: 20px 0;
}

.admin-header {
    margin-bottom: 30px;
}

.admin-header h2 {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-header p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.table-container {
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow-x: auto;
}

.user-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 14px;
}

.user-table th, .user-table td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
}

.user-table th {
    background-color: rgba(255, 255, 255, 0.01);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-table tr:last-child td {
    border-bottom: none;
}

.user-table tr:hover td {
    background-color: rgba(255, 255, 255, 0.01);
}

/* User Status Badges */
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 30px;
}

.status-badge.approved {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-badge.pending {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--accent-orange);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-badge.blocked {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ── 모바일 반응형 ── */
@media (max-width: 900px) {

    /* 앱 레이아웃 */
    .app-container { flex-direction: column; }

    /* 사이드바: 상단 고정 컴팩트 바 */
    .sidebar {
        width: 100%;
        height: auto;
        position: sticky;
        top: 0;
        z-index: 50;
        padding: 12px 16px;
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px;
    }
    .sidebar-header { flex: 1; min-width: 120px; }
    .sidebar-header .logo { font-size: 1.1rem; }
    .sidebar-header .subtitle { display: none; }
    .sidebar-menu {
        display: flex;
        flex-direction: row;
        gap: 6px;
    }
    .menu-item {
        padding: 8px 14px;
        font-size: 0.9rem;
        border-radius: 20px;
    }
    .sidebar-divider { display: none; }
    .sidebar-filters { display: none; } /* 필터는 검색창으로 대체 */
    .sidebar-footer {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-top: 6px;
        border-top: 1px solid var(--border-color);
    }
    .user-profile-info { flex-direction: row; gap: 8px; align-items: center; }
    .user-name { font-size: 1rem; }
    .user-role { font-size: 0.85rem; }
    #btn-logout { width: auto; padding: 8px 16px; font-size: 0.9rem; }

    /* 메인 영역 */
    .main-content {
        padding: 14px;
        height: auto;
        overflow-y: visible;
    }

    /* 검색창 크게 */
    .search-wrapper { padding: 10px 14px; }
    #search-input { font-size: 1.05rem; }

    /* 통계 뱃지 */
    .header-stats { font-size: 1rem; }
    .stat-value { font-size: 1.1rem; }

    /* 대시보드 카드 */
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat-card { padding: 14px; }
    .stat-card h4 { font-size: 1.6rem; }
    .stat-card p { font-size: 0.9rem; }

    /* 영상 그리드: 모바일은 2열 */
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .video-title { font-size: 1rem; }
    .video-singer, .video-date { font-size: 0.9rem; }

    /* 모달: 전체화면 */
    .modal-container {
        width: 100vw;
        height: 100vh;
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }
    .modal-body-layout {
        flex-direction: column;
        overflow-y: auto;
        flex: 1;
    }
    .modal-edit-section {
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--border-color);
        padding: 16px;
    }
    .modal-edit-section label { font-size: 1rem; }
    .modal-edit-section input,
    .modal-edit-section textarea { font-size: 1rem; padding: 12px; }
    .modal-title { font-size: 1.1rem; }

    /* 영상 플레이어 - 모바일에서 먼저 보이도록 */
    .modal-video-section {
        min-height: 60vw;
        flex-shrink: 0;
    }
    .video-player-container {
        min-height: 50vw;
        max-height: 56vw;
    }
    #html5-video-player {
        min-height: 50vw;
        max-height: 56vw;
    }

    /* 영상 메타 정보 */
    .video-meta-summary { padding: 10px 14px; }
    .meta-label { font-size: 0.95rem; }
    .meta-value { font-size: 1rem; }

    /* AI 분석 블록 모바일에서 숨김 (복잡도 제거) */
    .video-ai-analysis { display: none; }

    /* 다운로드 버튼 크게 */
    .btn-download { font-size: 1rem; padding: 14px; margin-top: 10px; }

    /* 저장 버튼 크게 */
    .modal-edit-section .btn-primary { font-size: 1rem; padding: 14px; }

    /* 관리자 테이블 */
    .table-container { overflow-x: auto; }
    .user-table { font-size: 0.9rem; }
    .btn-sm { font-size: 0.85rem; padding: 6px 10px; }
}

/* 아주 작은 폰 (360px 이하) */
@media (max-width: 400px) {
    .video-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
}
