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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Amazon Ember', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #1a202c;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top navigation bar */
.top-nav {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  padding: 1rem 2rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-section img {
  height: 48px;
}

.user-section {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.user-email {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #4a5568;
  font-size: 0.95rem;
}

.user-email i {
  color: #3b82f6;
  font-size: 1.2rem;
}

.signout-btn {
  background-color: transparent;
  color: #64748b;
  border: 1px solid #e2e8f0;
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.signout-btn:hover {
  background-color: #f8fafc;
  border-color: #cbd5e0;
  color: #1e293b;
}

/* Main content area */
.main-content {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem 2rem;
}

.container {
  max-width: 600px;
  width: 100%;
  background-color: #ffffff;
  padding: 3rem;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

header {
  text-align: center;
  margin-bottom: 2.5rem;
}

header img.logo {
  height: 56px;
  margin-bottom: 1.5rem;
}

h1 {
  color: #1a202c;
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.subtitle {
  color: #64748b;
  font-size: 1rem;
  margin-top: 0.5rem;
}

.upload-area {
  margin-top: 2rem;
}

label {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  display: block;
  color: #334155;
}

/* Drag and Drop Zone */
.drop-zone {
  position: relative;
  margin-bottom: 1.5rem;
  border: 2px dashed #cbd5e0;
  border-radius: 12px;
  background-color: #f8fafc;
  transition: all 0.3s ease;
  cursor: pointer;
  overflow: hidden;
}

.drop-zone:hover {
  border-color: #94a3b8;
  background-color: #f1f5f9;
}

.drop-zone.drag-over {
  border-color: #3b82f6;
  background-color: #eff6ff;
  border-style: solid;
  transform: scale(1.02);
}

.drop-zone-content {
  padding: 3rem 2rem;
  text-align: center;
}

.drop-zone-icon {
  font-size: 3rem;
  color: #94a3b8;
  margin-bottom: 1rem;
  display: block;
}

.drop-zone-text {
  color: #334155;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.drop-zone-text strong {
  color: #1e293b;
}

.drop-zone-link {
  color: #3b82f6;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.drop-zone-link:hover {
  color: #2563eb;
}

.drop-zone-hint {
  color: #94a3b8;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* File Preview */
.file-preview {
  padding: 1.5rem;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.file-preview-icon {
  font-size: 2.5rem;
  color: #3b82f6;
  flex-shrink: 0;
}

.file-preview-info {
  flex: 1;
  min-width: 0;
}

.file-preview-name {
  font-weight: 600;
  color: #1e293b;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-preview-size {
  color: #64748b;
  font-size: 0.875rem;
}

.file-preview-remove {
  background: none;
  border: none;
  color: #64748b;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
  transition: color 0.2s ease;
  flex-shrink: 0;
}

.file-preview-remove:hover {
  color: #ef4444;
}

.upload-btn {
  width: 100%;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border: none;
  color: #ffffff;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

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

.upload-btn:active {
  transform: translateY(0);
}

#status {
  margin-top: 2rem;
  padding: 1.25rem;
  border-radius: 12px;
  font-weight: 500;
  font-size: 0.95rem;
  text-align: center;
  background-color: #f8fafc;
  color: #334155;
  border: 1px solid #e2e8f0;
}

#link {
  margin-top: 1.25rem;
  padding: 1.25rem;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-radius: 12px;
  word-break: break-all;
  font-size: 0.95rem;
  line-height: 1.6;
  border: 1px solid #bfdbfe;
}

#link a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
}

#link a:hover {
  text-decoration: underline;
}

footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e2e8f0;
  font-size: 0.9rem;
  text-align: center;
  color: #94a3b8;
}

/* Authentication section styles */
.auth-section {
  text-align: center;
  padding: 2rem 0;
}

.auth-section header img.logo {
  height: 64px;
  margin-bottom: 2rem;
}

.auth-section h2 {
  color: #1a202c;
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.auth-section p {
  color: #64748b;
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

.signin-btn {
  width: 100%;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  padding: 1rem 2rem;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.signin-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
  text-decoration: none;
}

.user-info {
  display: none; /* Hidden when using top nav */
}

#loadingOverlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* Responsive design */
@media (max-width: 768px) {
  .top-nav {
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
  }

  .logo-section img {
    height: 40px;
  }

  .user-section {
    width: 100%;
    justify-content: space-between;
  }

  .container {
    padding: 2rem;
  }

  h1 {
    font-size: 1.5rem;
  }
}
