:root {
  --bg1: #1a1a2e;
  --bg2: #16213e;
  --highlight: #e94560;
  --highlight-dark: #d13354;
  --text: #ffffff;
  --text-muted: #aaaaaa;
  --success: #4caf50;
  --warning: #ff9800;
  --border-radius: 8px;
  --transition: all 0.3s ease;
}

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

body {
  margin: 0;
  font-family: 'Roboto', sans-serif;
  background: linear-gradient(135deg, var(--bg1), var(--bg2));
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  line-height: 1.6;
}

.container {
  background: var(--bg2);
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  max-width: 900px;
  width: 100%;
  overflow: hidden;
  transition: var(--transition);
}

h1 {
  text-align: center;
  margin-bottom: 25px;
  font-size: 2.2rem;
  letter-spacing: 1.5px;
  color: var(--highlight);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.section {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.text-area-container {
  position: relative;
  margin-bottom: 15px;
}

.text-area-container label {
  position: absolute;
  top: -10px;
  left: 12px;
  background: var(--bg2);
  padding: 0 6px;
  font-size: 0.85rem;
  z-index: 1;
}

#inputText, #outputText {
  width: 100%;
  padding: 15px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  font-size: 1rem;
  background: var(--bg1);
  color: var(--text);
  transition: var(--transition);
  font-family: 'JetBrains Mono', monospace;
}

#inputText {
  min-height: 120px;
  max-height: 200px;
  resize: vertical;
}

#inputText:focus, #outputText:focus {
  outline: none;
  border-color: var(--highlight);
  box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.2);
}

#outputText {
  min-height: 120px;
  max-height: 200px;
  overflow-y: auto;
  word-wrap: break-word;
  white-space: pre-wrap;
  background-color: rgba(26, 26, 46, 0.7);
}

.controls {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
  margin: 25px 0;
}

.rotor {
  background: var(--bg1);
  padding: 12px;
  border-radius: var(--border-radius);
  text-align: center;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.3);
  transition: var(--transition);
}

.rotor:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.rotor label {
  margin-bottom: 10px;
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 700;
}

.rotor-control {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.rotor-control .arrow {
  background: var(--bg2);
  border: none;
  color: var(--text);
  font-size: 1.2rem;
  padding: 8px;
  width: 100%;
  cursor: pointer;
  border-radius: 4px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.rotor-control .arrow:hover {
  background: var(--highlight);
  transform: scale(1.05);
}

.rotor-control .arrow:active {
  transform: scale(0.95);
}

.rotor-control input {
  width: 100%;
  text-align: center;
  margin: 8px 0;
  padding: 8px;
  border-radius: 4px;
  background: var(--bg2);
  color: var(--text);
  border: 1px solid var(--highlight);
  font-size: 1rem;
  font-weight: bold;
  transition: var(--transition);
}

.rotor-control input:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(233, 69, 96, 0.3);
}

select {
  padding: 10px;
  border: none;
  border-radius: var(--border-radius);
  background: var(--bg1);
  color: var(--text);
  font-size: 1rem;
  text-align: center;
  width: 100%;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

select:focus {
  outline: none;
  border-color: var(--highlight);
  box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.2);
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 20px 0;
}

.buttons button {
  flex: 1 1 150px;
  padding: 12px;
  font-size: 1rem;
  font-weight: bold;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  background: var(--highlight);
  color: var(--text);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 120px;
}

.buttons button:hover {
  background: var(--highlight-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.buttons button:active {
  transform: translateY(0);
}

.buttons button.secondary {
  background: rgba(255, 255, 255, 0.1);
}

.buttons button.secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Method toggles */
.method-selector {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.method-selector label {
    display: inline-block;
    cursor: pointer;
    background: var(--bg1);
    padding: 10px 20px;
    border-radius: var(--border-radius);
    border: 1px solid transparent;
    transition: var(--transition);
}

.method-selector input[type="radio"] {
    display: none;
}

.method-selector input[type="radio"]:checked + label {
    background: var(--highlight);
    border-color: var(--highlight-dark);
}


.settings-row {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
}

.setting-group {
  flex: 1;
  min-width: 200px;
}

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
}

.checkbox-container input[type="checkbox"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--highlight);
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
}

.checkbox-container input[type="checkbox"]:checked {
  background: var(--highlight);
}

.checkbox-container input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  color: white;
  font-size: 12px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--highlight);
  color: white;
  padding: 12px 20px;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transform: translateY(100px);
  opacity: 0;
  transition: var(--transition);
  z-index: 1000;
}

.notification.show {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 768px) {
  .container {
    padding: 20px;
  }
  
  .controls {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  }
  
  .rotor-control .arrow {
    padding: 6px;
  }
  
  h1 {
    font-size: 1.8rem;
  }
}

/* Animations */
@keyframes rotorPulseUp {
  0% { transform: translateY(0) scale(1); border-color: transparent; }
  50% { transform: translateY(-3px) scale(1.05); border-color: var(--highlight); box-shadow: 0 0 10px rgba(233, 69, 96, 0.5); }
  100% { transform: translateY(0) scale(1); border-color: transparent; }
}

@keyframes rotorPulseDown {
  0% { transform: translateY(0) scale(1); border-color: transparent; }
  50% { transform: translateY(3px) scale(1.05); border-color: var(--highlight); box-shadow: 0 0 10px rgba(233, 69, 96, 0.5); }
  100% { transform: translateY(0) scale(1); border-color: transparent; }
}

.rotor-spin-up {
  animation: rotorPulseUp 0.2s ease-out;
}

.rotor-spin-down {
  animation: rotorPulseDown 0.2s ease-out;
}

.rotor-control input {
  transition: all 0.2s ease;
}
