* {margin:0;padding:0;box-sizing:border-box;} /* 基本重置 */

:root{/* #全局CSS变量 */
  --primary:#7ac943;
  --primary-dark:#2c791e;
  --accent:#3498db;
  --dark:#1a1e1f;
  --darker:#151718;
  --light:#f5f5f5;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background-color: #1c2b2d; /* 暗色背景 */
  background-image: url('images/circuit-pattern.png'); /* 电路图案背景 */
  background-size:cover;
  background-attachment:fixed;
  color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  position:relative;
}

body::before{/* #添加渐变叠加层 */
  content:'';
  position:absolute;
  top:0;left:0;
  width:100%;height:100%;
  background:linear-gradient(135deg,rgba(44,121,30,0.7),rgba(26,30,31,0.9));
  z-index:-1;
}

.container {
  width: 100%;
  max-width: 500px;
  padding: 25px;
  backdrop-filter:blur(5px);
  background-color:rgba(26,30,31,0.8);
  border-radius:15px;
  box-shadow:0 15px 30px rgba(0,0,0,0.4);
  animation:fadeIn 0.8s ease-out;
  transform:translateY(0);
  transition:all 0.3s ease;
}

.container:hover{
  transform:translateY(-5px);
  box-shadow:0 20px 40px rgba(0,0,0,0.5);
}

/* Logo 区域 */
.logo {
  text-align: center;
  margin-bottom: 25px;
}

.logo img {
  width: 100px;
  height: 100px;
  background:linear-gradient(145deg,var(--primary),var(--primary-dark)); /* #绿色渐变背景 */
  border-radius: 50%;
  padding: 15px;
  box-shadow:0 10px 20px rgba(0,0,0,0.2);
  transition:all 0.3s ease;
  transform:rotate(0);
}

.logo img:hover{
  transform:rotate(10deg);
}

.logo h1 {
  font-size: 2.2rem;
  margin-top: 15px;
  color: var(--light);
  text-shadow:0 2px 5px rgba(0,0,0,0.3);
  letter-spacing:1px;
}

/* 密码显示区域 */
.password-display {
  background:linear-gradient(135deg,var(--primary-dark),#216417); /* #绿色渐变背景 */
  padding: 18px;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  position: relative;
  box-shadow:0 8px 15px rgba(0,0,0,0.15);
  transition:transform 0.3s ease,box-shadow 0.3s ease;
}

.password-display:hover{
  transform:translateY(-2px);
  box-shadow:0 12px 20px rgba(0,0,0,0.25);
}

#password {
  font-family: monospace;
  font-size: 1.3rem;
  word-break: break-all;
  margin-right: 10px;
  text-shadow:0 1px 2px rgba(0,0,0,0.3);
  transition: all 0.15s ease;
}

.password-display.updating #password {
  color: rgba(255,255,255,0.7);
  text-shadow: 0 0 4px rgba(255,255,255,0.5);
}

.password-actions {
  display: flex;
  gap: 12px;
}

.password-actions button {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.password-actions button:hover {
  transform: scale(1.15);
  background-color: rgba(255,255,255,0.15);
}

.password-actions button:active {
  transform: scale(0.95);
}

/* 强度指示器 */
.strength-indicator {
  display: flex;
  align-items: center;
  margin-bottom: 25px;
  gap: 12px;
  padding: 8px 15px;
  border-radius: 8px;
  background-color: rgba(40,40,40,0.3);
  transition: all 0.3s ease, border-left 0.5s ease, background-color 0.5s ease;
  position: relative;
  overflow: hidden;
}

.strength-indicator::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  transition: all 0.5s ease;
}

.strength-indicator.weak::before {
  background-color: #e74c3c;
  box-shadow: 0 0 15px #e74c3c;
}

.strength-indicator.medium::before {
  background-color: #f39c12;
  box-shadow: 0 0 15px #f39c12;
}

.strength-indicator.strong::before {
  background-color: #2ecc71;
  box-shadow: 0 0 15px #2ecc71;
}

.strength-indicator.very-strong::before {
  background-color: #27ae60;
  box-shadow: 0 0 15px #27ae60;
}

/* 强度文本效果 */
.strength-text {
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
}

