/**
 * Shared Styles for all pages
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 50%, #16213e 100%);
    min-height: 100vh;
    color: #fff;
}

/* ========== NAVIGATION ========== */
.top-nav {
    background: rgba(15, 15, 26, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: #fff;
}

.nav-logo {
    height: 32px;
    width: auto;
}

.nav-brand h1 {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 10px;
}

.nav-link {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateY(-2px);
}

.nav-link.active {
    background: linear-gradient(135deg, #1e5799 0%, #2989d8 100%);
    border-color: #4a90d9;
    color: #fff;
}

.nav-link.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #764ba2;
    color: #fff;
}

.nav-link.primary:hover {
    box-shadow: 0 4px 15px rgba(118, 75, 162, 0.4);
}

/* ========== PAGE CONTAINER ========== */
.page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
}

.page-subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    margin-top: 5px;
}

/* ========== SEARCH BAR ========== */
.search-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-input {
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    width: 300px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #4a90d9;
    background: rgba(255, 255, 255, 0.08);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* ========== GRID ========== */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

/* ========== CARD ========== */
.item-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.item-card:hover {
    transform: translateY(-5px);
    border-color: rgba(74, 144, 217, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.item-card-image {
    width: 100%;
    aspect-ratio: 9/16;
    object-fit: cover;
    background: rgba(0, 0, 0, 0.2);
}

.item-card-body {
    padding: 20px;
}

.item-card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.item-card-mode {
    padding: 4px 10px;
    background: rgba(74, 144, 217, 0.2);
    border-radius: 6px;
    text-transform: capitalize;
}

.item-card-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-card {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-card-primary {
    background: linear-gradient(135deg, #1e5799 0%, #2989d8 100%);
    color: #fff;
}

.btn-card-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(41, 137, 216, 0.4);
}

.btn-card-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

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

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center;
    padding: 80px 40px;
    color: rgba(255, 255, 255, 0.4);
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.empty-state-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.6);
}

.empty-state-text {
    font-size: 14px;
    margin-bottom: 25px;
}

/* ========== STATS ========== */
.stats-bar {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.stat-value {
    font-weight: 600;
    color: #fff;
}

/* ========== MODAL ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: linear-gradient(180deg, #1e1e2e 0%, #15151f 100%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #fff;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-footer .btn {
    flex: 1;
}

/* ========== BUTTONS ========== */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #1e5799 0%, #2989d8 100%);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(41, 137, 216, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    color: #fff;
}

.btn-danger:hover {
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

/* ========== PREVIEW MODAL ========== */
.preview-modal .modal {
    max-width: 400px;
}

.preview-image {
    width: 100%;
    border-radius: 12px;
}

/* ========== LOADING ========== */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: rgba(255, 255, 255, 0.5);
}

.loading::after {
    content: '';
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #4a90d9;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== FILTER TABS ========== */
.filter-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-tab {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.filter-tab.active {
    background: linear-gradient(135deg, #1e5799 0%, #2989d8 100%);
    border-color: #4a90d9;
    color: #fff;
    box-shadow: 0 4px 15px rgba(41, 137, 216, 0.3);
}

/* ========== VIDEO THUMBNAILS ========== */
.video-thumbnail {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.item-card-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
}

.item-card:hover .play-overlay {
    background: rgba(74, 144, 217, 0.8);
    transform: translate(-50%, -50%) scale(1.1);
}

/* ========== TYPE BADGES ========== */
.type-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.type-badge.photo {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.type-badge.video {
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.video-card {
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.video-card:hover {
    border-color: rgba(168, 85, 247, 0.6);
}
