/* Basic Page Setup */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Roboto, sans-serif;
  background: #f9f9fb;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Container that grows */
.container {
  background: #fff;
  max-width: 720px;
  width: 100%;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
  margin: 40px auto;
  flex: 1;
}

/* Headings */
h1 {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 30px;
  color: #333;
}

.subtitle {
  font-weight: normal;
  font-size: 0.9rem;
  color: #888;
}

/* Form Layout */
.form-group {
  margin-bottom: 20px;
}

label {
  font-weight: 600;
  margin-bottom: 8px;
  display: block;
  color: #444;
}

input[type="text"],
textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  border: 1px solid #ccc;
  border-radius: 8px;
  outline-color: #5b9bd5;
  transition: all 0.2s ease-in-out;
}

input[type="text"]:focus,
textarea:focus {
  border-color: #5b9bd5;
  box-shadow: 0 0 0 2px rgba(91, 155, 213, 0.2);
}

/* Button */
.run-btn {
  background: #5b9bd5;
  color: white;
  font-size: 16px;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
  display: inline-block;
  margin-bottom: 24px;
}

.run-btn:hover {
  background: #417abc;
}

/* Result Section */
.result-section h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: #444;
}

pre {
  background: #f4f4f6;
  padding: 16px;
  border-radius: 8px;
  font-size: 14px;
  white-space: pre-wrap;
  border: 1px solid #e1e1e8;
  overflow-x: auto;
}

/* Ad placeholder styling */
.ad-space {
  margin-top: 40px;
  text-align: center;
}

/* Footer */
.footer {
  padding: 16px 0;
  text-align: center;
  font-size: 0.9rem;
  color: #777;
  border-top: 1px solid #eee;
  background-color: #f9f9fb;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.clear-inline-btn {
  background: none;
  border: none;
  color: #5b9bd5;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.2s;
}

.clear-inline-btn:hover {
  background: rgba(91, 155, 213, 0.1);
}

.custom-select {
    appearance: none; /* Remove native arrow */
    -webkit-appearance: none;
    -moz-appearance: none;

    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M 20 45 L 70 95 L 120 45' stroke='%235b9bd5' stroke-width='15' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px 16px;

    width: 100%;
    padding: 12px 40px 12px 14px; /* Add space for arrow */
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    color: #333;
    transition: border 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.custom-select:focus {
    border-color: #5b9bd5;
    box-shadow: 0 0 0 2px rgba(91, 155, 213, 0.2);
    outline: none;
}

.custom-select option {
    color: #333;
    background-color: #fff;
}

.custom-select:hover {
    border-color: #999;
}

.section-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2.5rem;
}

.info-card {
    background-color: #f9f9fb;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    padding: 1.5rem 2rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.info-card:nth-child(1) { animation-delay: 0.1s; }
.info-card:nth-child(2) { animation-delay: 0.3s; }
.info-card:nth-child(3) { animation-delay: 0.5s; }

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

.info-card h2 {
    margin-top: 0;
    font-size: 1.6rem;
    color: #2c3e50;
}

.info-card p {
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
}

@media (min-width: 768px) {
    .section-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --- Navbar Styling --- */
.navbar {
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 999;
  padding: 12px 0;
  font-family: 'Segoe UI', Roboto, sans-serif;
}

.navbar-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.brand {
  font-size: 1.5rem;
  font-weight: 600;
  text-decoration: none;
  color: #333;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 18px;
  align-items: center;
  margin: 0;
  padding: 0;
}

.nav-links li a {
  text-decoration: none;
  font-weight: 500;
  color: #444;
  padding: 8px 12px;
  transition: 0.2s ease;
  border-radius: 6px;
}

.nav-links li a:hover {
  background: #f0f0f0;
  color: #222;
}

/* --- Dropdown --- */
.dropdown {
  position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    list-style: none;
    padding: 0;
    margin: 0;
    border: 1px solid #ccc;
    min-width: 180px;
    z-index: 1000;
}

.dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-menu li a {
    display: block;
    padding: 8px 12px;
    text-decoration: none;
    color: #333;
}

.dropdown-menu li a:hover {
  background: #f4f4f4;
  color: #000;
}

/* --- Mobile Toggle --- */
.nav-toggle {
  display: none;
}

.nav-toggle-label {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
  content: '';
  background: #444;
  height: 3px;
  width: 25px;
  border-radius: 4px;
  display: block;
  position: relative;
  transition: 0.3s;
}

.nav-toggle-label span::before {
  top: -8px;
  position: absolute;
}

.nav-toggle-label span::after {
  bottom: -8px;
  position: absolute;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: none;
  }

  .nav-toggle-label {
    display: flex;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0;
    margin-top: 12px;
  }

  .nav-links li {
    border-top: 1px solid #eee;
    padding: 12px 0;
  }

  .nav-toggle:checked + .nav-toggle-label + .nav-links {
    display: flex;
  }

  .dropdown-menu {
    position: static;
    box-shadow: none;
    padding-left: 24px;
  }

  .dropdown:hover .dropdown-menu {
    display: block;
  }
}

#formatBtn,
#copyBtn {
  background: #5b9bd5;
  color: white;
  font-size: 16px;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
  display: inline-block;
  margin-bottom: 24px;
}

/* Hover effect */
#formatBtn:hover,
#copyBtn:hover {
  background: #417abc;
}


#formatBtn,
#copyBtn {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

#formatBtn:active,
#copyBtn:active {
  transform: scale(0.98);
}
