@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Arabic:wght@300;400;500;600&display=swap');

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

::selection {
  background: rgba(201, 169, 110, 0.4);
}

body {
  background: #0f2b3c;
  color: #fff;
  font-family: 'Noto Sans Arabic', 'Inter', -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: #fff;
  text-decoration: none;
}

/* Container */
.container {
  width: 400px;
  max-width: calc(100% - 48px);
  margin: 0 auto;
  padding: 60px 0 40px;
  text-align: center;
  flex: 1;
}

/* Header */
.site-header {
  margin-bottom: 48px;
}

.site-title {
  font-size: 32px;
  font-weight: 300;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.site-title a {
  color: #fff;
}

.site-subtitle {
  font-size: 15px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.6);
}

/* Upload section */
.upload-section {
  margin-top: 48px;
}

.expire-text {
  font-size: 14px;
  font-weight: 400;
  color: #fff;
  margin-bottom: 24px;
}

.expire-select {
  background: #0f2b3c;
  color: #fff;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  font-family: inherit;
  font-size: 14px;
  padding: 0 20px 2px 4px;
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpath d='M0 0l4 5 4-5z' fill='rgba(255,255,255,0.5)'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 2px center;
  outline: none;
}

[dir="ltr"] .expire-select {
  background-position: right 2px center;
  padding: 0 4px 2px 20px;
}

.expire-select option {
  background: #0f2b3c;
  color: #fff;
}

/* Upload button */
.upload-btn-wrap {
  margin-top: 28px;
}

.upload-label {
  display: inline-block;
  background: #c9a96e;
  color: #0f2b3c;
  padding: 10px 28px 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: box-shadow 0.3s ease, background 0.3s ease;
  font-family: inherit;
}

.upload-label:hover {
  box-shadow: 0 0 18px rgba(201, 169, 110, 0.4);
  background: #d4b87a;
}

.upload-label .file-max {
  font-size: 11px;
  opacity: 0.6;
}

.file-input {
  display: none;
}

/* Drop zone overlay */
.drop-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 43, 60, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  pointer-events: none;
}

.drop-overlay.active {
  display: flex;
}

.drop-overlay-text {
  font-size: 22px;
  font-weight: 300;
  color: #c9a96e;
  border: 2px dashed rgba(201, 169, 110, 0.5);
  padding: 60px 80px;
}

/* Progress bar */
.progress-track {
  width: 100%;
  max-width: 280px;
  height: 5px;
  background: rgba(255, 255, 255, 0.12);
  margin: 24px auto 0;
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: #c9a96e;
  transition: width 0.15s ease;
}

.progress-fill.error {
  background: #e2574c;
}

.progress-text {
  font-size: 14px;
  color: #fff;
  margin-top: 10px;
  text-align: center;
}

.progress-text.error {
  color: #f0c040;
}

/* Upload results */
.upload-results {
  list-style: none;
  margin-top: 28px;
  text-align: right;
}

[dir="ltr"] .upload-results {
  text-align: left;
}

.upload-result {
  margin-top: 18px;
}

.result-name {
  display: block;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 6px;
  word-break: break-all;
}

.result-row {
  display: flex;
  align-items: stretch;
}

.result-url {
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
  border: none;
  background: #fff;
  color: #0f2b3c;
  font-family: 'Inter', monospace, sans-serif;
  font-size: 13px;
  outline: none;
}

.result-url:focus {
  outline: 2px solid #c9a96e;
}

.result-copy {
  flex: 0 0 auto;
  background: #0f2b3c;
  color: #fff;
  border: 1px solid #fff;
  border-right: none;
  padding: 9px 16px 7px;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  font-weight: 500;
  transition: box-shadow 0.3s ease;
}

[dir="ltr"] .result-copy {
  border-right: 1px solid #fff;
  border-left: none;
}

.result-copy:hover {
  box-shadow: 0 0 12px rgba(201, 169, 110, 0.3);
}

.copy-all-btn {
  display: none;
  margin: 24px auto 0;
  background: #c9a96e;
  color: #0f2b3c;
  border: none;
  padding: 9px 20px 7px;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
  transition: box-shadow 0.3s ease;
}

.copy-all-btn:hover {
  box-shadow: 0 0 18px rgba(201, 169, 110, 0.4);
}

/* Footer */
.site-footer {
  text-align: center;
  margin-top: 48px;
  padding: 24px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-links {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 0;
}

.footer-links li a {
  display: block;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s;
}

.footer-links li a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lang-switch {
  margin-top: 14px;
}

.lang-btn {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.5);
  padding: 4px 14px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}

.lang-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}

/* Download page */
.download-section {
  margin-top: 48px;
}

.dl-filename {
  font-size: 20px;
  font-weight: 400;
  margin-bottom: 20px;
  word-break: break-all;
  line-height: 1.5;
}

.dl-meta {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 24px;
}

.dl-btn {
  display: inline-block;
  background: #c9a96e;
  color: #0f2b3c;
  padding: 10px 28px 8px;
  font-size: 16px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: box-shadow 0.3s ease, background 0.3s ease;
}

.dl-btn:hover {
  box-shadow: 0 0 18px rgba(201, 169, 110, 0.4);
  background: #d4b87a;
}

.dl-countdown {
  margin-top: 20px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

/* Error page */
.error-section {
  margin-top: 48px;
}

.error-title {
  font-size: 20px;
  font-weight: 400;
  margin-bottom: 10px;
  color: #f0c040;
}

.error-text {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 28px;
}

.home-link {
  display: inline-block;
  background: #c9a96e;
  color: #0f2b3c;
  padding: 10px 28px 8px;
  font-size: 15px;
  font-weight: 500;
  transition: box-shadow 0.3s ease;
}

.home-link:hover {
  box-shadow: 0 0 18px rgba(201, 169, 110, 0.4);
}

/* Spinner */
.spinner {
  width: 32px;
  height: 32px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: #c9a96e;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 40px auto;
}

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

/* Ad slot */
.ad-slot {
  margin-top: 40px;
  text-align: center;
  min-height: 90px;
}

/* Responsive */
@media (max-width: 500px) {
  .container {
    padding: 36px 0 32px;
  }
  .site-title {
    font-size: 26px;
  }
  .drop-overlay-text {
    font-size: 18px;
    padding: 40px;
  }
}
