/* CSS Custom Properties for theme colors */
:root {
  --theme-bg-color: #fafafa;
  --theme-text-color: #1a1a1a;
  --theme-accent-color: #1a1a1a;
  --theme-border-color: #e0e0e0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --theme-bg-color: #1b1b1b;
    --theme-text-color: #e8e8e8;
    --theme-accent-color: #f0f0f0;
    --theme-border-color: #333;
  }
}

/* Custom font declarations */
@font-face {
  font-family: 'OT Jubilee Diamond';
  src: url('/assets/fonts/OTJubilee-Diamond.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Tiempos Text';
  src: url('/assets/fonts/tiempos-text-regular.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Tiempos Headline';
  src: url('/assets/fonts/tiempos-headline-semibold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* Simplified, typography-focused homepage design */

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

body {
  font-family: 'Tiempos Text', 'Charter', 'Georgia', 'Cambria', 'Times New Roman', serif;
  background: #fafafa;
  color: #1a1a1a;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

.main-container {
  max-width: 480px;
  width: 100%;
  text-align: center;
}

.header {
  margin-bottom: 60px;
}

.title {
  font-family: 'OT Jubilee Diamond', 'Tiempos Headline', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 42px;
  font-weight: normal;
  margin-bottom: 12px;
  color: #1a1a1a;
  letter-spacing: -0.02em;
}

.subtitle {
  font-size: 18px;
  color: #666;
  font-weight: normal;
  margin-bottom: 0;
}

.main-content {
  width: 100%;
  margin-bottom: 40px;
}

.content-type-hint {
  font-size: 12px;
  color: #999;
  margin-top: 8px;
  text-align: center;
  min-height: 16px;
  transition: all 0.2s ease;
}

.file-section {
  width: 100%;
  /* margin-top: 20px; */
  max-height: 200px;
  opacity: 1;
  transform: translateY(0);
  transition: all 0.4s ease;
  overflow: hidden;
}

.file-section.hidden {
  max-height: 0;
  opacity: 0;
  transform: translateY(-20px);
  margin-top: 0;
  margin-bottom: 0;
}

.section-divider {
  text-align: center;
  margin: 20px;
  position: relative;
}

.section-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #e0e0e0;
  z-index: 1;
}

.section-divider span {
  background: #fafafa;
  padding: 0 16px;
  color: #999;
  font-size: 14px;
  position: relative;
  z-index: 2;
}

/* Form styling */
.form {
  display: flex;
  flex-direction: column;
  /* gap: 20px; */
}

input[type="text"],
input[type="url"],
textarea,
select {
  width: 100%;
  padding: 16px 20px;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
  background: white;
  transition: all 0.2s ease;
  outline: none;
}

input[type="text"]:focus,
input[type="url"]:focus,
textarea:focus,
select:focus {
  border-color: #1a1a1a;
  box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1);
}

textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.5;
}

select {
  cursor: pointer;
}

.button {
  width: 100%;
  padding: 16px 32px;
  background: #1a1a1a;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  font-family: 'Tiempos Headline', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 20px 0;
}

.button:hover:not(:disabled) {
  background: #333;
  transform: translateY(-1px);
}

.button.hidden {
  display: none;
}

.button:disabled.loading {
  display: block;
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

/* File upload area */
.file-upload {
  border: 2px dashed #d0d0d0;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
  background: white;
}

.file-upload:hover,
.file-upload.dragover {
  border-color: #1a1a1a;
  background: #f8f8f8;
}

.file-upload-text {
  font-size: 16px;
  color: #666;
}

.file-input {
  display: none;
}

/* Success and error states */
.success-box,
.error-box {
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 14px;
  margin-top: 12px;
  display: none;
}

.success-box {
  background: rgba(34, 197, 94, 0.1);
  color: #15803d;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.error-box {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Output form */
.output-form {
  display: none;
  text-align: center;
}

.output-url {
  font-family: 'SF Mono', Monaco, Consolas, monospace;
  font-size: 14px;
  background: #f8f8f8;
  border: 1px solid #e0e0e0;
}

.reset-button {
  background: transparent;
  color: #666;
  border: 1px solid #d0d0d0;
  margin-top: 16px;
}

.reset-button:hover {
  background: #f8f8f8 !important;
  color: #1a1a1a !important;
  border-color: #1a1a1a;
}

/* Footer */
.footer {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.4;
  transition: opacity 0.2s ease;
}

.footer:hover {
  opacity: 0.7;
}

.footer-logo {
  width: 32px;
  height: 32px;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  body {
    background: #1b1b1b;
    color: #e8e8e8;
  }

  .title {
    color: #f0f0f0;
  }

  .subtitle {
    color: #aaa;
  }

  .tab-nav {
    border-bottom-color: #333;
  }

  .tab-nav label {
    color: #aaa;
  }

  .tab-nav label:hover,
  .tab-nav input[type="radio"]:checked+label {
    color: #f0f0f0;
    border-bottom-color: #f0f0f0;
  }

  input[type="text"],
  input[type="url"],
  textarea,
  select {
    background: #2a2a2a;
    border-color: #444;
    color: #e8e8e8;
  }

  input[type="text"]:focus,
  input[type="url"]:focus,
  textarea:focus,
  select:focus {
    border-color: #e8e8e8;
    box-shadow: 0 0 0 3px rgba(232, 232, 232, 0.1);
  }

  .button {
    background: #f0f0f0;
    color: #1a1a1a;
  }

  .button:hover:not(:disabled) {
    background: #e0e0e0;
  }

  .file-upload {
    background: #2a2a2a;
    border-color: #444;
  }

  .file-upload:hover,
  .file-upload.dragover {
    border-color: #e8e8e8;
    background: #333;
  }

  .file-upload-text {
    color: #aaa;
  }

  .output-url {
    background: #2a2a2a;
    border-color: #444;
    color: #e8e8e8;
  }

  .reset-button {
    color: #aaa;
    border-color: #444;
  }

  .reset-button:hover {
    background: #333;
    color: #e8e8e8;
    border-color: #e8e8e8;
  }

  .section-divider::before {
    background: #333;
  }

  .section-divider span {
    background: #1b1b1b;
  }
}

/* Mobile responsive */
@media (max-width: 600px) {
  body {
    padding: 20px 16px;
  }

  .main-container {
    max-width: 100%;
  }

  .title {
    font-size: 28px;
  }

  .subtitle {
    font-size: 16px;
  }

  .tab-nav label {
    padding: 12px 16px;
    font-size: 14px;
  }

  input[type="text"],
  input[type="url"],
  textarea,
  select,
  .button {
    font-size: 16px;
    /* Prevent zoom on iOS */
  }

  .file-upload {
    padding: 40px 16px;
  }
}