/* ========================================
   CyberVault - Cyber Security Theme
   ======================================== */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #0f0f18;
    --bg-card: #12121e;
    --bg-card-hover: #181828;
    --accent: #00ff41;
    --accent-dim: #00cc33;
    --accent-glow: rgba(0, 255, 65, 0.15);
    --accent-glow-strong: rgba(0, 255, 65, 0.3);
    --text-primary: #e0e0e0;
    --text-secondary: #888;
    --text-muted: #555;
    --border: #1a1a2e;
    --border-light: #252540;
    --danger: #ff3333;
    --font-main: 'Rajdhani', 'Segoe UI', sans-serif;
    --font-mono: 'Share Tech Mono', 'Courier New', monospace;
}

/* Reset */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: all 0.3s; }
a:hover { color: var(--accent-dim); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; width: 100%; }

/* ========== HEADER ========== */
.site-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 20px 0;
    position: relative;
    overflow: hidden;
}

.header-bg-grid {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        linear-gradient(rgba(0, 255, 65, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 65, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

.scan-line {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    animation: scanline 4s linear infinite;
}

@keyframes scanline {
    0% { opacity: 0.3; }
    50% { opacity: 1; }
    100% { opacity: 0.3; }
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-primary);
}
.logo:hover { color: var(--text-primary); }

.logo-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-glow);
    border: 1px solid var(--accent);
    border-radius: 10px;
    font-size: 22px;
    color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
}

.logo-text h1 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 3px;
    line-height: 1;
    color: var(--accent);
}

.tagline {
    font-size: 12px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    letter-spacing: 1px;
}

.header-nav { display: flex; align-items: center; gap: 20px; }

.nav-stat {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--text-secondary);
    background: rgba(0, 255, 65, 0.05);
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 4px;
}
.nav-stat i { color: var(--accent); margin-right: 6px; }

/* ========== BREADCRUMB ========== */
.breadcrumb {
    padding: 14px 0;
    font-size: 14px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.3);
}
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { margin: 0 10px; color: var(--text-muted); }
.breadcrumb .current { color: var(--accent); }

/* ========== MAIN CONTENT ========== */
.main-content {
    flex: 1;
    padding: 40px 0;
}

.section-title {
    margin-bottom: 30px;
}
.section-title h2 {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 2px;
}
.section-title .accent { color: var(--accent); }
.title-line {
    width: 60px;
    height: 2px;
    background: var(--accent);
    margin-top: 8px;
    box-shadow: 0 0 10px var(--accent-glow);
}

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

.file-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.35s ease;
    position: relative;
}
.file-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.35s;
}
.file-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 255, 65, 0.08);
}
.file-card:hover::before { opacity: 1; }

.file-card-link { display: block; color: var(--text-primary); }
.file-card-link:hover { color: var(--text-primary); }

.file-card-preview {
    height: 180px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.file-card-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.file-card-icon {
    font-size: 48px;
    color: var(--accent);
    opacity: 0.5;
}
.file-type-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 3px;
    border: 1px solid var(--border);
}

.file-card-info {
    padding: 18px;
}
.file-card-info h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.3;
}
.file-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.5;
}
.file-meta {
    display: flex;
    gap: 18px;
    font-size: 13px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}
.file-meta i { color: var(--accent); margin-right: 5px; font-size: 12px; }

/* ========== FILE DETAIL ========== */
.file-detail {
    max-width: 800px;
    margin: 0 auto;
}

.file-detail-header {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.file-detail-preview {
    width: 250px;
    min-height: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.file-detail-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.file-detail-icon {
    font-size: 64px;
    color: var(--accent);
    opacity: 0.4;
}

.file-detail-info { flex: 1; }
.file-detail-info h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.2;
}
.file-detail-desc {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 15px;
    line-height: 1.7;
}

.file-specs {
    display: grid;
    gap: 10px;
}
.spec {
    display: flex;
    align-items: center;
    font-size: 14px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}
.spec-label {
    width: 120px;
    color: var(--text-muted);
    flex-shrink: 0;
}
.spec-value {
    color: var(--text-primary);
    font-family: var(--font-mono);
}
.spec-value code {
    background: var(--accent-glow);
    color: var(--accent);
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 13px;
}

.file-actions {
    display: flex;
    gap: 14px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 6px;
    font-family: var(--font-main);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
    letter-spacing: 1px;
    text-decoration: none;
}
.btn-primary {
    background: var(--accent);
    color: var(--bg-primary);
}
.btn-primary:hover {
    background: var(--accent-dim);
    color: var(--bg-primary);
    box-shadow: 0 0 20px var(--accent-glow-strong);
}
.btn-outline {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
}
.btn-outline:hover {
    background: var(--accent-glow);
    color: var(--accent);
}
.btn-lg {
    padding: 14px 32px;
    font-size: 17px;
}
.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

/* ========== RAW URL BOX ========== */
.raw-url-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}
.raw-url-box label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: block;
    font-family: var(--font-mono);
}
.url-copy {
    display: flex;
    gap: 10px;
}
.url-copy input {
    flex: 1;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 4px;
    outline: none;
}
.url-copy input:focus { border-color: var(--accent); }

/* ========== PAGINATION ========== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}
.page-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 14px;
    font-family: var(--font-mono);
    transition: all 0.3s;
}
.page-link:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.page-link.active {
    background: var(--accent);
    color: var(--bg-primary);
    border-color: var(--accent);
}

/* ========== ERROR / EMPTY ========== */
.error-section, .empty-section {
    text-align: center;
    padding: 80px 20px;
}
.error-code {
    font-size: 80px;
    font-weight: 700;
    color: var(--accent);
    font-family: var(--font-mono);
    line-height: 1;
    margin-bottom: 10px;
    text-shadow: 0 0 30px var(--accent-glow);
}
.error-section h2, .empty-section h2 {
    font-size: 24px;
    margin-bottom: 10px;
}
.error-section p, .empty-section p {
    color: var(--text-secondary);
    margin-bottom: 25px;
}
.empty-section i {
    font-size: 60px;
    color: var(--border-light);
    margin-bottom: 20px;
    display: block;
}

/* ========== FOOTER ========== */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 25px 0;
    margin-top: auto;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.footer-brand {
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 2px;
}
.footer-content p {
    color: var(--text-muted);
    font-size: 13px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .header-content { flex-direction: column; gap: 12px; text-align: center; }
    .files-grid { grid-template-columns: 1fr; }
    .file-detail-header { flex-direction: column; }
    .file-detail-preview { width: 100%; min-height: 200px; }
    .footer-content { flex-direction: column; gap: 10px; text-align: center; }
    .file-actions { flex-direction: column; }
    .btn-lg { width: 100%; justify-content: center; }
    .url-copy { flex-direction: column; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .logo-text h1 { font-size: 20px; }
    .file-detail-info h2 { font-size: 22px; }
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.file-card {
    animation: fadeInUp 0.5s ease forwards;
}
.file-card:nth-child(2) { animation-delay: 0.05s; }
.file-card:nth-child(3) { animation-delay: 0.1s; }
.file-card:nth-child(4) { animation-delay: 0.15s; }
.file-card:nth-child(5) { animation-delay: 0.2s; }
.file-card:nth-child(6) { animation-delay: 0.25s; }
