/* Base variables and dark mode */
:root {
--primary-color: #4BC17A;
--headline-color: #333;
--text-color: #555;
--border-color: #dfe6e9;
--background-color: #fff;
--textarea-background: rgba(255, 255, 255, 0.8);
--empty-background: #f0f0f0;
--header-bg: #ffffff;
--footer-bg: #ffffff;
--hamburger-color: #555;
}

.dark-mode {
--headline-color: #f0f0f0;
--text-color: #e0e0e0;
--border-color: #4a4a4a;
--background-color: #1a1a1a;
--textarea-background: rgba(40, 40, 40, 0.8);
--empty-background: #2a2a2a;
--header-bg: #2d2d2d;
--footer-bg: #2d2d2d;
--hamburger-color: #e0e0e0;
}

/* Base styles */
html, body {
margin: 0;
padding: 0;
}

#text-diff-checker {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
background-color: var(--background-color);
color: var(--text-color);
transition: background-color 0.3s ease, color 0.3s ease;
margin: 0;
padding: 0;
min-height: 100vh;
display: flex;
flex-direction: column;
}

/* Header Styles */
.header {
background-color: var(--header-bg);
padding: 1rem 2rem;
position: sticky;
top: 0;
z-index: 1000;
display: flex;
justify-content: space-between;
align-items: center;
height: 72px;
box-sizing: border-box;
}

.header-left {
display: flex;
align-items: center;
gap: 13rem;
}

.header-right {
display: flex;
align-items: center;
gap: 1rem;
}

/* Hamburger Menu Styles */
.hamburger-menu {
display: none;
flex-direction: column;
justify-content: space-between;
width: 24px;
height: 20px;
background: none;
border: none;
cursor: pointer;
padding: 0;
position: relative;
z-index: 1001;
}

.hamburger-menu span {
display: block;
width: 100%;
height: 2px;
background-color: var(--hamburger-color);
transition: all 0.3s ease;
}

.hamburger-menu:hover {
    background-color: transparent;
}

.hamburger-menu.active span:nth-child(1) {
transform: translateY(9px) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
transform: translateY(-9px) rotate(-45deg);
}

/* Logo Styles */
.logo-container {
height: 30px;
position: relative;
display: flex;
align-items: center;
}

.logo-container a {
display: flex;
height: 100%;
align-items: center;
text-decoration: none;
}

.logo {
height: 100%;
width: auto;
position: absolute;
top: 50%;
left: 0;
transform: translateY(-50%);
transition: opacity 0.3s ease;
}

/* Navigation Styles */
.header-nav {
display: flex;
gap: 1rem;
align-items: center;
height: 100%;
}

.nav-link {
color: var(--text-color);
text-decoration: none;
padding: 0.5rem 0.8rem;
border-radius: 5px;
font-size: 0.95rem;
transition: all 0.3s ease;
position: relative;
white-space: nowrap;
}

.nav-link:hover {
color: var(--primary-color);
background-color: rgba(75, 193, 122, 0.1);
}

.nav-link.active {
color: var(--primary-color);
background-color: rgba(75, 193, 122, 0.15);
font-weight: 500;
}

/* Logo Theme Visibility */
.logo-light {
opacity: 1;
}

.logo-dark {
opacity: 0;
}

.dark-mode .logo-light {
opacity: 0;
}

.dark-mode .logo-dark {
opacity: 1;
}

/* Footer Styles */
.footer {
background-color: var(--footer-bg);
padding: 1rem;
margin-top: auto;
}

.footer-content {
max-width: 1200px;
margin: 0 auto;
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 1rem;
}

.footer-links {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 1.5rem;
}

.footer-links a {
color: var(--text-color);
text-decoration: none;
font-size: 0.9rem;
transition: color 0.3s ease;
position: relative;
white-space: nowrap;
}

.footer-links a:hover {
color: var(--primary-color);
}

.footer-links a:not(:last-child):after {
content: "•";
position: absolute;
right: -0.9rem;
color: var(--text-color);
opacity: 0.5;
}

.copyright {
margin: 0;
color: var(--text-color);
font-size: 0.9rem;
opacity: 0.8;
white-space: nowrap;
}

/* Main Content Styles */
.main-content {
flex: 1;
padding: 8% 20px 2% 20px;
}

.page-container {
display: flex;
justify-content: center;
align-items: flex-start;
width: 100%;
}

.container {
width: 100%;
}

h4 {
color: var(--headline-color) !important;
font-family: inherit !important;
line-height: 1.2 !important;
margin-bottom: 15px !important;
font-size: 0.8em !important;
font-weight: 500 !important;
}

.input-container {
display: flex;
flex-direction: column;
gap: 20px;
}

.column {
flex: 1;
min-width: 0;
}

textarea,
.diff-content {
font-size: 14px;
line-height: 1.5;
}

