/* Reset default styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  background-color: #f5f7fa;
  color: #333;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Header Styles */
.main-header {
  background-color: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  padding: 1rem 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo img {
  height: 40px;
}

.logo span {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2c3e50;
}

.main-nav ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.main-nav ul li a {
  text-decoration: none;
  color: #34495e;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
  background-color: #81c784;
  color: #fff;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

.theme-toggle button {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.theme-toggle button:hover {
  transform: scale(1.2);
}

/* Container Styles */
.container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

/* Style Select */
.style-select {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.style-select label {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c3e50;
}

.style-select select {
  padding: 0.75rem;
  font-size: 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background-color: #fff;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.style-select select:focus {
  outline: none;
  border-color: #81c784;
  box-shadow: 0 0 0 3px rgba(129, 199, 132, 0.2);
}

.example-preview {
  font-size: 0.9rem;
  color: #666;
}

/* Translator Box */
.translator-box {
  display: flex;
  gap: 1.5rem;
  align-items: stretch;
  margin-bottom: 2rem;
}

.box {
  flex: 1;
  background-color: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.box:hover {
  transform: translateY(-5px);
}

textarea {
  width: 100%;
  min-height: 200px;
  padding: 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  resize: vertical;
  transition: border-color 0.3s ease;
}

textarea:focus {
  outline: none;
  border-color: #81c784;
  box-shadow: 0 0 0 3px rgba(129, 199, 132, 0.2);
}

textarea[readonly] {
  background-color: #f9f9f9;
}

.box-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
}

#charCount {
  font-size: 0.9rem;
  color: #666;
}

button {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

#translateBtn {
  background-color: #81c784;
  color: #fff;
}

#translateBtn:hover {
  background-color: #6ab04c;
  transform: translateY(-2px);
}

.swap-button button {
  background-color: #3498db;
  color: #fff;
  font-size: 1.2rem;
  padding: 0.5rem;
}

.swap-button button:hover {
  background-color: #2980b9;
  transform: translateY(-2px);
}

.copy-button {
  background-color: #f1c40f;
  color: #fff;
}

.copy-button:hover {
  background-color: #d4ac0d;
  transform: translateY(-2px);
}

/* Footer */
footer {
  margin-top: 3rem;
  padding: 2rem;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.footer-guide h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #2c3e50;
}

.footer-guide ul {
  list-style: none;
  margin-bottom: 1rem;
}

.footer-guide ul li {
  font-size: 1rem;
  margin: 0.5rem 0;
  color: #34495e;
}

.footer-guide p {
  font-size: 0.9rem;
  color: #666;
}

.footer-guide a {
  color: #81c784;
  text-decoration: none;
  margin: 0 0.5rem;
}

.footer-guide a:hover {
  text-decoration: underline;
}

/* Dark Mode */
body.dark-mode {
  background-color: #121212;
  color: #e0e0e0;
}

body.dark-mode .main-header {
  background-color: #1e1e1e;
  border-bottom: 1px solid #333;
}

body.dark-mode .logo span {
  color: #e0e0e0;
}

body.dark-mode .main-nav ul li a {
  color: #ccc;
}

body.dark-mode .main-nav ul li a:hover,
body.dark-mode .main-nav ul li a.active {
  background-color: #81c784;
  color: #000;
}

body.dark-mode .style-select select {
  background-color: #2a2a2a;
  color: #e0e0e0;
  border-color: #444;
}

body.dark-mode .style-select select:focus {
  border-color: #81c784;
}

body.dark-mode .box {
  background-color: #1e1e1e;
}

body.dark-mode textarea {
  background-color: #2a2a2a;
  color: #e0e0e0;
  border-color: #444;
}

body.dark-mode textarea[readonly] {
  background-color: #252525;
}

body.dark-mode .box-footer {
  color: #ccc;
}

body.dark-mode footer {
  background-color: #1e1e1e;
}

body.dark-mode .footer-guide h3 {
  color: #e0e0e0;
}

body.dark-mode .footer-guide ul li {
  color: #ccc;
}

body.dark-mode .footer-guide p {
  color: #999;
}

/* Responsive Design */
@media (max-width: 768px) {
  .header-container {
    flex-wrap: wrap;
  }

  .main-nav {
    display: none;
    width: 100%;
  }

  .main-nav.active {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    padding: 1rem;
  }

  .menu-toggle {
    display: block;
  }

  .translator-box {
    flex-direction: column;
    gap: 1rem;
  }

  .swap-button {
    text-align: center;
  }
}