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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  min-height: 100vh;
  color: #e2e8f0;
}

.screen {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.screen.active {
  display: block;
  animation: fadeIn 0.3s ease-in-out forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.3s ease-in-out;
}

.loading-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.loading-content {
  text-align: center;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(56, 189, 248, 0.2);
  border-top-color: #38bdf8;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-text {
  color: #38bdf8;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Upload Loading Overlay */
.upload-loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease-in-out;
}

.upload-loading.active {
  display: flex;
}

.upload-loading-content {
  text-align: center;
  padding: 45px 50px;
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  border: 1px solid rgba(56, 189, 248, 0.2);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4),
              0 0 0 1px rgba(56, 189, 248, 0.1);
  min-width: 320px;
}

.upload-spinner {
  width: 80px;
  height: 80px;
  border: 5px solid rgba(56, 189, 248, 0.2);
  border-top-color: #38bdf8;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 24px;
}

#uploadLoadingText {
  color: #f1f5f9;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

#uploadLoadingSubtext {
  color: #94a3b8;
  font-size: 14px;
}

/* Auth Screen Styles */
.auth-container {
  max-width: 440px;
  margin: 100px auto;
  padding: 50px 45px;
  background: rgba(30, 41, 59, 0.5);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3),
              0 0 0 1px rgba(56, 189, 248, 0.05);
  border: 1px solid rgba(56, 189, 248, 0.1);
}

.auth-container h1 {
  text-align: center;
  margin-bottom: 12px;
  color: #f1f5f9;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.auth-form {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.auth-form.active {
  display: block;
  animation: fadeIn 0.3s ease forwards;
}

.auth-form h2 {
  text-align: center;
  margin-bottom: 24px;
  color: #f1f5f9;
  font-weight: 600;
  font-size: 22px;
}

.auth-form input {
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 16px;
  border: 1px solid rgba(56, 189, 248, 0.2);
  background: rgba(15, 23, 42, 0.5);
  color: #f1f5f9;
  border-radius: 10px;
  font-size: 15px;
  transition: all 0.3s;
}

.auth-form input:focus {
  outline: none;
  border-color: #38bdf8;
  background: rgba(15, 23, 42, 0.7);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
}

.auth-form button {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  letter-spacing: 0.3px;
}

.auth-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(56, 189, 248, 0.3);
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
}

.toggle-auth {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: #94a3b8;
}

.toggle-auth a {
  color: #38bdf8;
  text-decoration: none;
  font-weight: 600;
}

.toggle-auth a:hover {
  color: #0ea5e9;
}

/* File Panel Styles */
.navbar {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  padding: 16px 0;
  border-bottom: 1px solid rgba(56, 189, 248, 0.1);
}

.navbar-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar h1 {
  color: #f1f5f9;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-info span {
  color: #94a3b8;
  font-weight: 500;
  font-size: 14px;
}

#logoutBtn {
  padding: 9px 18px;
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
  letter-spacing: 0.3px;
  font-size: 13px;
}

#logoutBtn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.3);
  transform: translateY(-1px);
}

.container {
  max-width: 1200px;
  margin: 32px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 24px;
}

/* Upload Section */
.upload-section {
  background: rgba(30, 41, 59, 0.4);
  backdrop-filter: blur(20px);
  padding: 28px;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(56, 189, 248, 0.1);
  height: fit-content;
}

.upload-section h2 {
  margin-bottom: 20px;
  color: #f1f5f9;
  font-weight: 600;
  font-size: 20px;
}

.file-input-wrapper {
  margin-bottom: 16px;
  position: relative;
}

.file-input-wrapper input[type="file"] {
  display: none;
}

.file-label {
  display: block;
  padding: 48px 24px;
  border: 2px dashed rgba(56, 189, 248, 0.3);
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  background: rgba(56, 189, 248, 0.05);
}

.file-label:hover {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.15);
}

/* Drag and drop active state */
.file-input-wrapper.drag-over .file-label {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.2);
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.3);
  transform: scale(1.02);
}

.file-label span {
  color: #38bdf8;
  font-weight: 600;
  font-size: 15px;
}

#fileDescription {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(56, 189, 248, 0.2);
  background: rgba(15, 23, 42, 0.5);
  color: #f1f5f9;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  margin-bottom: 16px;
  resize: vertical;
  transition: all 0.3s;
}

#fileDescription:focus {
  outline: none;
  border-color: #38bdf8;
  background: rgba(15, 23, 42, 0.7);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
}

#uploadBtn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  letter-spacing: 0.3px;
}

#uploadBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
  background: linear-gradient(135deg, #059669, #047857);
}

#uploadBtn:disabled {
  background: rgba(30, 41, 59, 0.5);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Files Section */
.files-section {
  background: rgba(30, 41, 59, 0.4);
  backdrop-filter: blur(20px);
  padding: 28px;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(56, 189, 248, 0.1);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.section-header h2 {
  color: #f1f5f9;
  font-weight: 600;
  font-size: 20px;
}

.section-actions {
  display: flex;
  gap: 8px;
}

.action-btn {
  padding: 9px 18px;
  background: rgba(56, 189, 248, 0.1);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
  letter-spacing: 0.3px;
  font-size: 13px;
}

.action-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.3);
  transform: translateY(-1px);
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.3);
  border-radius: 8px;
  flex-wrap: wrap;
}

