* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Arial", sans-serif;
}

body {
  background-color: #1a1a1a;
  color: #e0e0e0;
  line-height: 1.6;
  padding: 20px;
  transition:
    background-color 0.3s,
    color 0.3s;
}

body.light-mode {
  background-color: #f5f5f5;
  color: #333;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  background: #2a2a2a;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition:
    background-color 0.3s,
    box-shadow 0.3s;
}

body.light-mode .container {
  background: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 15px;
}

h1 {
  text-align: center;
  margin-bottom: 0;
  color: #e0e0e0;
  transition: color 0.3s;
  flex: 1;
  min-width: 200px;
}

body.light-mode h1 {
  color: #2c3e50;
}

.dark-mode-toggle {
  padding: 8px 16px;
  background-color: #4a4a4a;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition:
    background-color 0.3s,
    transform 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dark-mode-toggle:hover {
  background-color: #5a5a5a;
}

.dark-mode-toggle:active {
  transform: scale(0.98);
}

body.light-mode .dark-mode-toggle {
  background-color: #3498db;
}

body.light-mode .dark-mode-toggle:hover {
  background-color: #2980b9;
}

.input-section {
  margin-bottom: 30px;
}

.input-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #e0e0e0;
  transition: color 0.3s;
}

body.light-mode label {
  color: #2c3e50;
}

textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #555;
  border-radius: 6px;
  font-size: 16px;
  resize: vertical;
  min-height: 100px;
  transition:
    border-color 0.3s,
    background-color 0.3s,
    color 0.3s;
  background-color: #3a3a3a;
  color: #e0e0e0;
}

body.light-mode textarea {
  background-color: white;
  color: #333;
  border-color: #ddd;
}

textarea:focus {
  border-color: #3498db;
  outline: none;
}

.options-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.size-selector,
.error-correction-selector {
  display: flex;
  align-items: center;
  gap: 15px;
}

.input-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  font-size: 14px;
}

.url-indicator {
  color: #3498db;
  font-weight: bold;
}

.url-indicator.hidden {
  visibility: hidden;
}

.char-count {
  color: #888;
}

.char-count.warning {
  color: #f39c12;
}

.char-count.error {
  color: #e74c3c;
}

select {
  padding: 10px 15px;
  border: 2px solid #555;
  border-radius: 6px;
  font-size: 16px;
  background-color: #3a3a3a;
  cursor: pointer;
  transition:
    border-color 0.3s,
    background-color 0.3s,
    color 0.3s;
  color: #e0e0e0;
}

body.light-mode select {
  background-color: white;
  color: #333;
  border-color: #ddd;
}

select:focus {
  border-color: #3498db;
  outline: none;
}

.qr-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.qr-code {
  width: 250px;
  height: 250px;
  background-color: #2a2a2a;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  transition:
    width 0.3s,
    height 0.3s;
}

body.light-mode .qr-code {
  background-color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.download-btn {
  padding: 12px 25px;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  transition:
    background-color 0.3s,
    transform 0.2s;
}

.download-btn:hover {
  background-color: #2980b9;
}

.download-btn:active {
  transform: scale(0.98);
}

.download-btn:disabled,
.copy-btn:disabled {
  background-color: #95a5a6;
  cursor: not-allowed;
  transform: none;
}

.button-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.copy-btn {
  padding: 12px 25px;
  background-color: #27ae60;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  transition:
    background-color 0.3s,
    transform 0.2s;
}

.copy-btn:hover {
  background-color: #219a52;
}

.copy-btn:active {
  transform: scale(0.98);
}

.copy-btn.copied {
  background-color: #2ecc71;
}

@media (max-width: 600px) {
  .container {
    padding: 20px;
  }

  .options-row {
    flex-direction: column;
  }

  .size-selector,
  .error-correction-selector {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .button-group {
    flex-direction: column;
    width: 100%;
  }

  .button-group button {
    width: 100%;
  }

  .input-info {
    flex-direction: column;
    gap: 5px;
    align-items: flex-start;
  }
}