.weak .strength-text {
  color: #e74c3c;
  text-shadow: 0 0 5px rgba(231, 76, 60, 0.3);
}

.medium .strength-text {
  color: #f39c12;
  text-shadow: 0 0 5px rgba(243, 156, 18, 0.3);
}

.strong .strength-text {
  color: #2ecc71;
  text-shadow: 0 0 5px rgba(46, 204, 113, 0.3);
}

.very-strong .strength-text {
  color: #27ae60;
  text-shadow: 0 0 5px rgba(39, 174, 96, 0.3);
}

.check-mark {
  background: linear-gradient(145deg,var(--primary-dark),var(--primary));
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
  z-index: 1;
  transition: all 0.3s ease, background 0.5s ease;
}

/* 密码选项区域 */
.password-options {
  background-color: var(--darker);
  padding: 22px;
  border-radius: 12px;
  box-shadow: 0 8px 15px rgba(0,0,0,0.15);
  transition: all 0.3s ease;
}

.password-options:hover {
  box-shadow: 0 12px 20px rgba(0,0,0,0.25);
}

.length-option {
  margin-bottom:25px;
}

.length-option label{
  font-weight:500;
  font-size:1.05rem;
  color:var(--light);
}

.slider-container {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 10px;
}

input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  height: 6px;
  background: linear-gradient(to right, 
    #e74c3c 0%, #e74c3c 50%,  /* 0-16为红色（弱） */
    #f39c12 50%, #f39c12 75%, /* 16-24为橙色（中等） */
    #2ecc71 75%, #2ecc71 94%, /* 24-30为浅绿色（强） */
    #27ae60 94%, #27ae60 100% /* 30-32为深绿色（超级强） */
  );
  border-radius: 10px;
  outline: none;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.2);
  cursor: pointer;
  transition: height 0.2s ease;
}

input[type="range"]:active {
  height: 8px; /* 拖动时稍微增加滑块的高度 */
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.3), 0 0 10px rgba(52, 152, 219, 0.3);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  background: var(--light);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0,0,0,0.3);
  transition: transform 0.2s ease, background 0.2s ease;
  border: 2px solid transparent;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  background: #fff;
}

input[type="range"]:active::-webkit-slider-thumb {
  transform: scale(1.2);
  background: #fff;
  border: 2px solid var(--accent);
  box-shadow: 0 3px 12px rgba(52, 152, 219, 0.5);
}

#length-value {
  background: linear-gradient(135deg,var(--accent),#2980b9);
  color: white;
  padding: 5px 10px;
  border-radius: 6px;
  min-width: 35px;
  text-align: center;
  font-weight: bold;
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
  transition: all 0.2s ease;
}

/* 滑块实时反馈的动画 */
input[type="range"]:active + #length-value {
  transform: scale(1.1);
  box-shadow: 0 5px 12px rgba(0,0,0,0.3);
}

/* 复选框样式 */
.checkbox-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #555;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  position: relative;
}

input[type="checkbox"]:checked {
  background-color: #3498db;
  border-color: #3498db;
}

input[type="checkbox"]:checked::before {
  content: "✓";
  position: absolute;
  color: white;
  font-size: 12px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* 选择语言下拉菜单 */
.language-selector {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 8px;
}

.language-icon {
  font-size: 1.2rem;
  animation: floatIcon 3s ease-in-out infinite;
  text-shadow: 0 0 10px rgba(255,255,255,0.5);
  transition: all 0.3s ease;
}

.language-icon.spin {
  animation: spin 1s ease-in-out;
}

@keyframes floatIcon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.language-selector select {
  background-color: rgba(40,40,40,0.7);
  color: white;
  border: 2px solid rgba(122,201,67,0.5);
  border-radius: 20px;
  padding: 6px 15px;
  font-size: 0.9rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 30px;
  font-weight: 500;
  letter-spacing: 0.5px;
  transform-origin: right;
}

.language-selector select:hover {
  background-color: rgba(44,121,30,0.7);
  border-color: rgba(122,201,67,0.8);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 15px rgba(0,0,0,0.4);
}

.language-selector select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(122,201,67,0.3), 0 6px 15px rgba(0,0,0,0.3);
  animation: pulse 0.5s ease;
}

/* 自定义下拉样式在现代浏览器 */
.language-selector select::-ms-expand {
  display: none;
}

