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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f1f5f9;
  color: #1e293b;
  line-height: 1.5;
}

/* Top Bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.brand {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

/* Breadcrumb Navigation */
#breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  margin-bottom: 12px;
}

#breadcrumbs button {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e2e8f0;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
}

#breadcrumbs button:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

#breadcrumbs span {
  color: rgba(255, 255, 255, 0.5);
  margin: 0 2px;
}

/* Main Container */
.container {
  display: flex;
  gap: 20px;
  padding: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

/* File Browser */
.browser {
  flex: 1;
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

/* Parent Directory Button */
.parent-dir-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border: 2px dashed #cbd5e1;
  color: #475569;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 16px;
  width: 100%;
  justify-content: center;
  transition: all 0.2s ease;
}

.parent-dir-btn:hover {
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
  border-color: #94a3b8;
  color: #1e293b;
}

.parent-dir-btn .icon {
  font-size: 18px;
}

/* File List */
.file-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
  background: #fff;
}

.file-row:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.file-row .icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 20px;
}

.file-row.dir .icon {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.file-row.file .icon {
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
}

.file-row .name {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
  color: #1e293b;
}

.file-row .meta {
  color: #64748b;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.file-row .meta .count {
  background: #f1f5f9;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  color: #64748b;
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
    padding: 16px;
  }
  
  .topbar {
    padding: 12px 16px;
  }
  
  #breadcrumbs {
    font-size: 12px;
    margin-bottom: 8px;
  }
  
  .file-row {
    padding: 12px;
  }
}

/* Login Modal */
#login-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

#login-modal.visible {
  display: flex;
}

.login-box {
  background: #fff;
  padding: 32px 40px;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 380px;
}

.login-box h2 {
  margin-bottom: 24px;
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  color: #0f172a;
}

.login-box input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 15px;
  margin-bottom: 16px;
  transition: border-color 0.2s;
}

.login-box input:focus {
  outline: none;
  border-color: #3b82f6;
}

.login-box button {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.login-box button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.login-error {
  color: #ef4444;
  font-size: 13px;
  margin-top: 12px;
  text-align: center;
  display: none;
}

.login-error.visible {
  display: block;
}

#logout-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e2e8f0;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}

#logout-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}
