/* ─── Premium Design System ─── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --bg: #050508;
    --bg-alt: #0a0a10;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-hover: rgba(255, 255, 255, 0.06);
    
    --accent: #9333ea;
    --accent-glow: rgba(147, 51, 234, 0.35);
    --accent-2: #06b6d4;
    
    --text: #f8fafc;
    --text-muted: #94a3b8;
    
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    
    --transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.8);
    
    --gradient-1: linear-gradient(135deg, #9333ea 0%, #06b6d4 100%);
    --gradient-dark: linear-gradient(135deg, rgba(147, 51, 234, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
}

/* ─── Base Styles ─── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* ─── Background Effects ─── */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 10% 10%, rgba(147, 51, 234, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 90% 90%, rgba(6, 182, 212, 0.08) 0%, transparent 40%);
    pointer-events: none;
    z-index: -1;
}

.bg-orbs {
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
    opacity: 0.5;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    animation: float 20s infinite alternate ease-in-out;
}

@keyframes float {
    from { transform: translate(0, 0) rotate(0deg) scale(1); }
    to { transform: translate(100px, 100px) rotate(360deg) scale(1.2); }
}

.orb:nth-child(1) { width: 40vw; height: 40vw; background: rgba(147, 51, 234, 0.1); top: -10%; left: -10%; }
.orb:nth-child(2) { width: 30vw; height: 30vw; background: rgba(6, 182, 212, 0.1); bottom: -10%; right: -10%; animation-delay: -5s; }
.orb:nth-child(3) { width: 20vw; height: 20vw; background: rgba(147, 51, 234, 0.05); top: 50%; left: 50%; animation-delay: -10s; }

/* ─── Layout ─── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ─── Navbar ─── */
.navbar {
    position: sticky;
    top: 0;
    height: 54px;
    display: flex;
    align-items: center;
    background: rgba(5, 5, 8, 0.9);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 1000;
}

.navbar::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.3;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--gradient-1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 0 15px var(--accent-glow);
}

.navbar-brand h1 {
    font-size: 1.1rem;
    font-weight: 800;
    color: white;
    letter-spacing: -0.5px;
}

.navbar-links {
    display: flex;
    gap: 12px;
}

.navbar-links a {
    padding: 6px 14px;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 8px;
    transition: var(--transition);
}

.navbar-links a:hover, .navbar-links a.active {
    color: white;
    background: rgba(255, 255, 255, 0.06);
}

.navbar-search {
    flex: 1;
    max-width: 360px;
    margin: 0 30px;
}

.navbar-search form {
    position: relative;
    width: 100%;
}

.navbar-search input {
    width: 100%;
    padding: 8px 16px;
    padding-right: 40px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: white;
    font-size: 0.85rem;
    outline: none;
    transition: var(--transition);
}

.navbar-search input:focus {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
}

.navbar-search button {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    opacity: 0.6;
    transition: var(--transition);
}

.navbar-search button:hover {
    opacity: 1;
}

/* ─── Hero ─── */
.hero {
    padding: 80px 0 60px;
    text-align: center;
}

.hero h2 {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 20px;
    letter-spacing: -2px;
    line-height: 1.1;
}

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

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* ─── Showcase (Featured) ─── */
.showcase {
    padding: 40px 0;
}

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

.section-header h3 {
    font-size: 1.75rem;
    font-weight: 800;
}

.slider-controls {
    display: flex;
    gap: 10px;
}

.slider-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: var(--glass);
    color: white;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.showcase-viewport {
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 20px;
}

.showcase-viewport::-webkit-scrollbar { display: none; }

.showcase-track {
    display: flex;
    gap: 30px;
}

/* ─── Showcase Card ─── */
.showcase-card {
    min-width: 350px;
    background: var(--bg-alt);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
}

.showcase-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 10px 40px rgba(147, 51, 234, 0.2);
}

.showcase-image {
    height: 200px;
    position: relative;
    overflow: hidden;
}

.showcase-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.showcase-card:hover .showcase-image img {
    transform: scale(1.1);
}

.showcase-zoom-hint {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    font-weight: 600;
}

.showcase-card:hover .showcase-zoom-hint {
    opacity: 1;
}

.showcase-content {
    padding: 24px;
    flex: 1;
}

