/* Floating view-switch styles (shared with index.html) */
.view-switch {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
}
.view-switch__btn {
  background: rgba(255, 77, 148, 0.95);
  color: #fff;
  padding: 8px 12px;
  border-radius: 20px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  display: inline-block;
}
.view-switch__btn:active {
  transform: translateY(1px);
}
@media (max-width: 480px) {
  .view-switch {
    right: 10px;
    top: 10px;
  }
  .view-switch__btn {
    padding: 7px 10px;
    font-size: 13px;
  }
}

:root {
  --primary-color: #ff4d94;
  --secondary-color: #f8bbd0;
  --accent-color: #ad1457;
  --bg-gradient: linear-gradient(135deg, #fff5f8 0%, #ffe4ed 100%);
  --card-bg: rgba(255, 255, 255, 0.95);
  --shadow: 0 8px 30px rgba(255, 77, 148, 0.15);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: var(--bg-gradient);
  min-height: 100vh;
  color: #444;
  display: flex;
  justify-content: center;
  background-image:
    radial-gradient(at 0% 0%, rgba(255, 117, 140, 0.15) 0px, transparent 50%),
    radial-gradient(
      at 100% 100%,
      rgba(255, 126, 179, 0.15) 0px,
      transparent 50%
    );
  background-attachment: fixed;
}

.goog-te-banner-frame,
.goog-te-balloon-frame,
.goog-te-menu-value,
.skiptranslate,
#google_translate_element,
.goog-te-gadget-icon,
.VIpgJd-Zvi9ab-OR9Uu-AS1p-wa {
  display: none !important;
  visibility: hidden !important;
}

[class*="pgJd"] {
  display: none !important;
}

#goog-gt-tt,
.goog-te-balloon-frame {
  display: none !important;
}

.goog-text-highlight {
  background: none !important;
  box-shadow: none !important;
}

.wrap {
  width: 100%;
  max-width: 500px;
  padding: 20px;
  animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── Tiêu đề ─── */
header {
  text-align: center;
  margin-bottom: 25px;
}

header h1 {
  color: var(--accent-color);
  font-size: 1.8rem;
  margin: 10px 0;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.05);
}

/* ─── Section Card ─── */
.card {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.card h2 {
  margin-top: 0;
  font-size: 1.1rem;
  color: var(--accent-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ─── Steps ─── */
.steps-list {
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.6;
}

.steps-list li {
  margin-bottom: 8px;
}

.steps-list strong {
  color: var(--primary-color);
}

/* ─── Buttons & Tools ─── */
.tools-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 15px;
}

.full-width {
  grid-column: span 2;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  border: none;
  gap: 8px;
  text-align: center;
}

/* Primary Style */
.btn-primary {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 77, 148, 0.3);
}

.btn-primary:hover {
  background: var(--accent-color);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Outline Style */
.btn-outline {
  background: #fff;
  color: var(--accent-color);
  border: 1.5px solid var(--secondary-color);
}

.btn-outline:hover {
  background: var(--secondary-color);
  color: var(--accent-color);
}

/* Ghost Style */
.btn-ghost {
  background: #f1f1f1;
  color: #666;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  background: #ccc;
  color: #888;
  box-shadow: none;
  border-color: #ddd;
}

/* ─── Canvas Result ─── */
.canvas-container {
  position: relative;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  line-height: 0;
}

#canvas {
  width: 100%;
  height: auto;
  display: block;
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  background: #e8f5e9;
  color: #2e7d32;
  font-size: 12px;
  margin-bottom: 10px;
  font-weight: bold;
}

/* ─── Mobile Optimization ─── */
@media (max-width: 400px) {
  .tools-grid {
    grid-template-columns: 1fr;
  }

  .full-width {
    grid-column: span 1;
  }

  .card {
    padding: 16px;
  }
}
