/* ===============================
   GLOBAL STYLING
=============================== */

/* Reset margin and set default font */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #eef1f5;
}

/* ===============================
   LOGIN SCREEN
=============================== */

/* Center login content vertically and horizontally */
.center-screen {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* ===============================
   NAVBAR
=============================== */

/* Top navigation bar */
.navbar {
  height: 60px;
  background: #2f3e5c;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;

  /* Mobile default */
  padding: 0 10px;
}

/* App logo text */
.logo {
  font-size: 16px;
  font-weight: bold;
}

/* User profile image */
.profile-img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}

/* ===============================
   MAIN CONTAINER
=============================== */

/* Wrapper for main content */
.main-container {
  text-align: center;
  padding: 10px;
}

/* Page title styling */
.main-container h1 {
  margin-bottom: 20px;
  color: #2f3e5c;
  font-size: 22px;
}

/* Divider below title */
.divider {
  width: 90%;
  margin: 10px auto 20px;
  border: none;
  border-top: 1px solid #ccc;
}

/* ===============================
   CARD LAYOUT (MOBILE FIRST)
=============================== */

/* Container for two cards (input & output) */
.card-container {
  display: flex;
  flex-direction: column; /* Mobile default */
  gap: 20px;
  max-width: 100%;
  padding: 0 40px;
}

/* Individual card styling */
.card {
  width: 100%;
  background: white;
  padding: 10px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  text-align: left;
  display: flex;
  flex-direction: column;
}

/* Card section title */
.card h3 {
  margin-bottom: 15px;
}

/* Inner layout to push buttons to bottom */
.card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* ===============================
   INPUT & OUTPUT BOX
=============================== */

/* Common styling for textarea and output box */
.common-box {
  width: 100%;
  height: 20%; /* Mobile default */
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fafafa;
  font-size: 16px;
  box-sizing: border-box;
}

/* Textarea specific settings */
#user-input {
  resize: none;
}

/* Output box formatting */
#output-box {
  line-height: 1.6;
  font-size: 16px;
  overflow-y: auto;
}

/* Placeholder style for default output text */
.placeholder {
  color: #888;
}

/* ===============================
   BUTTONS
=============================== */

/* Base button styling */
button {
  margin-top: 15px;
  padding: 10px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
}

/* Primary buttons (Enhance & Regenerate) */
#enhance-btn,
#regenerate-btn {
  background: #2d6cdf;
  color: white;
  width: 100%; /* Mobile full width */
  font-size: 16px;
}

/* Secondary button (Copy) */
.secondary-btn {
  background: #e0e0e0;
}

/* Button group layout */
.action-buttons {
  display: flex;
  flex-direction: column; /* Mobile default */
  gap: 10px;
  margin-top: 15px;
}

/* Button click effect */
button:active {
  transform: scale(0.97);
}

/* Disabled button state */
button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ===============================
   TOAST NOTIFICATION
=============================== */

/* Toast container (bottom center) */
#toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 15px;
  border-radius: 6px;

  /* Hidden by default */
  opacity: 0;
  transition: opacity 0.3s;
}

/* Show toast */
#toast.show {
  opacity: 1;
}

/* ===============================
   DESKTOP RESPONSIVE (>=768px)
=============================== */

@media (min-width: 768px) {
  /* Navbar spacing */
  .navbar {
    padding: 0 20px;
    /* background: grey; */
    /* background: linear-gradient(90deg, #4f46e5, #9333ea); */
  }

  .logo {
    font-size: 20px;
  }

  .logo-img {
    height: 80px;
  }

  .profile-img {
    width: 35px;
    height: 35px;
  }

  /* Page title */
  .main-container h1 {
    margin-bottom: 30px;
    font-size: 28px;
  }

  .divider {
    width: 80%;
    margin: 10px auto 30px;
  }

  /* Card layout (side-by-side) */
  .card-container {
    flex-direction: row;
    gap: 30px;
    max-width: 94%;
    margin: 0 auto;
    padding: 0;
  }

  .card {
    flex: 1;
    padding: 25px;
  }

  /* Restore textarea height */
  .common-box {
    height: 260px;
  }

  /* Buttons inline */
  .action-buttons {
    flex-direction: row;
  }

  .action-buttons button {
    width: auto;
  }

  #enhance-btn,
  #regenerate-btn {
    width: auto;
    margin-top: auto;
  }
}
