:root { 
  --bg: #09090b; 
  --surface: #18181b; 
  --surface-hover: #27272a;
  --border: #3f3f46; 
  --blue: #3b82f6; 
  --blue-hover: #2563eb;
  --text: #f4f4f5; 
  --dim: #a1a1aa; 
  --green: #10b981; 
  --red: #ef4444; 
  --font: 'Inter', sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: var(--font); overflow-x: hidden; }

/* Global Animations */
@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes pulseGlow {
  0% { box-shadow: 0 0 10px rgba(59, 130, 246, 0.2); }
  50% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.5); }
  100% { box-shadow: 0 0 10px rgba(59, 130, 246, 0.2); }
}

/* Auth Layout (Login) */
.auth-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; position: relative; }
.hero-bg { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -1; overflow: hidden; background: #000; }
.blob { position: absolute; filter: blur(90px); opacity: 0.5; animation: float 10s infinite ease-in-out alternate; }
.blob-1 { top: -10%; left: -10%; width: 50vw; height: 50vw; background: rgba(59, 130, 246, 0.4); border-radius: 50%; }
.blob-2 { bottom: -10%; right: -10%; width: 40vw; height: 40vw; background: rgba(139, 92, 246, 0.4); border-radius: 50%; animation-delay: -5s; }
@keyframes float { 0% { transform: translate(0, 0); } 100% { transform: translate(30px, 50px); } }

.glassmorphism {
  background: rgba(24, 24, 27, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-card { animation: fadeInScale 0.5s ease-out; border-radius: 24px; padding: 3rem; width: 100%; max-width: 440px; box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.7); }
.auth-header { text-align: center; margin-bottom: 2rem; }
.auth-header h1 { font-size: 2.2rem; font-weight: 700; color: #fff; margin-bottom: 0.5rem; letter-spacing: -1px; text-shadow: 0 2px 10px rgba(59,130,246,0.3); }
.auth-header p { color: var(--dim); font-size: 0.95rem; }

.tabs { display: flex; margin-bottom: 2rem; border-bottom: 1px solid rgba(255, 255, 255, 0.1); position: relative; }
.tab { flex: 1; padding: 0.8rem; background: none; border: none; color: var(--dim); cursor: pointer; font-size: 1rem; font-weight: 500; transition: color 0.3s; }
.tab:hover { color: #fff; }
.tab.active { color: var(--blue); position: relative; }
.tab.active::after { content: ''; position: absolute; bottom: -1px; left: 0; width: 100%; height: 2px; background: var(--blue); border-radius: 2px; box-shadow: 0 -2px 10px var(--blue); }

.auth-form { display: flex; flex-direction: column; gap: 1.2rem; }
.input-group input { width: 100%; background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(255, 255, 255, 0.08); color: #fff; padding: 1rem 1.2rem; border-radius: 12px; font-size: 0.95rem; font-family: var(--font); transition: all 0.3s; }
.input-group input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15); background: rgba(0, 0, 0, 0.5); }

.btn-primary { background: linear-gradient(135deg, var(--blue), #4f46e5); color: #fff; border: none; padding: 1rem 1.5rem; border-radius: 12px; cursor: pointer; font-size: 1rem; font-weight: 600; font-family: var(--font); transition: all 0.2s; display: inline-block; box-shadow: 0 8px 20px 0 rgba(79, 70, 229, 0.4); text-transform: uppercase; letter-spacing: 0.5px; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(79, 70, 229, 0.6); }
.btn-primary:active { transform: translateY(1px); }

.error { color: var(--red); font-size: 0.85rem; min-height: 1rem; margin-top: -0.5rem; text-align: center; }
.hidden { display: none !important; }

/* Dashboard Layout */
.dashboard-layout { display: flex; height: 100vh; overflow: hidden; background: linear-gradient(135deg, #09090b, #121214); }

/* Sidebar */
.sidebar { width: 280px; background: rgba(24,24,27,0.7); backdrop-filter: blur(10px); border-right: 1px solid rgba(255,255,255,0.05); display: flex; flex-direction: column; padding: 2rem 0; z-index: 20; }
.nav-brand { font-size: 1.6rem; font-weight: 700; padding: 0 1.5rem 2.5rem; color: #fff; letter-spacing: -0.5px; text-shadow: 0 2px 10px rgba(59,130,246,0.2); }

.sidebar-nav { display: flex; flex-direction: column; flex: 1; padding: 0 1rem; gap: 0.5rem; }
.sidebar-nav a { color: var(--dim); text-decoration: none; padding: 0.9rem 1.2rem; border-radius: 12px; font-size: 0.95rem; font-weight: 500; transition: all 0.2s; display: flex; align-items: center; gap: 1rem; border: 1px solid transparent; }
.sidebar-nav a:hover { background: rgba(255,255,255,0.03); color: #fff; transform: translateX(4px); }
.sidebar-nav a.active { background: linear-gradient(90deg, rgba(59, 130, 246, 0.15), transparent); color: var(--blue); border-left: 3px solid var(--blue); }

.storage-info { padding: 1.5rem; margin: 0 1rem; background: rgba(0, 0, 0, 0.5); border-radius: 16px; border: 1px solid rgba(255,255,255,0.08); box-shadow: inset 0 2px 10px rgba(0,0,0,0.3); }
.storage-bar { height: 8px; background: rgba(255,255,255,0.1); border-radius: 4px; overflow: hidden; margin-bottom: 1rem; }
.storage-fill { height: 100%; transition: width 1s cubic-bezier(0.4, 0, 0.2, 1); }
.storage-info p { font-size: 0.85rem; color: #e4e4e7; font-weight: 500; text-align: center; }

/* Main Content */
.main-content { flex: 1; display: flex; flex-direction: column; overflow-y: auto; position: relative; }

/* Topbar */
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 1.2rem 2.5rem; border-bottom: 1px solid rgba(255,255,255,0.05); background: rgba(9,9,11,0.6); backdrop-filter: blur(20px); position: sticky; top: 0; z-index: 10; }
.search-bar input { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255,255,255,0.1); color: #fff; padding: 0.8rem 1.2rem 0.8rem 2.8rem; border-radius: 20px; font-size: 0.9rem; font-family: var(--font); width: 340px; transition: all 0.3s; background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%23a1a1aa" viewBox="0 0 16 16"><path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z"/></svg>'); background-repeat: no-repeat; background-position: 14px center; }
.search-bar input:focus { outline: none; border-color: var(--blue); background-color: rgba(0, 0, 0, 0.4); box-shadow: 0 0 0 4px rgba(59,130,246,0.1); width: 400px; }

.nav-user { display: flex; gap: 1.2rem; align-items: center; color: #fff; font-weight: 500; }
.avatar { width: 38px; height: 38px; background: linear-gradient(135deg, #ec4899, #8b5cf6); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1rem; font-weight: 600; box-shadow: 0 4px 10px rgba(236,72,153,0.3); }
.btn-logout { background: transparent; border: 1px solid rgba(255,255,255,0.1); color: var(--dim); padding: 0.6rem 1.2rem; border-radius: 10px; cursor: pointer; transition: all 0.2s; font-family: var(--font); font-size: 0.85rem; font-weight: 600; }
.btn-logout:hover { border-color: rgba(239, 68, 68, 0.7); color: #fff; background: var(--red); box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3); }

/* Content Area */
.content-area { padding: 2.5rem; max-width: 1400px; margin: 0 auto; width: 100%; animation: fadeInScale 0.4s ease-out; }

/* Drop Zone */
.drop-zone { border: 2px dashed rgba(59, 130, 246, 0.4); border-radius: 24px; padding: 4.5rem 2rem; text-align: center; margin-bottom: 3rem; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); cursor: pointer; background: linear-gradient(180deg, rgba(59,130,246,0.02) 0%, rgba(59,130,246,0.05) 100%); }
.drop-zone:hover { border-color: var(--blue); background: linear-gradient(180deg, rgba(59,130,246,0.05) 0%, rgba(59,130,246,0.1) 100%); transform: translateY(-4px); box-shadow: 0 15px 30px -10px rgba(59,130,246,0.15); }
.drop-zone.drag-over { border-color: var(--green); background: rgba(16, 185, 129, 0.1); transform: scale(1.02); animation: pulseGlow 2s infinite; }
.upload-icon { font-size: 3.5rem; margin-bottom: 1.2rem; animation: floatIcon 3s ease-in-out infinite alternate; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.3)); }
@keyframes floatIcon { 0% { transform: translateY(0); } 100% { transform: translateY(-12px); } }
.drop-zone h2 { font-size: 1.5rem; margin-bottom: 0.6rem; color: #fff; font-weight: 700; letter-spacing: -0.5px; }
.drop-zone p { color: var(--dim); margin-bottom: 1.8rem; font-size: 1rem; }

/* Progress */
.progress-container { display: none; background: rgba(24,24,27,0.8); backdrop-filter: blur(10px); border-radius: 16px; padding: 1.5rem; margin-bottom: 2.5rem; border: 1px solid rgba(255,255,255,0.08); box-shadow: 0 10px 25px rgba(0,0,0,0.3); }
.progress-info { display: flex; justify-content: space-between; margin-bottom: 1rem; font-size: 0.95rem; font-weight: 600; color: #fff; }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.1); border-top-color: var(--blue); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress-bar { height: 10px; background: rgba(0,0,0,0.4); border-radius: 5px; overflow: hidden; box-shadow: inset 0 1px 3px rgba(0,0,0,0.5); }
.progress-fill { height: 100%; width: 50%; background: linear-gradient(90deg, var(--blue), #a855f7, var(--blue)); background-size: 200% 100%; border-radius: 5px; animation: progress 2s infinite ease-in-out, shimmer 2s infinite linear; }
@keyframes progress { 0% { width: 15%; margin-left: -15%; } 50% { width: 40%; } 100% { width: 15%; margin-left: 100%; } }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* File Grid */
.files-header { margin-bottom: 1.8rem; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 1rem; }
.files-header h2 { font-size: 1.3rem; font-weight: 600; color: #fff; letter-spacing: -0.5px; }

.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.8rem; }
.file-card { background: rgba(24,24,27,0.5); backdrop-filter: blur(5px); border: 1px solid rgba(255,255,255,0.08); border-radius: 20px; padding: 1.8rem; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; text-align: center; cursor: pointer; animation: fadeInScale 0.4s ease-out backwards; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); }
.file-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 100%; background: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0) 100%); pointer-events: none; opacity: 0; transition: opacity 0.3s; }
.file-card:hover { transform: translateY(-6px); border-color: rgba(59, 130, 246, 0.5); box-shadow: 0 20px 40px -10px rgba(0,0,0,0.4); background: rgba(39,39,42,0.8); }
.file-card:hover::before { opacity: 1; }
.file-icon { font-size: 4rem; margin-bottom: 1.2rem; filter: drop-shadow(0 8px 12px rgba(0,0,0,0.3)); transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
.file-card:hover .file-icon { transform: scale(1.15) rotate(2deg); }
.file-name { font-size: 0.95rem; font-weight: 600; color: #fff; word-break: break-word; margin-bottom: 0.6rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { font-size: 0.85rem; color: var(--dim); margin-bottom: 1.5rem; font-weight: 500; }

.file-actions { display: flex; gap: 0.8rem; width: 100%; opacity: 0; transform: translateY(15px); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.file-card:hover .file-actions { opacity: 1; transform: translateY(0); }
.file-actions button { flex: 1; font-size: 0.85rem; font-weight: 600; padding: 0.7rem; border-radius: 10px; border: none; cursor: pointer; font-family: var(--font); transition: all 0.2s; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
.btn-download { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.2); }
.btn-download:hover { background: var(--blue); color: #fff; }
.btn-delete { background: rgba(239, 68, 68, 0.1); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.2); }
.btn-delete:hover { background: var(--red); color: #fff; }