* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #A3B087;
  --primary-dark: #8a9671;
  --primary-light: #f0f2eb;
  --secondary: #313647;
  --text-dark: #313647;
  --text-light: #5a6270;
  --border-color: #e8e6e1;
  --bg-light: #F9F8F6;
  --white: #ffffff;
  --shadow-sm: 0 1px 3px rgba(49, 54, 71, 0.1);
  --shadow-md: 0 4px 12px rgba(49, 54, 71, 0.15);
  --shadow-lg: 0 10px 30px rgba(49, 54, 71, 0.2);
}

html, body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #A3B087 0%, #313647 100%);
  color: var(--text-dark);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
}

/* Navbar */
.navbar {
  background: var(--white);
  box-shadow: var(--shadow-md);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.nav-buttons {
  display: flex;
  gap: 10px;
}

.nav-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 8px 12px;
  transition: all 0.3s ease;
  border-radius: 6px;
}

.nav-btn:hover {
  background: var(--primary-light);
  transform: scale(1.1);
}

/* Larger options icon in header */
#optionsBtn {
  font-size: 28px;
  padding: 6px 10px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

/* Main content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 40px 20px;
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
}

.hero {
  text-align: center;
  margin-bottom: 50px;
  color: white;
}

.hero h1 {
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 12px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero p {
  font-size: 18px;
  opacity: 0.95;
  max-width: 600px;
  margin: 0 auto;
}

/* Converter Container */
.converter-container {
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin-bottom: 30px;
}

.converter-section {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  padding: 30px;
  align-items: start;
}

.input-wrapper,
.output-wrapper {
  display: flex;
  flex-direction: column;
}

.section-label {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 10px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-field {
  width: 100%;
  padding: 16px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-size: 15px;
  line-height: 1.6;
  resize: vertical;
  min-height: 200px;
  transition: all 0.3s ease;
  background: var(--bg-light);
}

.input-field:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(163, 176, 135, 0.1);
  background: var(--white);
}

.input-field::placeholder {
  color: var(--text-light);
}

.output-field {
  width: 100%;
  padding: 16px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 18px;
  line-height: 1.8;
  min-height: 200px;
  background: var(--bg-light);
  word-wrap: break-word;
  overflow-y: auto;
  transition: all 0.3s ease;
}

.output-field:not(:empty) {
  border-color: var(--primary);
  background: white;
}

.arrow-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--primary);
  margin: 20px 0;
}

/* Actions */
.actions {
  padding: 0 30px 30px 30px;
  display: flex;
  gap: 12px;
  justify-content: center;
}

.btn {
  padding: 12px 28px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Settings Panel */
.settings-panel {
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.settings-header {
  background: var(--bg-light);
  padding: 20px 30px;
  border-bottom: 1px solid var(--border-color);
}

.settings-header h3 {
  font-size: 16px;
  color: var(--text-dark);
  margin: 0;
}

.settings-content {
  padding: 25px 30px;
}

.checkbox-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.checkbox-wrapper input[type="checkbox"] {
  display: none;
}

.checkbox-custom {
  width: 20px;
  height: 20px;
  border: 2px solid var(--primary);
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkbox-custom {
  background: var(--primary);
  border-color: var(--primary);
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkbox-custom::after {
  content: '✓';
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.checkbox-label {
  font-weight: 600;
  color: var(--text-dark);
  font-size: 15px;
}

.checkbox-hint {
  display: block;
  font-size: 13px;
  color: var(--text-light);
  margin-top: 2px;
}

/* Footer */
.footer {
  background: var(--secondary);
  color: var(--white);
  text-align: center;
  padding: 20px;
  font-size: 13px;
}

/* Logo image defaults */
.logo-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

/* Center the header title between logo and nav buttons */
.titleHed {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Responsive Design */
@media (max-width: 768px) {
  .converter-section {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 20px;
  }

  .arrow-divider {
    transform: rotate(90deg);
    margin: 10px 0;
    font-size: 20px;
  }

  .hero p {
    font-size: 15px;
  }

  .input-field,
  .output-field {
    min-height: 150px;
    font-size: 14px;
  }

  .main-content {
    padding: 20px 15px;
  }

  .navbar-content {
    padding: 0 15px;
  }

  .logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
}

  .titleHed {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

  .titleHed h1 {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #A3B087, #313647);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 24px;
  }

  .hero p {
    font-size: 13px;
  }

  .input-field,
  .output-field {
    min-height: 120px;
    padding: 12px;
    font-size: 13px;
  }

  .btn {
    padding: 10px 16px;
    font-size: 12px;
  }

  .converter-section,
  .settings-header,
  .settings-content {
    padding: 15px;
  }
}
