:root {
  --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --bg-primary: #0F172A;
  --bg-surface: #1E293B;
  --bg-card: rgba(30, 41, 59, 0.7);
  --border-color: rgba(255, 255, 255, 0.1);
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --accent-shopee: #EE4D2D;
  --accent-shopee-hover: #FF6849;
  --accent-green: #10B981;
  --accent-purple: #8B5CF6;
  --radius-lg: 16px;
  --radius-md: 10px;
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-family);
  background: radial-gradient(circle at 50% 0%, #1E1B4B 0%, #0F172A 100%);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header Navbar */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #FFF;
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: var(--accent-shopee);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 4px 14px rgba(238, 77, 45, 0.4);
}

.brand span {
  color: var(--accent-shopee);
}

.badge-pill {
  background: rgba(238, 77, 45, 0.15);
  color: #FF8066;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(238, 77, 45, 0.3);
}

/* Layout Grid */
.container {
  max-width: 1280px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  flex: 1;
}

@media (max-width: 992px) {
  .container {
    grid-template-columns: 1fr;
  }
}

/* Glassmorphism Cards */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.input-wrapper {
  display: flex;
  gap: 0.5rem;
}

.input-field {
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: #FFF;
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition);
}

.input-field:focus {
  outline: none;
  border-color: var(--accent-shopee);
  box-shadow: 0 0 0 3px rgba(238, 77, 45, 0.25);
}

.btn {
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-md);
  border: none;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-shopee) 0%, #FF7337 100%);
  color: #FFF;
  box-shadow: 0 4px 15px rgba(238, 77, 45, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(238, 77, 45, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #FFF;
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-success {
  background: #10B981;
  color: #FFF;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
}

.btn-success:hover {
  transform: translateY(-2px);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Theme Selector Buttons */
.theme-selector {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.theme-option {
  padding: 0.75rem;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  background: rgba(15, 23, 42, 0.6);
  cursor: pointer;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition);
}

.theme-option.active {
  border-color: var(--accent-shopee);
  color: #FFF;
  background: rgba(238, 77, 45, 0.15);
}

/* Live Preview Stage */
.preview-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.banner-preview-box {
  width: 100%;
  max-width: 480px;
  aspect-ratio: 1 / 1;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  position: relative;
  border: 1px solid var(--border-color);
}

.banner-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.action-bar {
  display: flex;
  gap: 1rem;
  width: 100%;
  max-width: 480px;
  margin-top: 1.5rem;
}

.action-bar .btn {
  flex: 1;
}

/* Spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #FFF;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: none;
}

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

.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #10B981;
  color: #FFF;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  display: none;
  animation: slideUp 0.3s ease-out;
  z-index: 100;
}

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

footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-color);
  margin-top: 3rem;
}

/* Outline Button Variant */
.btn-outline {
  background: transparent;
  color: var(--accent-shopee);
  border: 1.5px solid var(--accent-shopee);
}

.btn-outline:hover {
  background: rgba(238, 77, 45, 0.12);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  border-radius: 8px;
}

/* Caption Box */
.caption-box {
  width: 100%;
  max-width: 480px;
  margin-top: 1.5rem;
}

.caption-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.65rem;
}

.caption-header .form-label {
  flex: 1;
  margin: 0;
  font-size: 0.9rem;
}

.caption-textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: #E2E8F0;
  font-family: var(--font-family);
  font-size: 0.88rem;
  line-height: 1.6;
  resize: vertical;
  transition: var(--transition);
}

.caption-textarea:focus {
  outline: none;
  border-color: var(--accent-shopee);
  box-shadow: 0 0 0 3px rgba(238, 77, 45, 0.2);
}

.caption-textarea::placeholder {
  color: var(--text-secondary);
  font-style: italic;
}