.showcase-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.showcase-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.showcase-meta {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    color: var(--accent-2);
    font-weight: 600;
}

.showcase-footer {
    padding: 15px 24px 24px;
}

.btn-showcase-download {
    display: block;
    width: 100%;
    padding: 14px;
    text-align: center;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: white;
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
}

.showcase-card:hover .btn-showcase-download {
    background: var(--gradient-1);
    border-color: transparent;
    box-shadow: 0 5px 20px var(--accent-glow);
}

/* ─── Portal Layout ─── */
.portal-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    margin-top: 60px;
    padding-bottom: 100px;
}

/* ─── File Card ─── */
.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.file-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.file-card:hover {
    background: var(--bg-alt);
    border-color: var(--accent);
    transform: translateY(-5px);
}

.file-card-thumb {
    height: 180px;
    margin: -24px -24px 20px -24px;
    position: relative;
    overflow: hidden;
}

.file-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.file-card:hover .file-card-thumb img {
    transform: scale(1.05);
}

.card-platform-icons {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
}

.card-platform-icons span {
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
}

.file-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.file-icon-mini {
    font-size: 24px;
}

.file-name {
    font-size: 1.1rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-meta-row {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-2);
    margin-bottom: 12px;
}

.file-short-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.file-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--glass-border);
}

.stars-mini {
    color: #fbbf24;
    font-size: 12px;
}

.btn-go-detail {
    text-decoration: none;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
}

.file-card:hover .btn-go-detail {
    background: var(--accent);
    border-color: var(--accent);
}

/* ─── Sidebar ─── */
.portal-sidebar {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.sidebar-widget {
    background: var(--bg-alt);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mini-file-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mini-file-item {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    padding: 10px;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.mini-file-item:hover {
    background: var(--glass);
    transform: translateX(5px);
}

.mini-rank {
    font-size: 1.5rem;
    font-weight: 900;
    opacity: 0.1;
    min-width: 30px;
}

.mini-title {
    font-weight: 600;
    color: white;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.mini-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cat-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--glass);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.cat-item:hover {
    color: white;
    background: var(--accent);
}

.cat-count {
    opacity: 0.5;
}

/* ─── Empty State ─── */
.empty-state {
    text-align: center;
    padding: 80px 40px;
    background: var(--bg-alt);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* ─── Footer ─── */
.footer {
    padding: 60px 0;
    text-align: center;
    border-top: 1px solid var(--glass-border);
}

.footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ─── Lightbox ─── */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px;
    flex-direction: column;
}

.lightbox img {
    max-width: 90%;
    max-height: 80vh;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 80px rgba(0,0,0,0.5);
}

.lightbox-caption {
    margin-top: 24px;
    font-size: 1.25rem;
    font-weight: 600;
}

.close-lightbox {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 40px;
    cursor: pointer;
    opacity: 0.5;
    transition: var(--transition);
}

.close-lightbox:hover { opacity: 1; }

/* ─── Responsive ─── */
@media (max-width: 1024px) {
    .portal-layout {
        grid-template-columns: 1fr;
    }
    .navbar-search {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero h2 { font-size: 2.5rem; }
    .showcase-card { min-width: 300px; }
}

/* ─── Flash Messages ─── */
.flash-messages {
    position: fixed;
    top: 100px;
    right: 24px;
    z-index: 1001;
}

.flash-msg {
    padding: 16px 24px;
    background: var(--bg-alt);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.flash-msg.success { border-left: 4px solid #10b981; }
.flash-msg.error { border-left: 4px solid #ef4444; }

/* ─── Gallery Page ─── */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    padding-bottom: 80px;
}

.gallery-item {
    background: var(--bg-alt);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
}

.gallery-item:hover {
    border-color: var(--accent);
    transform: translateY(-8px);
}

.gallery-img-wrapper {
    height: 220px;
    position: relative;
    overflow: hidden;
}

.gallery-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover .gallery-img-wrapper img {
    transform: scale(1.1);
}

.gallery-info {
    padding: 24px;
}

.gallery-category {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--accent-2);
    letter-spacing: 1px;
    display: block;
    margin-bottom: 8px;
}

.gallery-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.gallery-download-btn {
    display: inline-block;
    padding: 8px 16px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
}

.gallery-item:hover .gallery-download-btn {
    background: var(--gradient-1);
    border-color: transparent;
}
