:root {
  --bg-color: #000000;
  --bg-gradient: radial-gradient(circle at top right, #111111, #000000);
  --surface-color: rgba(20, 20, 20, 0.7);
  --surface-border: rgba(255, 255, 255, 0.12);
  --surface-border-hover: rgba(255, 255, 255, 0.3);
  --primary-color: #ffffff;
  --primary-hover: #e0e0e0;
  --primary-glow: rgba(255, 255, 255, 0.15);
  --secondary-color: #a3a3a3;
  --text-main: #ffffff;
  --text-muted: #888888;
  --danger-color: #ff4a4a;
  --input-bg: rgba(0, 0, 0, 0.4);
  --border-radius: 16px;
  --transition-speed: 0.4s;
}

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

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg-color);
  background-image: var(--bg-gradient);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
  line-height: 1.5;
}

.app-container {
  width: 100%;
  max-width: 800px;
  background: var(--surface-color);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--surface-border);
  border-radius: var(--border-radius);
  padding: 40px;
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.8);
  animation: slideUp var(--transition-speed) cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

h1, h2 { 
  color: var(--text-main); 
  text-align: center; 
  margin-bottom: 24px; 
  font-weight: 600;
  letter-spacing: -0.5px;
}
h2 { 
  text-align: left; 
  font-size: 20px; 
  font-weight: 500;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--surface-border);
  padding-bottom: 12px;
}

.stepper { 
  display: flex; 
  justify-content: space-between; 
  margin-bottom: 40px; 
  position: relative; 
}
.stepper::before { 
  content: ''; 
  position: absolute; 
  top: 50%; 
  left: 0; 
  right: 0; 
  height: 1px; 
  background: var(--surface-border); 
  z-index: 1; 
}
.step-indicator { 
  width: 36px; 
  height: 36px; 
  border-radius: 50%; 
  background: #000; 
  border: 1px solid var(--surface-border); 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  font-weight: 500; 
  color: var(--text-muted); 
  z-index: 2; 
  transition: all var(--transition-speed) ease; 
}
.step-indicator.active { 
  border-color: var(--primary-color); 
  color: var(--primary-color); 
  box-shadow: 0 0 15px var(--primary-glow); 
  transform: scale(1.1);
}
.step-indicator.completed { 
  background: var(--primary-color); 
  border-color: var(--primary-color); 
  color: #000; 
}

.form-group { margin-bottom: 24px; }
label { 
  display: block; 
  font-size: 13px; 
  margin-bottom: 8px; 
  color: var(--text-muted); 
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
input, select, textarea { 
  width: 100%; 
  padding: 14px 16px; 
  border-radius: 10px; 
  border: 1px solid var(--surface-border); 
  background: var(--input-bg); 
  color: var(--text-main); 
  font-family: inherit; 
  font-size: 15px;
  transition: all 0.3s ease;
}
option {
  background: var(--bg-color);
  color: var(--text-main);
}
input::placeholder, textarea::placeholder {
  color: #555;
}
input:focus, select:focus, textarea:focus { 
  outline: none; 
  border-color: var(--primary-color); 
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.05); 
}

input[type="file"] {
  padding: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--surface-border);
  cursor: pointer;
}
input[type="file"]:hover {
  border-color: var(--surface-border-hover);
}

.btn-primary, .btn-secondary, .btn-danger { 
  padding: 12px 24px; 
  border-radius: 10px; 
  border: none; 
  cursor: pointer; 
  font-weight: 600; 
  font-size: 15px;
  font-family: inherit; 
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); 
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-primary { 
  background: var(--primary-color); 
  color: #000; 
  box-shadow: 0 4px 15px var(--primary-glow); 
}
.btn-primary:hover:not(:disabled) { 
  background: var(--primary-hover); 
  transform: translateY(-2px); 
  box-shadow: 0 8px 20px rgba(255, 255, 255, 0.25);
}
.btn-primary:disabled { 
  opacity: 0.5; 
  cursor: not-allowed; 
  box-shadow: none;
}
.btn-secondary { 
  background: transparent; 
  color: var(--text-main); 
  border: 1px solid var(--surface-border); 
}
.btn-secondary:hover { 
  background: rgba(255, 255, 255, 0.1); 
  border-color: var(--surface-border-hover);
}

.step-content { display: none; opacity: 0; }
.step-content.active { display: block; animation: fadeIn 0.5s ease forwards; }

.flex-between { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  margin-top: 40px; 
}

@keyframes fadeIn { 
  from { opacity: 0; } 
  to { opacity: 1; } 
}
@keyframes slideUp { 
  from { opacity: 0; transform: translateY(15px); } 
  to { opacity: 1; transform: translateY(0); } 
}

#status-banner { 
  display: none; 
  padding: 16px; 
  border-radius: 10px; 
  margin-bottom: 24px; 
  text-align: center; 
  font-weight: 500; 
  letter-spacing: 0.5px;
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Simple table style for excel preview */
.table-preview {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-size: 13px;
}
.table-preview th {
  background: rgba(255,255,255,0.05);
  text-align: left;
  padding: 8px;
  border: 1px solid var(--surface-border);
}
.table-preview td {
  padding: 8px;
  border: 1px solid var(--surface-border);
}

/* Mobile Responsiveness */
@media screen and (max-width: 600px) {
  body {
    padding: 20px 12px;
  }
  .app-container {
    padding: 24px 16px;
  }
  h1 {
    font-size: 24px;
  }
  h2 {
    font-size: 18px;
  }
  .stepper {
    margin-bottom: 30px;
  }
  .step-indicator {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
  .flex-between {
    flex-direction: column;
    gap: 12px;
    margin-top: 30px;
  }
  .flex-between button {
    width: 100%;
  }
  #btn-back {
    order: 2;
  }
  #btn-next, #btn-submit {
    order: 1;
  }
  /* Adjust image preview list on mobile */
  #image-preview-container > div {
    flex-wrap: wrap;
    justify-content: space-between;
  }
  .img-rename-input {
    min-width: 100%;
    order: 3;
    margin-top: 8px !important;
  }
}
