:root {
  --primary: #0066cc;
  --primary-focus: #0071e3;
  --primary-on-dark: #2997ff;
  --ink: #1d1d1f;
  --body-muted: #86868b;
  --divider-soft: rgba(0, 0, 0, 0.08);
  --canvas: #ffffff;
  --canvas-parchment: #f5f5f7;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 9999px;
  --shadow-product: rgba(0, 0, 0, 0.22) 3px 5px 30px 0px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "SF Pro Text", "SF Pro Icons", "Helvetica Neue", "Helvetica", "Arial", sans-serif;
  background-color: var(--canvas);
  color: var(--ink);
  line-height: 1.47;
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
}

header {
  height: 52px;
  background: rgba(245, 245, 247, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--divider-soft);
}

.nav-content {
  max-width: 1000px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.nav-brand {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.011em;
}

.nav-links a {
  font-size: 14px;
  color: var(--ink);
  text-decoration: none;
  margin-left: 24px;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--primary);
}

main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px;
}

.hero-text {
  text-align: center;
  margin-bottom: 60px;
}

.hero-text h2 {
  font-size: 48px;
  font-weight: 600;
  letter-spacing: -0.003em;
  margin-bottom: 10px;
}

.section { margin-bottom: 60px; }

.upload-box {
  background: var(--canvas-parchment);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
}

.custom-file-upload {
  display: inline-block;
  padding: 12px 24px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-pill);
  font-weight: 400;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-file-upload:hover {
  background: var(--primary-focus);
  transform: scale(1.02);
}

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

.input-field {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--divider-soft);
  border-radius: var(--radius-sm);
  font-size: 17px;
  outline: none;
  transition: border-color 0.2s;
}

.input-field:focus { border-color: var(--primary); }

.file-table {
  width: 100%;
  border-collapse: collapse;
}

.file-table th {
  text-align: left;
  font-size: 12px;
  color: var(--body-muted);
  text-transform: uppercase;
  padding: 12px 0;
  border-bottom: 1px solid var(--divider-soft);
}

.file-table td {
  padding: 20px 0;
  border-bottom: 1px solid var(--divider-soft);
}

.file-row:hover { background: rgba(0,0,0,0.01); }

.thumbnail {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  cursor: pointer;
}

.file-name {
  font-size: 17px;
  font-weight: 600;
}

.file-meta {
  font-size: 14px;
  color: var(--body-muted);
}

.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-size: 14px;
  transition: transform 0.2s;
}

.btn-primary:active { transform: scale(0.95); }

.btn-danger {
  background: #ff3b30;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-size: 14px;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(5px);
}

.modal-content {
  background: white;
  width: 90%;
  max-width: 400px;
  margin: 100px auto;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
  position: relative;
  animation: modalSlide 0.3s ease-out;
}

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

/* Toast System */
#toast-container {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.toast {
  background: rgba(29, 29, 31, 0.9);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transform: translateY(-20px);
  animation: toastIn 0.4s forwards;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.toast.error { background: rgba(255, 59, 48, 0.9); }

@keyframes toastIn {
  to { opacity: 1; transform: translateY(0); }
}

/* Auth Pages */
.auth-wrapper {
  background: var(--canvas-parchment);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.auth-card {
  background: white;
  width: 100%;
  max-width: 600px;
  padding: 30px 48px;
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.05);
}

.auth-header h1 {
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 8px;
  text-align: center;
}

.share-options-container {
    display: flex;
    gap: 20px;
    margin-top: 24px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--divider-soft);
}
