:root {
  --primary-color: #192a56;
  --text-color: #fff;
  --text-color-dim: rgba(255, 255, 255, 0.7);
  --bg-color: #192a56;
  --border-color-light: rgba(255, 255, 255, 0.2);
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color-dim);
  background-color: var(--bg-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
}

header {
  text-align: left;
}

.logo {
  margin-bottom: 20px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  color: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  font-size: 1.2rem;
  border: 2px solid white;
}

header h1 {
  margin-bottom: 10px;
  font-size: 2rem;
  font-weight: bold;
  color: var(--text-color);
}

header p {
  max-width: 600px;
  margin: 0;
  font-size: 0.95rem;
}

main {
  margin: 0 auto;
  max-width: 1024px;
  width: 100%;
}

.password-display {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 60px 0;
  padding: 35px 0;
  border-top: 1px solid var(--border-color-light);
  border-bottom: 1px solid var(--border-color-light);
}

.generated-password {
  font-size: 2.8rem;
  font-weight: bold;
  font-family: monospace;
  color: var(--text-color);
  word-break: break-all;
}

.password-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

#refresh {
  background: none;
  border: 1px solid white;
  color: var(--text-color);
  width: 40px;
  height: 40px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s;
}

#refresh:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

#copy {
  background-color: white;
  color: var(--primary-color);
  border: none;
  padding: 0 20px;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
  height: 40px;
}

#copy:hover {
  background-color: #f0f0f0;
}

.options {
  margin-bottom: 40px;
}

.length-option {
  margin-bottom: 30px;
}

.length-option label {
  display: block;
  margin-bottom: 10px;
  font-weight: bold;
}

.slider-container {
  position: relative;
}

.slider {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 5px;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: var(--text-color-dim);
  border-radius: 50%;
  cursor: pointer;
}

.slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--text-color-dim);
  border-radius: 50%;
  cursor: pointer;
}

#length-value {
  position: absolute;
  top: -28px;
  width: 28px;
  height: 28px;
  background: var(--text-color-dim);
  color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.8rem;
  transform: translateX(-50%);
}

.character-options {
  display: flex;
  flex-wrap: wrap;
  gap: 15px 70px;
  margin-bottom: 20px;
}

.option {
  display: flex;
  align-items: center;
  gap: 8px;
}

.option input[type='checkbox'] {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.5);
  cursor: pointer;
  position: relative;
}

.option input[type='checkbox']:checked {
  background: var(--text-color-dim);
  border-color: var(--text-color-dim);
}

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

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

  .password-display {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .generated-password {
    font-size: 2rem;
  }

  .character-options {
    gap: 10px 20px;
  }
}
