/* Global variables and styles */
:root {
    --bg-dark: #080b11;
    --card-bg: rgba(16, 22, 35, 0.65);
    --border-color: rgba(255, 255, 255, 0.08);
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --hover-gradient: linear-gradient(135deg, #4f46e5 0%, #9333ea 100%);
    --danger-gradient: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --accent-glow: 0 0 20px rgba(99, 102, 241, 0.3);
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Plus Jakarta Sans', 'Outfit', sans-serif;
    overflow-x: hidden;
}

body {
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Ambient glow backgrounds */
.glow-bg-1 {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 50%;
    height: 60%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: -2;
    pointer-events: none;
    filter: blur(80px);
}

.glow-bg-2 {
    position: absolute;
    bottom: 5%;
    right: -10%;
    width: 60%;
    height: 65%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.12) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: -2;
    pointer-events: none;
    filter: blur(100px);
}

/* Layout wrapper */
.main-content-wrapper {
    flex: 1;
    margin-top: 2rem;
}

/* Glassmorphic Navbar */
.navbar-custom {
    background: rgba(10, 15, 26, 0.7) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 10;
}

.logo-icon-wrapper {
    background: var(--primary-gradient);
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    box-shadow: var(--accent-glow);
}

.logo-icon {
    color: #fff;
    font-size: 1.1rem;
}

.logo-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: -0.5px;
    color: #ffffff;
}

.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.navbar-custom .nav-link {
    color: var(--text-muted) !important;
    font-weight: 500;
    padding: 0.6rem 1.2rem !important;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-custom .nav-link:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.05);
}

.navbar-custom .nav-link.active {
    color: #fff !important;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.nav-icon {
    font-size: 1.1rem;
}

/* Glassmorphic Card Container */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.1);
}

/* Heading styles */
.section-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 2.2rem;
    letter-spacing: -0.5px;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 2rem;
}

/* Drag & Drop Upload Zone */
.upload-zone {
    border: 2px dashed rgba(99, 102, 241, 0.3);
    background: rgba(99, 102, 241, 0.02);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: #a855f7;
    background: rgba(168, 85, 247, 0.05);
    box-shadow: 0 0 25px rgba(168, 85, 247, 0.15);
    transform: translateY(-2px);
}

.upload-icon-wrapper {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: all 0.3s ease;
}

.upload-zone:hover .upload-icon-wrapper {
    background: var(--primary-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: var(--accent-glow);
    transform: scale(1.08);
}

.upload-icon {
    font-size: 2rem;
    color: #6366f1;
    transition: color 0.3s ease;
}

.upload-zone:hover .upload-icon {
    color: #fff;
}

.upload-zone h4 {
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.upload-zone p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.file-input {
    display: none;
}

/* Premium Gradient Button */
.btn-gradient {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
    box-shadow: var(--accent-glow);
    transition: all 0.3s ease;
}

.btn-gradient:hover {
    background: var(--hover-gradient);
    color: white;
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.5);
    transform: translateY(-1px);
}

.btn-gradient:active {
    transform: translateY(1px);
}

.btn-gradient:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    box-shadow: none;
    transform: none;
    cursor: not-allowed;
}

/* Progress bar styling */
.progress-container {
    display: none;
    margin-top: 1.5rem;
}

.progress-bar-custom {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--primary-gradient);
    border-radius: 10px;
    transition: width 0.1s linear;
}

.progress-status {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Live Preview Area */
.preview-container {
    display: none;
    margin-top: 1.5rem;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    position: relative;
    max-height: 350px;
    background: #04060a;
}

.preview-media {
    width: 100%;
    max-height: 350px;
    object-fit: contain;
    display: block;
}

.remove-preview-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
}

.remove-preview-btn:hover {
    background: rgba(239, 68, 68, 0.9);
}

/* Status Notifications */
.alert-custom {
    background: rgba(16, 22, 35, 0.8);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-custom-success {
    border-color: rgba(34, 197, 94, 0.3);
    background: rgba(34, 197, 94, 0.05);
}

.alert-custom-success i {
    color: #22c55e;
}

.alert-custom-error {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.05);
}

.alert-custom-error i {
    color: #ef4444;
}

/* Media Gallery Styles */
.gallery-filter-bar {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 2.5rem;
}

.btn-filter {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.6rem 1.5rem;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-filter:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
    transform: translateY(-1px);
}

.btn-filter.active {
    background: var(--primary-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: var(--accent-glow);
}

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

.gallery-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 250px;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
}

.media-thumbnail-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    cursor: pointer;
    background: #05070a;
}

.media-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover .media-thumbnail {
    transform: scale(1.05);
}

.media-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(8, 11, 17, 0.9) 0%, rgba(8, 11, 17, 0.2) 60%, rgba(0,0,0,0) 100%);
    opacity: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.2rem;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .media-overlay {
    opacity: 1;
}

.media-type-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    z-index: 2;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 4px;
}

.badge-image {
    color: #6366f1;
}

.badge-video {
    color: #a855f7;
}

.media-details {
    color: white;
}

.media-name {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.media-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 54px;
    height: 54px;
    background: rgba(168, 85, 247, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
    z-index: 2;
    pointer-events: none;
}

.gallery-item:hover .video-play-btn {
    background: #a855f7;
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 0 25px rgba(168, 85, 247, 0.6);
}

.media-delete-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(239, 68, 68, 0.8);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 3;
}

.gallery-item:hover .media-delete-btn {
    opacity: 1;
}

.media-delete-btn:hover {
    background: #ef4444;
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
}

/* Lightbox Modal Styles */
.modal-custom .modal-content {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
}

.modal-custom .modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1.2rem 1.5rem;
}

.modal-custom .modal-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

.modal-custom .btn-close {
    filter: invert(1) grayscale(1) brightness(2);
}

.modal-custom .modal-body {
    padding: 0;
    background: #020408;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.lightbox-img, .lightbox-video {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    display: block;
}

.modal-custom .modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
}

/* Footer style */
.footer-custom {
    background: rgba(8, 11, 17, 0.8);
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    z-index: 2;
}

.text-muted-custom {
    color: #6b7280;
}

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

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

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

::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.3);
}

/* Empty State Styling */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 3.5rem;
    color: rgba(99, 102, 241, 0.2);
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    color: white;
    font-weight: 600;
    margin-bottom: 0.5rem;
}