/* ==========================================================================
   TempFiles — Classic web aesthetic (old-Google / campus-portal era)
   Light, plain CSS only. No frameworks, no heavy animation, no WebGL.
   "3D" accents below are just layered box-shadows + small hover transforms.
   ========================================================================== */

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

body {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  color: #222;
  background: #f4f6f8;
  background-image:
    linear-gradient(#eef1f5 1px, transparent 1px),
    linear-gradient(90deg, #eef1f5 1px, transparent 1px);
  background-size: 24px 24px;
  padding: 0 12px 40px;
}

/* Subtle "3D stage" wrapper — a light perspective tilt on the whole page
   card only on wide screens; disabled on mobile for performance/comfort. */
.page-3d {
  padding-top: 20px;
}

/* ── Layout ── */
.container {
  max-width: 560px;
  margin: 0 auto;
}

/* ── Navbar (classic portal top-bar) ── */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(#ffffff, #eef0f3);
  border: 1px solid #ccc;
  border-radius: 3px;
  padding: 8px 14px;
  margin-bottom: 18px;
  box-shadow: 0 1px 0 #fff inset, 0 2px 4px rgba(0, 0, 0, 0.06);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: bold;
  font-size: 14px;
  color: #333;
  text-decoration: none;
}

.navbar-brand:hover {
  color: #4285f4;
}

.navbar-logo-mark {
  display: inline-block;
  color: #4285f4;
  transform: perspective(60px) rotateX(8deg);
}

.navbar-links {
  display: flex;
  gap: 14px;
}

.navbar-links a {
  font-size: 12px;
  color: #555;
  text-decoration: none;
}

.navbar-links a:hover {
  color: #1a0dab;
  text-decoration: underline;
}

/* ── Header ── */
.header {
  text-align: center;
  padding: 22px 0 18px;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: #4285f4;
  letter-spacing: -0.5px;
  text-shadow: 0 1px 0 #fff, 0 2px 3px rgba(66, 133, 244, 0.18);
}

.tagline {
  font-size: 12px;
  color: #666;
  margin-top: 4px;
}

/* ── Divider ── */
hr {
  border: none;
  border-top: 1px solid #ccc;
  margin: 0 0 16px;
}

/* ── Box (card with border + light shadow "lift") ── */
.box {
  border: 1px solid #ccc;
  border-radius: 3px;
  padding: 18px 20px;
  margin-bottom: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 3px 8px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.15s ease;
}

.box:hover {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05), 0 6px 14px rgba(0, 0, 0, 0.08);
}

.box p {
  margin-bottom: 8px;
  line-height: 1.5;
}

.box a {
  color: #1a0dab;
}

.box a:hover {
  text-decoration: underline;
}

/* ── Upload area ── */
.upload-area {
  border: 2px dashed #bbb;
  border-radius: 3px;
  padding: 30px 16px;
  text-align: center;
  background: #fafbfc;
  cursor: pointer;
  margin-bottom: 14px;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}

.upload-area:hover {
  border-color: #9ab8f5;
  transform: translateY(-1px);
}

.upload-area.drag-over {
  border-color: #4285f4;
  background: #f0f5ff;
  transform: translateY(-1px) scale(1.01);
}

.upload-area .icon {
  font-size: 30px;
  margin-bottom: 6px;
  display: block;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.12));
}

.upload-area .hint {
  font-size: 12px;
  color: #888;
  margin-top: 4px;
}

#file-input {
  display: none;
}

/* ── Classic button (slightly beveled, like an old-web button) ── */
.btn {
  display: inline-block;
  padding: 6px 16px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  color: #222;
  background: linear-gradient(#fbfbfb, #ececec);
  border: 1px solid #aaa;
  border-radius: 3px;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.6;
  box-shadow: 0 1px 0 #fff inset, 0 1px 2px rgba(0, 0, 0, 0.08);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.btn:hover {
  background: linear-gradient(#ffffff, #f0f0f0);
  border-color: #888;
  color: #000;
  transform: translateY(-1px);
  box-shadow: 0 1px 0 #fff inset, 0 3px 6px rgba(0, 0, 0, 0.12);
}

.btn:active {
  background: #e8e8e8;
  transform: translateY(0);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08) inset;
}

.btn:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

.btn-primary {
  background: linear-gradient(#5b95f6, #3367d6);
  color: #fff;
  border-color: #2a56c6;
}

.btn-primary:hover {
  background: linear-gradient(#6ea1f7, #2a56c6);
  color: #fff;
  border-color: #2a56c6;
}

.btn-primary:active {
  background: #2a56c6;
}

.btn-sm {
  padding: 3px 10px;
  font-size: 12px;
}

/* ── Selected file info ── */
#file-info {
  font-size: 12px;
  color: #444;
  margin-bottom: 10px;
  min-height: 18px;
}

#file-info.has-file {
  color: #0a7c0a;
  font-weight: bold;
}

/* ── Expiry options ── */
.expiry-group {
  margin-bottom: 14px;
}

.expiry-group label {
  font-size: 12px;
  color: #555;
  display: block;
  margin-bottom: 6px;
}

.expiry-options {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.expiry-options label {
  font-size: 13px;
  color: #222;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 0;
}

/* ── Upload submit row ── */
.upload-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ── Progress + step indicator ── */
#progress-wrap {
  display: none;
  margin-top: 14px;
}

.steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  font-size: 10px;
  color: #999;
}

