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

body {
    display: flex;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    background: radial-gradient(circle at top, #0f172a, #020617);
    color: #e5e7eb;
    height: 100vh;
    overflow: hidden;
}

/* =========================
   SIDEBAR
========================= */
.sidebar {
    width: 250px;
    height: 100vh;
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255,255,255,0.05);
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 4px;
    color: white;
    margin-bottom: 40px;
}

/* Nav */
.nav-item {
    padding: 12px 15px;
    border-radius: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    opacity: 0.7;
}

.nav-item:hover {
    background: rgba(59,130,246,0.15);
    opacity: 1;
    transform: translateX(5px);
}

.nav-item.active {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    opacity: 1;
}

/* Storage */
.storage {
    font-size: 0.8rem;
    opacity: 0.8;
}

.bar {
    height: 8px;
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
    margin: 10px 0;
    overflow: hidden;
}

.used {
    width: 20%;
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    border-radius: 10px;
}

/* =========================
   MAIN
========================= */
.main {
    flex: 1;
    padding: 30px 40px;
    position: relative;
}

/* Topbar */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.top-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.topbar h1 {
    font-size: 1.8rem;
}

/* Search */
.search {
    padding: 10px 15px;
    border-radius: 12px;
    border: none;
    background: rgba(255,255,255,0.05);
    color: white;
    outline: none;
    width: 250px;
    transition: 0.2s;
}

.search:focus {
    background: rgba(255,255,255,0.08);
}

/* Actions */
.top-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Upload button */
.upload-btn {
    padding: 10px 18px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(59,130,246,0.4);
}

/* Avatar */
.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #9333ea);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
}

/* =========================
   OVERLAY DRAG
========================= */
.overlay {
    position: absolute;
    inset: 0;
    background: rgba(2,6,23,0.85);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
}

.overlay.show {
    opacity: 1;
    pointer-events: all;
}

.overlay-box {
    border: 2px dashed #3b82f6;
    padding: 60px;
    border-radius: 20px;
    text-align: center;
    font-size: 1.3rem;
}

/* =========================
   EMPTY STATE
========================= */
.empty {
    position: absolute;
    top: 45%;
    left: 55%;
    transform: translate(-50%, -50%);
    text-align: center;
    opacity: 0.6;
}

.empty h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

/* =========================
   GRID
========================= */
.grid {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
}

/* File card */
.file {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 18px;
    border-radius: 18px;
    text-align: center;
    position: relative;
    transition: all 0.25s ease;
    backdrop-filter: blur(10px);
}

.file:hover {
    transform: translateY(-6px) scale(1.02);
    background: rgba(255,255,255,0.07);
}

/* Icon */
.file-icon {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

/* Name */
.file-name {
    font-size: 0.8rem;
    margin-bottom: 10px;
    word-break: break-word;
    opacity: 0.9;
}

/* Actions */
.file-actions {
    position: absolute;
    top: 8px;
    right: 8px;
}

.file-actions button {
    background: rgba(255,0,0,0.2);
    border: none;
    color: white;
    padding: 5px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}

.file-actions button:hover {
    background: rgba(255,0,0,0.5);
}

/* Progress */
.progress-bar {
    height: 5px;
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 10px;
}

.progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #22c55e, #4ade80);
    transition: width 0.3s ease;
}

/* Remove animation */
.file.remove {
    opacity: 0;
    transform: scale(0.8);
    transition: 0.3s;
}

/* =========================
   TOAST
========================= */
.toast {
    position: absolute;
    bottom: 30px;
    right: 30px;
    background: rgba(15,23,42,0.9);
    padding: 12px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    opacity: 0;
    transform: translateY(20px);
    transition: 0.3s;
    backdrop-filter: blur(10px);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}