* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  text-decoration: none;
  color: inherit;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(25, 37, 59, 0.95);
  gap: 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 15px 5%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}
.link {
  display: flex;
  gap: 15px;
}
.link a {
  padding: 10px 5px;
  border-bottom: 1px dotted rgb(255, 255, 255);
  font-weight: 700;
  transition: 0.3s;
  border-radius: 10px 10px 0 0;
  color: #bdb8b8dc;
}
.link a:hover {
  background: #455a80;
  color: #000000;
  border-bottom: 1px dotted rgb(255, 252, 252);
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #bdb8b8dc;
  text-decoration: none;
}

body {
  background: linear-gradient(#202c42, #8886a0);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 100px 20px;
  color: #f8fafc;
}

.translator-container {
  width: 100%;
  max-width: 900px;
}

.header h1 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 25px;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: #ffffff;
}

.header h1 i {
  margin-right: 10px;
}

.card {
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.text-areas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .text-areas {
    grid-template-columns: 1fr;
  }
}

.input-box,
.output-box {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  min-height: 220px;
}

.input-box:focus-within {
  border-color: #d3d4dd;
}

textarea {
  width: 100%;
  height: 100%;
  min-height: 150px;
  background: transparent;
  border: none;
  resize: none;
  color: #f8fafc;
  font-size: 1.1rem;
  line-height: 1.6;
  outline: none;
}

.output-box textarea {
  color: #cbd5e1;
}

.box-controls {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #1e293b;
}

.input-box .box-controls {
  justify-content: space-between;
}

.char-count {
  font-size: 0.85rem;
  color: #64748b;
}

.icon-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: all 0.2s;
}

.icon-btn:hover {
  color: #6366f1;
  background: rgba(99, 102, 241, 0.1);
}

#translate-btn {
  width: 100%;
  background: #4f46e5;
  color: white;
  border: none;
  padding: 14px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition:
    0.3s,
    transform 0.1s;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

#translate-btn:hover {
  opacity: 0.95;
  background: #dbdaf5;
  color: #4f46e5;
  font-weight: 900;
}

#translate-btn:active {
  transform: scale(0.99);
}
