:root {
  --primary-color: #f16625;

  --border-color: #e4e4e9;

  --text-color-primary: #111111;
  --text-color-secondary: #848484;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;

  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;

  a {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
  }
}

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

button,
[type='button'],
[type='submit'],
[type='reset'] {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: 0;
  margin: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  line-height: inherit;
  text-align: inherit;
  border-radius: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.upload-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

header {
  width: 100%;
  height: 72px;
  border-bottom: 1px solid var(--border-color);
}

.header-content {
  margin: 0 auto;
  max-width: 1360px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  box-sizing: border-box;
}

@media (max-width: 576px) {
  .header-content {
    padding: 16px 20px;
  }
}

.header-buttons {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
}

.header-hamburger-menu {
  display: none;
}

@media (max-width: 576px) {
  .header-hamburger-menu {
    display: block;
  }
}

@media (max-width: 576px) {
  .header-buttons {
    display: none;
  }
}

/* Overlay and mobile menu */
.overlay {
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
  z-index: 40;
}

body.menu-open .overlay {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu {
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  border-bottom: 1px solid var(--border-color);
  transform: translateY(-12px);
  opacity: 0;
  transition: transform 220ms ease, opacity 150ms ease;
  z-index: 50;
  padding: 0 12px;
  background-color: #ffffff;
  background-image: repeating-linear-gradient(
    45deg,
    var(--border-color) 0,
    var(--border-color) 1px,
    transparent 1px,
    transparent 8px
  );
  visibility: hidden;
  pointer-events: none;
}

body.menu-open .mobile-menu {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Mobile menu visible on small screens; do not force-hide at ≤768px */

.mobile-menu-inner {
  display: flex;
  flex-direction: column;
}

.mobile-menu-item {
  width: 100%;
  padding: 24px 20px;
  display: flex;
  background: #ffffff;
  border-right: 1px solid var(--border-color);
  border-left: 1px solid var(--border-color);
}

.mobile-menu-item:first-child {
  border-bottom: 1px solid var(--border-color);
}

.header-hamburger-menu {
  background: none;
  border: none;
  cursor: pointer;
}

.btn-core {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 20px;
  border-radius: 10000px;
  box-sizing: border-box;
  cursor: pointer;

  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
}

.primary-btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
}

.secondary-btn {
  background-color: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.upload-main-container {
  width: 100%;
  height: 100%;
  display: flex;
  padding: 0 40px;
  box-sizing: border-box;

  background-image: repeating-linear-gradient(
    45deg,
    var(--border-color) 0,
    var(--border-color) 1px,
    transparent 1px,
    transparent 8px
  );

  background-color: #ffffff;
}

@media (max-width: 768px) {
  .upload-main-container {
    padding: 0 12px;
  }
}

.upload-main-content {
  margin: 0 auto;
  width: 100%;
  flex: 1 1 auto;
  height: 100%;
  max-width: 1360px;
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  padding-bottom: 40px;
}

.hero-section {
  width: 100%;
  padding: 60px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  row-gap: 18px;
  position: relative;
  overflow: hidden;

  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
}

@media (max-width: 768px) {
  .hero-section {
    padding: 60px 20px;
  }
}

.hero-section h1 {
  font-weight: 700;
  font-size: 30px;
  line-height: 135%;

  background: linear-gradient(0deg, #1d1e1f 64.06%, #848484 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;

  z-index: 1;
}

.hero-section-image-left {
  position: absolute;
  top: 0;
  left: 0;
}

.hero-section-image-right {
  position: absolute;
  top: 0;
  right: 0;
}

.hero-section-label {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  column-gap: 6px;
  border-radius: 10000px;
  padding: 8px 16px;
  border: 1px solid var(--border-color);
  background: #ffffff;

  font-weight: 500;
  font-size: 16px;
  line-height: 135%;
  color: var(--text-color-primary);

  z-index: 1;
}

.upload-section {
  background: #ffffff;
  width: 100%;
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
}

.file-upload-container {
  border: 1px dashed var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  height: 320px;
  background: #ffffff;
}

#uploadArea.dragover {
  background: #fef0e9;
  border-color: var(--primary-color);
}

/* prevent inner elements from stealing drag events during hover */
#uploadArea.dragover * {
  pointer-events: none;
}

.upload-content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  row-gap: 24px;
}

.file-upload-container h4 {
  font-weight: 500;
  font-size: 16px;
  line-height: 135%;
  color: var(--text-color-secondary);
  text-align: center;
}

.drop-icon-container {
  width: 64px;
  height: 64px;
  display: flex;
  border: 1px solid var(--border-color);
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  box-shadow: 0px 4px 8px 0px #00000014;
}

.upload-button {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  column-gap: 8px;
  height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.upload-content-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  row-gap: 24px;
}

#uploadArea.dragover .upload-content-text {
  display: none;
}

#uploadArea.dragover .uploading-text {
  display: block;
}

.uploading-text {
  display: none;
  font-weight: 500;
  font-size: 20px;
  line-height: 135%;
  color: var(--primary-color);
  text-align: center;
}

.controls {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  column-gap: 16px;
}

.reset-btn,
.process-btn {
  width: 144px;
}

.uploaded-file-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  row-gap: 24px;
}

.uploaded-file-container h3 {
  font-weight: 500;
  font-size: 20px;
  line-height: 135%;
  color: var(--text-color-secondary);
}

.uploaded-file-container [data-file-name] {
  max-width: 640px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#uploadArea.selected .upload-content > .drop-icon-container {
  display: none;
}

.loading {
  display: none; /* shown during processing */
  flex-direction: row;
  align-items: center;
  justify-content: center;
  column-gap: 12px;
}

.loading-icon {
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
}

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

.loading-filename {
  font-weight: 500;
  font-size: 20px;
  line-height: 135%;
  color: var(--text-color-secondary);

  max-width: 640px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Processing state - only loader visible */
#uploadArea.processing .loading {
  display: flex;
}
#uploadArea.processing .upload-content-text {
  display: none;
}
#uploadArea.processing .drop-icon-container {
  display: none;
}
#uploadArea.processing .upload-button {
  display: none;
}
#uploadArea.processing .controls {
  display: none !important;
}
#uploadArea.processing .uploading-text {
  display: none;
}

.samples-section {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

@media (max-width: 768px) {
  .samples-section {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-top: 0;
    border-bottom: 0;
  }
}

.sample-btn {
  background-color: #ffffff;
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  width: 100%;
  padding: 40px 32px;
  font-weight: 500;
  font-size: 16px;
  line-height: 135%;

  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

/* Responsive padding for sample buttons */
@media (max-width: 1024px) {
  .sample-btn {
    padding: 28px 24px;
  }
}

@media (max-width: 768px) {
  .sample-btn {
    border-left: 0;
    border-right: 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
  }
}

@media (max-width: 480px) {
  .sample-btn {
    padding: 14px 12px;
    font-size: 14px;
  }
}

.sample-btn:first-child {
  border-left: 0;
}
.sample-btn:last-child {
  border-right: 0;
}

.sample-btn-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  column-gap: 20px;
}

.samples-section-text {
  margin-top: 40px;
  width: 100%;
  padding: 32px 0;
  border-top: 1px solid var(--border-color);
  font-weight: 700;
  font-size: 16px;
  line-height: 135%;
  background-color: white;
  text-align: center;
}
