:root {
    --bg-base: #070913;
    --bg-surface: #121826;
    --bg-card: rgba(22, 30, 46, 0.85);
    --bg-hover: rgba(30, 41, 59, 0.95);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(56, 189, 248, 0.4);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent-cyan: #38bdf8;
    --accent-indigo: #6366f1;
    --accent-emerald: #10b981;
    --accent-amber: #f59e0b;
}

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

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--bg-base);
    color: var(--text-main);
    min-height: 100vh;
    padding: 30px 20px;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(56, 189, 248, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(99, 102, 241, 0.08) 0%, transparent 40%);
    background-attachment: fixed;
}

.wrapper { max-width: 1500px; margin: 0 auto; }

.hero-header { text-align: center; margin-bottom: 35px; }

.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 18px;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 50px;
    color: var(--accent-cyan);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 15px;
}

.hero-header h1 {
    font-size: 38px;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.hero-header p { color: var(--text-muted); font-size: 16px; }

.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; background: rgba(56, 189, 248, 0.12); color: var(--accent-cyan);
}

.stat-info h4 { font-size: 22px; font-weight: 700; color: var(--text-main); }
.stat-info p { font-size: 13px; color: var(--text-muted); }

.control-center {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 35px;
}

.search-group { position: relative; margin-bottom: 20px; }
.search-group input {
    width: 100%; background: rgba(7, 9, 19, 0.8);
    border: 1px solid var(--border-color); border-radius: 14px;
    padding: 16px 54px 16px 20px; font-size: 16px; color: var(--text-main);
    font-family: 'Cairo', sans-serif; outline: none; transition: 0.3s;
}
.search-group input:focus { border-color: var(--accent-cyan); box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.15); }
.search-icon-pos { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 20px; }

.filters-scroll { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.filter-btn {
    background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border-color);
    color: var(--text-muted); padding: 10px 20px; border-radius: 12px;
    font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: 0.25s; font-family: 'Cairo', sans-serif;
}
.filter-btn:hover { background: rgba(255, 255, 255, 0.07); color: var(--text-main); }
.filter-btn.active { background: var(--accent-cyan); border-color: var(--accent-cyan); color: #070913; font-weight: 700; }

.folders-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 24px; }
.folder-card {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: 20px; padding: 24px; display: flex; flex-direction: column;
    justify-content: space-between; transition: 0.35s; position: relative; overflow: hidden;
}
.folder-card:hover { transform: translateY(-6px); background: var(--bg-hover); border-color: var(--border-glow); box-shadow: 0 20px 40px -15px rgba(0,0,0,0.6); }

.card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.folder-emoji {
    width: 52px; height: 52px; border-radius: 14px; background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.2); display: flex; align-items: center; justify-content: center; font-size: 26px;
}
.category-tag {
    font-size: 12px; padding: 5px 12px; border-radius: 20px; background: rgba(99, 102, 241, 0.12);
    color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.25); font-weight: 600;
}
.folder-name { font-size: 17px; font-weight: 700; color: var(--text-main); margin-bottom: 8px; }
.files-preview-count { font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }

.card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-top: 18px; border-top: 1px solid var(--border-color); margin-top: 20px; }
.btn {
    padding: 11px 16px; border-radius: 12px; font-size: 14px; font-weight: 600;
    cursor: pointer; border: none; text-decoration: none; display: inline-flex;
    align-items: center; justify-content: center; gap: 8px; transition: 0.25s; font-family: 'Cairo', sans-serif;
}
.btn-inspect { grid-column: span 2; background: rgba(16, 185, 129, 0.12); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.btn-inspect:hover { background: var(--accent-emerald); color: #fff; }
.btn-open { background: rgba(255, 255, 255, 0.04); color: var(--text-main); border: 1px solid var(--border-color); }
.btn-open:hover { background: rgba(255, 255, 255, 0.1); }
.btn-copy { background: var(--accent-cyan); color: #070913; font-weight: 700; }
.btn-copy.copied { background: var(--accent-emerald); color: #fff; }

.modal-backdrop {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(3, 5, 12, 0.85); backdrop-filter: blur(12px); z-index: 3000;
    display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: 0.3s; padding: 20px;
}
.modal-backdrop.active { opacity: 1; pointer-events: all; }
.explorer-modal {
    background: #0f172a; border: 1px solid rgba(56, 189, 248, 0.3); border-radius: 24px;
    width: 100%; max-width: 750px; box-shadow: 0 25px 60px rgba(0,0,0,0.8); overflow: hidden; display: flex; flex-direction: column;
}
.explorer-header { background: #1e293b; padding: 24px 28px; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; }
.modal-close-btn {
    background: rgba(255, 255, 255, 0.08); border: none; color: var(--text-muted);
    width: 36px; height: 36px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.modal-close-btn:hover { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
.explorer-body { padding: 28px; max-height: 55vh; overflow-y: auto; }
.file-item {
    background: rgba(22, 30, 46, 0.6); border: 1px solid var(--border-color);
    border-radius: 12px; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px;
}
.explorer-footer { background: #111827; padding: 20px 28px; border-top: 1px solid var(--border-color); display: flex; gap: 12px; }

.toast-alert {
    position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(100px);
    background: var(--accent-emerald); color: #fff; padding: 14px 28px; border-radius: 50px;
    font-size: 15px; font-weight: 700; opacity: 0; transition: 0.3s; z-index: 4000; display: flex; align-items: center; gap: 10px;
}
.toast-alert.show { transform: translateX(-50%) translateY(0); opacity: 1; }
