/* Hashti Design System & Spatial Geometry Styles */
@font-face {
  font-family: 'Vazirmatn';
  src: url('/Vazirmatn-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --hashti-bg: #090A0F;
  --hashti-surface: #12141C;
  --hashti-surface-hover: #191C27;
  --hashti-border: #232738;
  --hashti-text: #F3F4F6;
  --hashti-text-muted: #9CA3AF;
  --hashti-turquoise: #08BDBA;
  --hashti-turquoise-glow: rgba(8, 189, 186, 0.2);
  --hashti-amber: #D97706;
  --hashti-radius-arch: 16px;
  --hashti-radius-pill: 9999px;
  --hashti-touch-target: 44px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  background-color: var(--hashti-bg);
  color: var(--hashti-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.layout-root {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

/* Darvazeh Portal */
.hashti-portal {
  text-align: center;
  margin-bottom: 2.5rem;
}

.portal-badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  background: rgba(8, 189, 186, 0.1);
  border: 1px solid var(--hashti-turquoise);
  color: var(--hashti-turquoise);
  border-radius: var(--hashti-radius-pill);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.portal-title {
  font-size: 2.75rem;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.portal-subtitle {
  color: var(--hashti-text-muted);
  font-size: 1.1rem;
  line-height: 1.8;
  max-width: 650px;
  margin: 0 auto;
}

/* Hashti Chamber */
.chamber-card {
  background: var(--hashti-surface);
  border: 1px solid var(--hashti-border);
  border-radius: var(--hashti-radius-arch);
  padding: 2.5rem;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  transition: border-color 0.2s ease;
}

.chamber-card:hover {
  border-color: rgba(8, 189, 186, 0.4);
}

/* Dropzone */
.dropzone-area {
  border: 2px dashed var(--hashti-border);
  border-radius: 12px;
  padding: 3rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.01);
}

.dropzone-area:hover {
  border-color: var(--hashti-turquoise);
  background: rgba(8, 189, 186, 0.03);
}

.hidden-input {
  display: none;
}

.dropzone-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.dropzone-icon {
  width: 48px;
  height: 48px;
  color: var(--hashti-turquoise);
  margin-bottom: 1rem;
}

.dropzone-text {
  font-size: 1.2rem;
  font-weight: 600;
  color: #FFFFFF;
  margin-bottom: 0.5rem;
}

.dropzone-hint {
  font-size: 0.9rem;
  color: var(--hashti-text-muted);
}

/* Form Options */
.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--hashti-text-muted);
}

.hashti-input, .hashti-select {
  height: var(--hashti-touch-target);
  background: var(--hashti-bg);
  border: 1px solid var(--hashti-border);
  border-radius: 8px;
  color: #FFFFFF;
  padding: 0 1rem;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.hashti-input:focus, .hashti-select:focus {
  border-color: var(--hashti-turquoise);
  box-shadow: 0 0 0 2px var(--hashti-turquoise-glow);
}

.hashti-primary-btn {
  grid-column: span 2;
  height: var(--hashti-touch-target);
  background: var(--hashti-turquoise);
  color: #090A0F;
  border: none;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.hashti-primary-btn:hover {
  background: #09D6D3;
  transform: translateY(-1px);
}

.hashti-secondary-btn {
  height: var(--hashti-touch-target);
  background: transparent;
  color: var(--hashti-text-muted);
  border: 1px solid var(--hashti-border);
  border-radius: 8px;
  padding: 0 1.5rem;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hashti-secondary-btn:hover {
  color: #FFFFFF;
  border-color: #FFFFFF;
}

/* Processing State */
.processing-card {
  text-align: center;
  padding: 4rem 2rem;
}

.spinning-icon {
  width: 48px;
  height: 48px;
  color: var(--hashti-turquoise);
  animation: spin 1.5s linear infinite;
  margin: 0 auto 1.5rem auto;
}

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

.step-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.step-desc {
  color: var(--hashti-text-muted);
  margin-bottom: 2rem;
}

.progress-bar-bg {
  width: 100%;
  height: 10px;
  background: var(--hashti-bg);
  border-radius: var(--hashti-radius-pill);
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.progress-bar-fill {
  height: 100%;
  background: var(--hashti-turquoise);
  transition: width 0.3s ease;
}

.percent-label {
  font-weight: 700;
  color: var(--hashti-turquoise);
}

.thumbnail-preview-container {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0;
}

.thumbnail-preview-img {
  max-height: 180px;
  border-radius: 8px;
  border: 1px solid var(--hashti-turquoise);
  box-shadow: 0 4px 20px var(--hashti-turquoise-glow);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

/* Success Hayati Sanctuary */
.hayati-sanctuary {
  text-align: center;
  padding: 3.5rem 2rem;
}

.success-icon {
  width: 56px;
  height: 56px;
  color: #10B981;
  margin: 0 auto 1.5rem auto;
}

.action-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.kindle-instruction {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--hashti-border);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  text-align: right;
  font-size: 0.9rem;
  line-height: 1.7;
}

.kindle-icon {
  width: 24px;
  height: 24px;
  color: var(--hashti-turquoise);
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.kindle-instruction a {
  color: var(--hashti-turquoise);
  text-decoration: underline;
}