/* Firefox特定样式 */
@-moz-document url-prefix() {
  .language-selector select {
    text-indent: 0.01px;
    text-overflow: '';
    padding-right: 35px;
  }
}

.language-selector select option {
  background-color: #1a1e1f;
  color: white;
  padding: 10px;
}

/* 响应式设计 */
@media (max-width: 500px) {
  .checkbox-group {
    grid-template-columns: 1fr;
  }
  
  .container{
    padding: 18px;
  }
  
  .logo img{
    width: 80px;
    height: 80px;
  }
  
  .logo h1{
    font-size: 1.8rem;
  }
  
  #password{
    font-size: 1.1rem;
  }
  
  .language-selector {
    top: 10px;
    right: 10px;
  }
  
  .language-selector select {
    font-size: 0.8rem;
    padding: 4px 12px;
    padding-right: 25px;
    background-position: right 5px center;
  }
}

/* 标语 */
.tagline{
  font-size:1rem;
  color:rgba(255,255,255,0.8);
  margin-top:5px;
  letter-spacing:0.5px;
}

/* 图标样式 */
.icon{
  display: inline-block;
  margin-right: 6px;
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.checkbox-item:hover .icon {
  transform: scale(1.2);
}

.password-actions .icon {
  font-size: 1.3rem;
}

/* 页脚 */
.footer{
  text-align:center;
  margin-top:25px;
  font-size:0.9rem;
  color:rgba(255,255,255,0.7);
  padding:10px 0;
  border-top:1px solid rgba(255,255,255,0.1);
}

/* 背景动画形状 */
.background-shapes{
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  z-index:-2;
  overflow:hidden;
}

.shape{
  position:absolute;
  background:linear-gradient(135deg,var(--primary-dark),var(--primary));
  border-radius:50%;
  opacity:0.2;
  filter:blur(50px);
}

.shape1{
  width:600px;
  height:600px;
  top:-300px;
  left:-200px;
  animation:float 20s infinite alternate ease-in-out;
}

.shape2{
  width:400px;
  height:400px;
  bottom:-200px;
  right:-100px;
  animation:float 25s infinite alternate-reverse ease-in-out;
}

.shape3{
  width:300px;
  height:300px;
  bottom:10%;
  left:20%;
  animation:float 18s infinite alternate ease-in-out;
}

@keyframes float{
  0%{transform:translate(0,0) rotate(0);}
  100%{transform:translate(50px,50px) rotate(10deg);}
}

/* 粒子动画效果 */
.particles-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  top: 50%;
  border-radius: 50%;
  opacity: 0.7;
  box-shadow: 0 0 10px currentColor;
  animation: particleFade 1s ease-out forwards;
}

@keyframes particleFade {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0.7;
  }
  100% {
    transform: translateY(-50px) scale(0);
    opacity: 0;
  }
}

/* emoji图标样式 */
.emoji-logo {
  font-size: 4rem;
  margin: 0 auto;
  width: 100px;
  height: 100px;
  background: linear-gradient(145deg,var(--primary),var(--primary-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
  transform: rotate(0);
}

.emoji-logo:hover {
  transform: rotate(10deg) scale(1.05);
}

/* GitHub按钮样式 */
.github-link {
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 100;
  color: white;
  background-color: rgba(40,40,40,0.7);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  backdrop-filter: blur(5px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.github-link:hover {
  transform: rotate(360deg) scale(1.1);
  background-color: rgba(60,60,60,0.8);
  border-color: var(--primary);
  box-shadow: 0 6px 15px rgba(0,0,0,0.4);
}

.github-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.github-footer {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 12px;
  background: linear-gradient(135deg, rgba(44,121,30,0.7), rgba(26,30,31,0.9));
  border-radius: 20px;
  color: white;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

.github-footer:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 12px rgba(0,0,0,0.3);
}

.github-footer-icon {
  margin-left: 5px;
  display: inline-block;
  animation: rotate 10s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 调整移动设备上的GitHub按钮 */
@media (max-width: 500px) {
  .github-link {
    top: 10px;
    left: 10px;
    width: 40px;
    height: 40px;
  }
  
  .github-link svg {
    width: 20px;
    height: 20px;
  }
} 