.step-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #e2e2e2;
  border: 1px solid #ccc;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1) inset;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.step.active .step-dot {
  background: #4285f4;
  border-color: #2a56c6;
  transform: scale(1.2);
  box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.18);
}

.step.done .step-dot {
  background: #34a853;
  border-color: #1e7e34;
}

.step.active .step-label {
  color: #1a0dab;
  font-weight: bold;
}

.step.done .step-label {
  color: #34a853;
}

#progress-bar-bg {
  background: #e0e0e0;
  border: 1px solid #ccc;
  height: 9px;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08) inset;
}

#progress-bar {
  height: 100%;
  background: linear-gradient(#6ea1f7, #4285f4);
  width: 0%;
  transition: width 0.15s linear;
}

#progress-text {
  font-size: 11px;
  color: #666;
  margin-top: 5px;
}

/* ── Result box ── */
#result {
  display: none;
}

.result-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: bold;
  color: #0a7c0a;
  background: #eefbea;
  border: 1px solid #b6e6ac;
  border-radius: 3px;
  padding: 3px 8px;
  margin-bottom: 12px;
}

.result-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.result-label {
  font-size: 12px;
  color: #555;
  white-space: nowrap;
}

.result-url {
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  padding: 3px 8px;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #1a0dab;
  cursor: default;
}

.result-filename {
  font-size: 12px;
  color: #444;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-note {
  font-size: 11px;
  color: #888;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #ddd;
  line-height: 1.5;
}

.expiry-info {
  font-size: 12px;
  color: #666;
  margin-bottom: 10px;
}

.expiry-info strong {
  color: #d14;
}

/* ── Status / error messages ── */
.msg {
  padding: 7px 10px;
  margin-top: 8px;
  font-size: 12px;
  border: 1px solid;
  border-radius: 2px;
}

.msg.error {
  background: #fff0f0;
  border-color: #f5a0a0;
  color: #900;
}

.msg.success {
  background: #f0fff0;
  border-color: #90c090;
  color: #060;
}

/* ── Info boxes (How it works / FAQ) ── */
.info-box .info-title {
  font-size: 14px;
  color: #333;
  margin-bottom: 10px;
}

.info-list {
  padding-left: 18px;
  line-height: 1.7;
  font-size: 12px;
  color: #444;
}

.info-box p {
  font-size: 12px;
  color: #444;
}

/* ── State pages (404 / 410) ── */
.state-box {
  text-align: center;
  padding: 34px 20px;
}

.state-icon {
  font-size: 34px;
  margin-bottom: 10px;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.12));
}

.state-title {
  font-size: 16px;
  color: #333;
  margin-bottom: 8px;
}

.state-text {
  font-size: 12px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 16px;
}

.state-410 .state-title {
  color: #b45309;
}

.state-404 .state-title {
  color: #900;
}

/* ── Footer ── */
.footer {
  text-align: center;
  font-size: 11px;
  color: #999;
  margin-top: 10px;
  line-height: 1.6;
}

.footer a {
  color: #999;
}

.footer-links {
  margin-top: 4px;
}

/* ── Spinner ── */
.spinner {
  display: inline-block;
  width: 10px;
  height: 10px;
  border: 2px solid #ccc;
  border-top-color: #4285f4;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 4px;
}

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

/* ── Responsive ── */
@media (max-width: 480px) {
  .container {
    max-width: 100%;
  }

  .navbar-links {
    gap: 10px;
  }

  .expiry-options {
    gap: 10px;
  }

  .result-row {
    flex-wrap: wrap;
  }

  .result-url {
    width: 100%;
  }

  .steps {
    font-size: 9px;
  }

  .step-label {
    display: none;
  }
}

/* Respect users who prefer reduced motion — drop hover/transition flourishes. */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
