@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&display=swap');
@import url('https://fonts.cdnfonts.com/css/times-new-roman');

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background-color: #f5f5f5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

.red-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 350px;
  background-color: red;
  /* Red top background */
  z-index: 1;
}

.main-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  margin-bottom: 40px;
}

.logo {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 2rem;
  font-weight: 900;
  color: white;
  letter-spacing: 1px;
}

.nav {
  display: flex;
  gap: 20px;
}

.nav a {
  color: white;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: bold;
}

.nav a:hover:not(.disabled) {
  text-decoration: underline;
}

.nav a.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.hero-text {
  text-align: center;
  color: white;
  margin-bottom: 30px;
}

.hero-text h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.hero-text p {
  font-size: 1.1rem;
  opacity: 0.9;
  font-weight: 500;
}

form.converter-card {
  background: white;
  padding: 30px;
  width: 100%;
  max-width: 700px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 40px;
}

.input-label {
  color: #333;
  font-size: 0.9rem;
  margin-bottom: 15px;
  text-align: center;
  width: 100%;
  font-weight: bold;
}

form.converter-card input[type="text"] {
  width: 100%;
  max-width: 500px;
  padding: 14px;
  border: 1px solid #ccc;
  background-color: #f5f5f5;
  font-family: inherit;
  outline: none;
  text-align: center;
  margin-bottom: 25px;
  font-size: 1rem;
}

.controls-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  width: 100%;
}

.format-toggle {
  display: flex;
  background-color: #f5f5f5;
  border: 1px solid #ccc;
  overflow: hidden;
}

.format-toggle input[type="radio"] {
  display: none;
}

.format-toggle label {
  padding: 12px 25px;
  color: #333;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: bold;
  transition: background 0.2s;
}

.format-toggle input[type="radio"]:checked+label {
  background: red;
  color: white;
}

form.converter-card button[type="submit"] {
  padding: 14px 40px;
  border: 1px solid #ccc;
  background-color: whitesmoke;
  color: #333;
  cursor: pointer;
  font-family: inherit;
  transition: 0.3s ease-out;
  font-weight: bold;
  font-size: 1rem;
}

form.converter-card button[type="submit"]:hover {
  color: white;
  background-color: red;
  transform: scale(1.05);
}

form.converter-card button[type="submit"]:disabled {
  background-color: #ccc;
  color: #666;
  cursor: not-allowed;
  transform: none;
}

.instructions {
  width: 100%;
  max-width: 700px;
  color: #555;
  font-size: 0.95rem;
  line-height: 1.6;
  text-align: left;
}

.instructions h2 {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: #333;
}

.instructions a {
  color: #333;
  text-decoration: none;
  font-weight: bold;
}

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

.instructions ol {
  margin-left: 20px;
  margin-top: 10px;
}

.instructions ul {
  margin-left: 20px;
  margin-top: 5px;
  margin-bottom: 10px;
  list-style-type: disc;
}

.instructions li {
  margin-bottom: 10px;
}

/* --- PROGRESS BAR STYLES --- */
#progress-area {
  display: none;
  width: 100%;
  margin-top: 20px;
}

.bar-bg {
  width: 100%;
  background: #ddd;
  height: 25px;
  overflow: hidden;
}

.bar-fg {
  height: 100%;
  width: 0%;
  background: #4CAF50;
  text-align: center;
  color: white;
  line-height: 25px;
  transition: width 0.3s ease;
  font-size: 14px;
  font-weight: bold;
}

#status-txt {
  font-weight: bold;
  margin-top: 10px;
  color: #333;
  font-size: 0.9rem;
  text-align: center;
}

@media(max-width:768px) {
  .controls-row {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
  }

  .format-toggle {
    justify-content: center;
  }
}