/* ===============================
   ROOT VARIABLES (GLOBAL THEME)
================================ */
:root {
  --primary: #0a3cff;
  --primary-dark: #062db8;
  --success: #10b981;
  --bg-light: #f4f6fb;
  --card-bg: #ffffff;
  --text-dark: #1f2933;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* ===============================
   RESET
================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(135deg, #eef2ff, #f9fafb);
  color: var(--text-dark);
  line-height: 1.6;
}

/* ===============================
   CONTAINER
================================ */
.container {
  max-width: 1200px;
  margin: 80px auto;
  padding: 40px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.container h1 {
  text-align: center;
  font-size: 2.4rem;
  margin-bottom: 8px;
  color: var(--primary);
}

.subtitle {
  text-align: center;
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 40px;
}

/* ===============================
   MAIN GRID
================================ */
.main-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

/* ===============================
   INPUT / OUTPUT SECTIONS
================================ */
.input-section,
.output-section {
  padding: 30px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #f9fafb;
}

.output-section {
  background: linear-gradient(135deg, #f0f9ff, #ecfeff);
}

.input-section h2,
.output-section h2 {
  font-size: 1.4rem;
  margin-bottom: 15px;
}

/* ===============================
   TEXTAREA
================================ */
textarea {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 0.95rem;
  resize: vertical;
  transition: 0.3s ease;
  background: #ffffff;
}

textarea::placeholder {
  color: #9ca3af;
}

textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(10, 60, 255, 0.15);
}

/* ===============================
   BUTTONS
================================ */
.btn {
  display: inline-block;
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s ease;
}

.primary-btn {
  background: var(--primary);
  color: #ffffff;
}

.primary-btn:hover {
  background: var(--primary-dark);
}

.secondary-btn {
  background: #e5e7eb;
  color: var(--text-dark);
}

.secondary-btn:hover {
  background: #d1d5db;
}

.success-btn {
  background: var(--success);
  color: #ffffff;
  margin-top: 15px;
}

.success-btn:hover {
  filter: brightness(0.95);
}

.success-btn.copied {
  background: #059669;
}

/* ===============================
   ACTION BUTTONS (TOP)
================================ */
.action-buttons-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 15px;
}

/* ===============================
   BACK TO TOP
================================ */
#backToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  padding: 12px 18px;
  border-radius: 50px;
  background: var(--primary);
  color: #fff;
  border: none;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: var(--shadow);
  display: none;
}

#backToTop:hover {
  background: var(--primary-dark);
}

/* ===============================
   RESPONSIVE
================================ */
@media (max-width: 900px) {
  .main-content {
    grid-template-columns: 1fr;
  }

  .container {
    margin: 40px 15px;
    padding: 25px;
  }

  .container h1 {
    font-size: 2rem;
  }

  .action-buttons-top {
    grid-template-columns: 1fr;
  }
}
