:root {
  --primary-color: #8d6e63;
  --primary-hover: #6d4c41;
  --bg-color: #faf9f6;
  --text-color: #4e342e;
  --text-muted: #8d6e63;
  --card-bg: #ffffff;
  --border-color: #e7e5e4;
  --success-color: #10b981;
  --error-color: #ef4444;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  padding: 0;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
  flex: 1;
}

/* Header & Title */
header {
  margin-bottom: 1.5rem;
  text-align: center;
}

.title-container h1 {
  font-weight: 800;
  font-size: 2rem;
  color: #3e2723;
  margin-bottom: 0.25rem;
  letter-spacing: -0.025em;
  background: linear-gradient(to right, #8d6e63, #5d4037);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.title-container p {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Client Side Badge */
.client-side-badge {
  display: inline-flex;
  align-items: center;
  background-color: #efebe9;
  color: #5d4037;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  border: 1px solid #d7ccc8;
}

.client-side-badge.footer-badge {
  margin: 0.5rem 0;
  background-color: transparent;
  border: none;
  box-shadow: none;
  color: var(--text-muted);
}

.client-side-badge svg {
  width: 1rem;
  height: 1rem;
  margin-right: 0.5rem;
}

/* Main Converter Area */
.converter-container {
  background-color: var(--card-bg);
  border-radius: 1rem;
  box-shadow: 0 10px 15px -3px rgba(62, 39, 35, 0.05), 0 4px 6px -2px rgba(62, 39, 35, 0.02);
  padding: 2rem;
  border: 1px solid var(--border-color);
}

.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #5d4037;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.code-container {
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
  height: 500px;
}

.CodeMirror {
  height: 100% !important;
  font-family: 'Fira Code', monospace;
  font-size: 14px;
}

.button-group {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Controls & Options */
.controls-area {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: none;
}

/* Buttons */
.btn {
  font-weight: 600;
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  box-shadow: 0 4px 6px -1px rgba(141, 110, 99, 0.5);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 8px -1px rgba(141, 110, 99, 0.6);
}

.btn-secondary {
  background-color: #f5f5f4;
  color: #57534e;
  border: 1px solid #e7e5e4;
}

.btn-secondary:hover {
  background-color: #e7e5e4;
  color: #44403c;
  border-color: #d6d3d1;
}

#copyButton {
  margin-top: 1rem;
}

.error-message {
  background-color: #fef2f2;
  color: var(--error-color);
  padding: 0.75rem;
  border-radius: 0.5rem;
  margin-top: 1rem;
  border: 1px solid #fecaca;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
}

/* Footer */
.footer {
  margin-top: auto;
  padding: 2rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border-color);
}

.footer a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.footer a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
  .title-container h1 {
    font-size: 2rem;
  }
  
  .converter-container {
    padding: 1rem;
  }
  
  .code-container {
    height: 350px;
  }
}
