:root {
  --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  --card-bg: rgba(30, 41, 59, 0.7);
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  --accent-hover: linear-gradient(135deg, #4f46e5 0%, #9333ea 100%);
  --text-main: #f8fafc;
  --text-sub: #94a3b8;
  --border: rgba(255, 255, 255, 0.1);
  --radius: 16px;
}

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

body {
  background: var(--bg-gradient);
  color: var(--text-main);
  padding: 16px;
  min-height: 100vh;
}

.container {
  max-width: 480px;
  margin: 0 auto;
}

.header {
  text-align: center;
  margin-bottom: 20px;
}

.logo-icon {
  font-size: 42px;
  margin-bottom: 4px;
}

h1 {
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, #818cf8, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  color: var(--text-sub);
  font-size: 13px;
  margin-top: 4px;
}

.card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

.form-group {
  margin-bottom: 14px;
}

.form-group:last-child {
  margin-bottom: 0;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 6px;
}

select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.8);
  color: var(--text-main);
  font-size: 15px;
  outline: none;
}

.upload-area {
  background: var(--card-bg);
  border: 2px dashed #6366f1;
  border-radius: var(--radius);
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 16px;
}

.upload-area:active {
  transform: scale(0.98);
  border-color: #a855f7;
}

.upload-content .icon {
  font-size: 36px;
  margin-bottom: 8px;
}

.upload-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.upload-hint {
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 4px;
}

.preview-container {
  position: relative;
  margin-bottom: 16px;
}

.preview {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #000;
}

.remove-btn {
  margin-top: 8px;
  width: 100%;
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
  padding: 8px;
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
}

.btn {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: var(--radius);
  background: var(--accent-gradient);
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
  transition: all 0.2s;
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.4;
  box-shadow: none;
  cursor: not-allowed;
}

.loader {
  text-align: center;
  margin: 24px 0;
}

.spinner {
  width: 42px;
  height: 42px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: #a855f7;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}

.loader-text {
  font-size: 14px;
  color: var(--text-sub);
}

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

.result-card {
  margin-top: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  white-space: pre-wrap;
  font-size: 14px;
  line-height: 1.6;
  color: #e2e8f0;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}