.breadcrumb-item {
  color: #38bdf8;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.breadcrumb-item:hover {
  color: #0ea5e9;
  text-decoration: underline;
}

.breadcrumb-item.active {
  color: #94a3b8;
  cursor: default;
}

.breadcrumb-item.active:hover {
  text-decoration: none;
}

.breadcrumb-separator {
  color: #64748b;
  font-size: 12px;
}

.files-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Folder Item */
.folder-item {
  padding: 20px;
  border: 1px solid rgba(139, 92, 246, 0.15);
  background: rgba(139, 92, 246, 0.05);
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s;
  cursor: pointer;
}

.folder-item:hover {
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.15);
  background: rgba(139, 92, 246, 0.1);
  transform: translateY(-2px);
}

.folder-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.folder-icon {
  font-size: 28px;
}

.folder-name {
  font-weight: 600;
  color: #f1f5f9;
  font-size: 16px;
}

.folder-actions {
  display: flex;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.2s;
}

.folder-item:hover .folder-actions {
  opacity: 1;
}

.folder-actions button {
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
  font-size: 12px;
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.folder-actions button:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.3);
}

.file-item {
  padding: 20px;
  border: 1px solid rgba(56, 189, 248, 0.15);
  background: rgba(15, 23, 42, 0.3);
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s;
}

.file-item:hover {
  border-color: rgba(56, 189, 248, 0.3);
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.1);
  background: rgba(15, 23, 42, 0.5);
  transform: translateY(-2px);
}

.file-info {
  flex: 1;
}

.file-name {
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 6px;
  font-size: 16px;
}

.file-meta {
  font-size: 13px;
  color: #94a3b8;
}

.file-actions {
  display: flex;
  gap: 8px;
}

.file-actions button {
  padding: 9px 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
  letter-spacing: 0.3px;
  font-size: 13px;
}

.share-btn {
  background: rgba(56, 189, 248, 0.1);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.share-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.3);
  transform: translateY(-1px);
}

.download-btn {
  background: rgba(139, 92, 246, 0.1);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.download-btn:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.3);
  transform: translateY(-1px);
}

.delete-btn {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.delete-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.3);
  transform: translateY(-1px);
}

/* Messages */
.message {
  margin-top: 16px;
  padding: 14px;
  border-radius: 10px;
  text-align: center;
  font-weight: 500;
  display: none;
  letter-spacing: 0.2px;
  font-size: 14px;
}

.message.show {
  display: block;
  animation: fadeIn 0.3s ease;
}

.message.success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.message.error {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.message.info {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.hidden {
  display: none;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: #64748b;
}

.empty-state h3 {
  margin-bottom: 8px;
  color: #94a3b8;
  font-weight: 600;
  font-size: 18px;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10001;
  animation: fadeIn 0.2s ease;
}

.modal.active {
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  background: rgba(30, 41, 59, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 20px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.3s ease;
  z-index: 1;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  padding: 24px 28px 20px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  color: #f1f5f9;
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 32px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s;
  line-height: 1;
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
}

.modal-body {
  padding: 28px;
  color: #cbd5e1;
}

.modal-body p {
  margin-bottom: 8px;
  font-size: 15px;
  line-height: 1.6;
}

.modal-filename {
  color: #38bdf8;
  font-weight: 600;
  font-size: 16px;
  background: rgba(56, 189, 248, 0.1);
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.2);
  margin-top: 12px;
  word-break: break-all;
}

.share-link-container {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.share-link-input {
  flex: 1;
  padding: 12px 14px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 8px;
  color: #f1f5f9;
  font-size: 14px;
  font-family: 'Courier New', monospace;
}

.share-link-input:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
}

.folder-name-input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 10px;
  color: #f1f5f9;
  font-size: 15px;
  margin-top: 12px;
}

.folder-name-input:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
}

.copy-link-btn {
  padding: 12px 20px;
  background: rgba(56, 189, 248, 0.1);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
  font-size: 14px;
  white-space: nowrap;
}

.copy-link-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.3);
}

.modal-footer {
  padding: 20px 28px 24px;
  border-top: 1px solid rgba(56, 189, 248, 0.1);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.modal-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  letter-spacing: 0.3px;
}

.modal-btn-cancel {
  background: rgba(30, 41, 59, 0.5);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.modal-btn-cancel:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(148, 163, 184, 0.3);
}

.modal-btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.modal-btn-danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
  background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.modal-btn-primary {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  color: white;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.modal-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(56, 189, 248, 0.3);
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    grid-template-columns: 1fr;
  }

  .navbar-content {
    flex-direction: column;
    gap: 15px;
  }

  .file-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .file-actions {
    width: 100%;
  }

  .file-actions button {
    flex: 1;
  }

  .modal-content {
    width: 95%;
    max-width: none;
    margin: 20px;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 20px;
  }

  .share-link-container {
    flex-direction: column;
  }

  .copy-link-btn {
    width: 100%;
  }
}

