/* =========================
   GLOBAL RESET & BASE
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-main: #f5f5f5;      /* whitesmoke */
  --bg-card: #ffffff;
  --text-main: #000000;
  --text-muted: #555;
  --border-soft: #e6e6e6;
  --accent: #11c3b0;
  --accent-2: #8298ff;
}

body {
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
}

/* =========================
   LAYOUT
========================= */
.container {
  max-width: 1100px;
  margin: auto;
  padding: 0 20px;
}

/* =========================
   HEADER
========================= */
header {
  background: #ffffff;
  border-bottom: 1px solid var(--border-soft);
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 12px;
}

.logo {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
  letter-spacing: 0.5px;
}

nav {
  display: flex;
  align-items: center;
}

/* =========================
   NAVIGATION
========================= */
nav a {
  margin-left: 20px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: #000;
  transition: width 0.3s ease;
}

nav a:hover {
  color: #000;
}

nav a:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: #fff;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: #000;
  border-radius: 4px;
}

/* =========================
   MAIN CONTENT
========================= */
main {
  padding: 60px 0;
}

/* Hero layout for the remove.bg page */
.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  align-items: start;
}

.hero-copy h1 {
  font-size: 2.6rem;
  margin: 0.2em 0 0.4em;
}

.hero-copy p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.pill {
  display: inline-block;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: #f0fffc;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
}

.bullets {
  padding-left: 1.2rem;
  color: var(--text-muted);
}

.bullets li {
  margin-bottom: 0.35rem;
}

.hero-panel {
  display: grid;
  gap: 1rem;
}

.panel {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 20px;
  border: 1px solid var(--border-soft);
  box-shadow: 0 8px 30px rgba(0,0,0,0.05);
}

.field-label {
  font-weight: 600;
  display: block;
  margin-bottom: 0.35rem;
}

form {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0 0;
}

input[type="file"] {
  font-family: inherit;
  color: var(--text-main);
}

input[type="text"],
input[type="password"],
input[type="email"] {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: #fff;
  font: inherit;
  color: var(--text-main);
}

select {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: #fff;
  font: inherit;
  color: var(--text-main);
}

button {
  align-self: start;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border: none;
  padding: 0.7rem 1.2rem;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(130, 152, 255, 0.25);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(130, 152, 255, 0.3);
}

button:active {
  transform: translateY(0);
}

.secondary-btn {
  background: #fff;
  color: var(--text-main);
  border: 1px solid var(--border-soft);
  box-shadow: none;
}

.alert {
  padding: 0.9rem 1rem;
  border-radius: 12px;
  margin: 0.5rem 0 0;
}

.alert.error {
  background: #ffe9e9;
  border: 1px solid #ffc4c4;
  color: #c23d3d;
}

.oauth-buttons {
  display: grid;
  gap: 10px;
}

.social-btn {
  display: inline-block;
  text-align: center;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  font-weight: 600;
  color: var(--text-main);
  background: #fff;
}

.social-btn.google {
  border-color: #dcdcdc;
}

.social-btn.apple {
  background: #0a0a0a;
  color: #fff;
  border-color: #0a0a0a;
}

.social-btn .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-right: 8px;
  vertical-align: middle;
}

.social-btn svg {
  width: 100%;
  height: 100%;
}

.result-panel {
  background: #f8fbff;
}

.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.result {
  margin: 1rem 0 0;
}

.result img {
  width: 100%;
  max-width: 520px;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  display: block;
}

.download {
  font-weight: 600;
  color: var(--accent);
}

.text-muted {
  color: var(--text-muted);
}

/* Card-style content helper */
.card {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 30px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.05);
}

/* =========================
   FOOTER
========================= */
footer {
  background: #ffffff;
  border-top: 1px solid var(--border-soft);
  padding: 25px 0;
}

footer p {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* =========================
   AUTH CARD
========================= */
.auth-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 25px 70px rgba(0,0,0,0.08);
  padding: 32px;
  max-width: 1000px;
  margin: 30px auto;
}

.auth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
}

.auth-illustration img {
  width: 100%;
  border-radius: 12px;
  object-fit: cover;
}

.auth-form h1 {
  margin-bottom: 12px;
}

.input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 0.4rem 0.65rem;
  background: #fff;
}

.input-row input {
  border: none;
  outline: none;
  flex: 1;
  padding: 0.45rem 0.2rem;
  font: inherit;
}

.input-icon {
  font-size: 1rem;
}

.remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  margin: 10px 0;
  color: var(--text-muted);
}

.primary-btn {
  width: 100%;
  justify-content: center;
}

.social-login {
  margin-top: 14px;
  display: grid;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.social-icons {
  display: flex;
  gap: 10px;
  align-items: center;
}

.social-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.social-circle.fb { background: #1877f2; }
.social-circle.tw { background: #111; }
.social-circle.google {
  background: #fff;
  border: 1px solid var(--border-soft);
}

.auth-link {
  margin-top: 12px;
  color: var(--text-muted);
}

.editor-shell {
  margin: 30px auto;
}

.editor-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.editor-actions {
  min-width: 280px;
  display: grid;
  gap: 6px;
}

.editor-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.editor-body {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  margin-top: 16px;
}

.editor-thumbs {
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}

.thumbs-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.thumbs-list {
  display: grid;
  gap: 8px;
}

.thumb {
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 10px;
  background: #fafafa;
}

.thumb.active {
  border-color: var(--accent);
  box-shadow: 0 6px 18px rgba(0,0,0,0.05);
}

.thumb-num {
  font-weight: 600;
  color: var(--text-muted);
}

.tiny-btn {
  padding: 0.3rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  background: #fff;
  cursor: pointer;
}

.editor-canvas {
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: #fff;
  display: grid;
  grid-template-rows: auto 1fr;
}

.editor-toolbar {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--border-soft);
  overflow-x: auto;
}

.tool-btn {
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: #f9f9f9;
  cursor: pointer;
  white-space: nowrap;
}

.tool-btn.active {
  border-color: var(--accent);
  background: #e8fffb;
}

.canvas-area {
  position: relative;
  padding: 12px;
  overflow: hidden;
  min-height: 320px;
  display: grid;
  place-items: center;
}

.canvas-placeholder {
  text-align: center;
  color: var(--text-muted);
  border: 2px dashed var(--border-soft);
  border-radius: 12px;
  padding: 24px;
  width: 100%;
}

.canvas-note {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background: #fff;
  border: 1px solid var(--border-soft);
  padding: 6px 10px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

@media (max-width: 960px) {
  .editor-head { flex-direction: column; }
  .editor-body { grid-template-columns: 1fr; }
  .editor-actions { width: 100%; }
}
@media (max-width: 900px) {
  .auth-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 24px; }
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 768px) {
  header .container {
    flex-direction: column;
    height: auto;
    padding: 15px 0;
  }

  .nav-toggle {
    display: flex;
    align-self: flex-end;
  }

  nav {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    margin-top: 6px;
    display: none;
  }

  header.nav-open nav {
    display: flex;
  }

  nav a {
    margin: 6px 0;
  }
}