textarea {
width: 100%;
height: 300px;
margin-bottom: 10px;
box-sizing: border-box;
padding: 15px;
border: 1px solid var(--border-color);
border-radius: 5px;
resize: vertical;
background-color: var(--textarea-background);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
color: var(--text-color);
transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

textarea:focus {
outline: none;
border-color: var(--primary-color);
box-shadow: 0 0 0 3px rgba(75, 193, 122, 0.2);
}

/* Diff Container Styles */
.diff-container {
border: 1px solid var(--border-color);
border-radius: 5px;
overflow-x: auto;
transition: border-color 0.3s ease;
}

.diff-line {
display: flex;
min-height: 1.6em;
}

.line-number {
width: 3em;
text-align: right;
padding-right: 0.5em;
color: #999;
user-select: none;
font-size: 12px;
}

.diff-content {
flex: 1;
padding: 0 0.5em;
}

.diff-added {
background-color: rgba(163, 249, 163, 0.5);
}

.diff-removed {
background-color: rgba(249, 163, 163, 0.5);
}

.diff-empty {
background-color: var(--empty-background);
}

/* Button Styles */
.button-container {
display: flex;
justify-content: center;
margin: 20px 0;
}

button {
padding: 10px 20px;
font-size: 16px;
font-weight: 600;
color: #fff;
background-color: var(--primary-color);
border: none;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s ease, transform 0.1s ease;
}

button:hover {
background-color: #3da968;
}

button:active {
transform: translateY(1px);
}

/* Output Section */
#outputSection {
display: none;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
min-width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
background: none;
border: none;
cursor: pointer;
padding: 8px;
border-radius: 20%;
transition: background-color 0.3s ease;
}

.dark-mode-toggle:hover {
background-color: rgba(75, 193, 122, 0.1);
}

.dark-mode-toggle svg {
width: 24px;
height: 24px;
fill: var(--primary-color);
}

.dark-mode-toggle .moon {
display: none;
}

.dark-mode .dark-mode-toggle .sun {
display: none;
}

.dark-mode .dark-mode-toggle .moon {
display: inline;
}

/* Toggle Group Styles */
.toggle-group {
display: flex;
justify-content: center;
align-items: center;
gap: 20px;
margin: 8px 0;
}

.toggle-container {
display: flex;
justify-content: center;
align-items: center;
gap: 8px;
margin: 8px 0;
}

.toggle-switch {
position: relative;
display: inline-block;
width: 40px;
height: 22px;
}

.toggle-switch input {
opacity: 0;
width: 0;
height: 0;
}

.toggle-slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #e0e0e0;
transition: all 0.3s ease;
border-radius: 11px;
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.toggle-slider:before {
position: absolute;
content: "";
height: 18px;
width: 18px;
left: 2px;
bottom: 2px;
background-color: white;
transition: all 0.3s ease;
border-radius: 50%;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.toggle-switch input:checked + .toggle-slider {
background-color: var(--primary-color);
}

.toggle-switch input:checked + .toggle-slider:before {
transform: translateX(18px);
}

.toggle-switch input:focus + .toggle-slider {
box-shadow: 0 0 1px var(--primary-color);
}

.toggle-label {
color: var(--text-color);
font-size: 13px;
font-weight: 500;
}

.toggle-switch:hover .toggle-slider:before {
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Page Content Styles */
.page-content {
max-width: 1200px;
margin: 0 auto;
padding: 2rem;
}

.page-content h1 {
color: var(--headline-color);
margin-bottom: 2rem;
}

/* Responsive Styles */
@media (min-width: 768px) {
.input-container {
flex-direction: row;
}
}

@media (max-width: 768px) {
.header {
padding: 1rem;
}

.header-left {
gap: 1rem;
}

.header-nav {
position: fixed;
top: 72px;
left: 0;
right: 0;
background-color: var(--header-bg);
padding: 1rem;
flex-direction: column;
align-items: flex-start;
gap: 1rem;
border-bottom: 1px solid var(--border-color);
transform: translateY(-1%);
opacity: 0;
visibility: hidden;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hamburger-menu {
display: flex;
}

.header-nav.active {
transform: translateY(0);
opacity: 1;
visibility: visible;
}

.nav-link {
width: 100%;
padding: 0.75rem 1rem;
}
}


@media (max-width: 480px) {
.header-left {
gap: 1rem;
}

.logo-container {
min-width: 100px;
}

.nav-link {
padding: 0.5rem;
}
}
/* Contact Form Container */
.contact-form-container {
  max-width: 600px;
  margin: 0;  /* Changed from margin: 0 auto to align left */
  padding: 0;  /* Removed padding to align with text */
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.form-label {
  color: var(--headline-color);
  font-size: 0.9rem;
  font-weight: 500;
}

.form-input,
.form-textarea {
  width: 100%;
  max-width: 600px; /* Added max-width to ensure consistency */
  padding: 0.75rem;
  font-size: 14px;
  line-height: 1.5;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  background-color: var(--textarea-background);
  color: var(--text-color);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  font-family: inherit;
  box-sizing: border-box; /* Ensures padding doesn't affect width */
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(75, 193, 122, 0.2);
}

.form-textarea {
  min-height: 150px;
  resize: vertical;
}

.form-submit {
  align-self: flex-start;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background-color: var(--primary-color);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.1s ease;
}

.form-submit:hover {
  background-color: #3da968;
}

.form-submit:active {
  transform: translateY(1px);
}

/* Error states */
.form-input.error,
.form-textarea.error {
  border-color: #ff4646;
}

.error-message {
  color: #ff4646;
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

/* Success message */
.success-message {
  color: var(--primary-color);
  text-align: left; /* Changed from center to left */
  padding: 1rem;
  border: 1px solid var(--primary-color);
  border-radius: 5px;
  background-color: rgba(75, 193, 122, 0.1);
  margin-bottom: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .contact-form-container {
    padding: 0;
  }
  
  .form-submit {
    width: auto; /* Changed from 100% to auto to match desktop */
  }
}