:root {
  --font-serif: 'Cormorant Garamond', serif;
  --font-sans: 'Inter', sans-serif;
  --bg-color: #ffffff;
  --text-color: #111111;
  --accent-color: #000000;
  --border-color: #e5e5e5;
  --error-color: #d32f2f;
  --success-color: #2e7d32;
  --max-width: 1200px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  padding: 40px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid transparent; /* Hidden border for spacing */
}

.logo {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.nav span {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: #666;
  text-transform: uppercase;
}

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-bottom: 60px;
}

.hero {
  text-align: center;
  margin-bottom: 60px;
}

.headline {
  font-family: var(--font-serif);
  font-size: 4rem;
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.subheadline {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #666;
}

/* Workspace */
.workspace {
  width: 100%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Upload Section */
.upload-section {
  width: 100%;
}

.upload-card {
  width: 100%;
  height: 300px;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: #fafafa;
}

.upload-card:hover {
  border-color: #999;
  background-color: #fff;
}

.upload-icon {
  margin-bottom: 20px;
  color: #333;
}

.upload-text {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin-bottom: 8px;
  color: #111;
}

.upload-hint {
  font-size: 0.8rem;
  color: #888;
  letter-spacing: 0.05em;
}

/* Editor Section */
.editor-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.preview-container {
  width: 100%;
  position: relative;
  border: 1px solid var(--border-color);
  padding: 10px;
  background: #fff;
  box-shadow: 0 20px 40px rgba(0,0,0,0.03);
}

.image-wrapper {
  position: relative;
  width: 100%;
  min-height: 400px;
  background-color: #f5f5f5;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

#preview-image {
  max-width: 100%;
  max-height: 70vh;
  display: block;
  object-fit: contain;
}

.status-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.status-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 2px solid rgba(0,0,0,0.1);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

.status-text {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

/* Controls */
.controls-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.step-indicators {
  display: flex;
  justify-content: center;
  gap: 60px;
  border-top: 1px solid var(--border-color);
  padding-top: 30px;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0.3;
  transition: opacity 0.3s ease;
}

.step.active {
  opacity: 1;
}

.step-num {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.step-label {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-style: italic;
}

.action-area {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 16px 32px;
  transition: all 0.2s ease;
}

.primary-btn {
  background-color: #000;
  color: #fff;
}

.primary-btn:hover {
  background-color: #333;
}

.secondary-btn {
  border: 1px solid #000;
  color: #000;
}

.secondary-btn:hover {
  background-color: #000;
  color: #fff;
}

.hidden {
  display: none !important;
}

.error-message {
  color: var(--error-color);
  text-align: center;
  font-size: 0.9rem;
  margin-top: 10px;
}

/* Footer */
.footer {
  padding: 40px 0;
  text-align: center;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

.footer p {
  font-size: 0.7rem;
  color: #999;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Responsive */
@media (max-width: 768px) {
  .headline {
    font-size: 2.5rem;
  }
  
  .app-container {
    padding: 0 20px;
  }
  
  .step-indicators {
    gap: 20px;
  }
  
  .step-label {
    font-size: 0.9rem;
  }
}
