:root {
  --primary-color: #3498db;
  --secondary-color: #2980b9;
  --success-color: #2ecc71;
  --danger-color: #e74c3c;
  --warning-color: #f39c12;
  --light-color: #ecf0f1;
  --dark-color: #2c3e50;
  --border-radius: 6px;
  --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  color: #333;
  line-height: 1.6;
  min-height: 100vh;
  /* padding: 20px; */
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  width: 100%;
  flex: 1;
}

/* 主窗口样式 */
.window {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
  margin-bottom: 20px;
}

.title-bar {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  padding: 15px 20px;
  font-size: 18px;
  font-weight: 600;
}

.content {
  padding: 20px;
}

/* 警告信息 */
.alert-box {
  padding: 12px 15px;
  border-radius: var(--border-radius);
  margin-bottom: 20px;
  font-size: 14px;
}

.alert-box.warning {
  background: linear-gradient(
    135deg,
    rgba(243, 156, 18, 0.1),
    rgba(231, 76, 60, 0.1)
  );
  border: 1px solid rgba(243, 156, 18, 0.3);
  color: #e74c3c;
}

/* 用户信息 */
.user-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: #f8f9fa;
  border-radius: var(--border-radius);
  margin-bottom: 20px;
  border: 1px solid #e9ecef;
}

.username {
  font-weight: 600;
  color: var(--dark-color);
}

.logout-btn {
  color: var(--danger-color);
  text-decoration: none;
  font-weight: 500;
  margin-left: 15px;
  cursor: pointer;
}

.logout-btn:hover {
  text-decoration: underline;
}

.usage-count.valid {
  color: var(--success-color);
}

/* 充值区域 */
.recharge-section {
  background: #f8f9fa;
  border-radius: var(--border-radius);
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid #e9ecef;
}

.recharge-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--dark-color);
}

.recharge-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 15px;
}

.recharge-option {
  background: white;
  border: 2px solid #ddd;
  border-radius: var(--border-radius);
  padding: 15px 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
}

.recharge-option:hover {
  border-color: var(--primary-color);
  background: rgba(52, 152, 219, 0.05);
}

.recharge-option.selected {
  border-color: var(--success-color);
  background: rgba(46, 204, 113, 0.1);
}

.recharge-amount {
  font-weight: 600;
  font-size: 16px;
  color: var(--dark-color);
  margin-bottom: 5px;
}

.purchase-form {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.duration-price {
  color: var(--success-color);
  font-weight: 600;
}
.recharge-btn {
  background: linear-gradient(135deg, var(--success-color), #27ae60);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  padding: 12px 30px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  /* width: 100%; */
}

.recharge-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(46, 204, 113, 0.3);
}

/* 命令区域 */
.command-section {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: var(--border-radius);
  padding: 20px;
  margin-bottom: 20px;
}

.system-info {
  background: #f8f9fa;
  padding: 12px 15px;
  border-radius: var(--border-radius);
  margin-bottom: 15px;
  font-size: 14px;
  border: 1px solid #e9ecef;
}

.system-info a {
  color: var(--primary-color);
  text-decoration: none;
}

.system-info a:hover {
  text-decoration: underline;
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--dark-color);
  border-bottom: 1px solid #eee;
  padding-bottom: 8px;
}

.command-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.cmd-btn {
  background: #f8f9fa;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  padding: 10px 15px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s;
  color: var(--dark-color);
}

.cmd-btn:hover {
  background: rgba(52, 152, 219, 0.1);
  border-color: var(--primary-color);
}

.cmd-btn.active {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  border-color: var(--primary-color);
}

.command-display {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: var(--border-radius);
  padding: 15px;
  font-family: "Courier New", monospace;
  font-size: 14px;
  color: var(--dark-color);
  line-height: 1.5;
  min-height: 60px;
  margin-bottom: 15px;
  background-image: linear-gradient(45deg, #f8f9fa 0%, #ffffff 100%);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.install-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.install-help {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 14px;
}

.install-help:hover {
  text-decoration: underline;
}

/* 页脚样式 */
.footer {
  background-color: var(--dark-color);
  color: white;
  padding: 40px 0 20px;
  margin-top: auto;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
}

.footer-section {
  flex: 1;
  min-width: 250px;
}

.footer-section h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: var(--light-color);
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 5px;
  display: inline-block;
}

.footer-section p {
  margin-bottom: 10px;
  opacity: 0.8;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 8px;
}

.footer-section ul li a {
  color: white;
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.3s;
}

.footer-section ul li a:hover {
  opacity: 1;
  text-decoration: underline;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 30px;
}

.footer-bottom p {
  opacity: 0.7;
  font-size: 14px;
}

/* 对话框 */
.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.dialog {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  z-index: 1001;
  min-width: 300px;
  max-width: 500px;
  width: 90%;
}

.dialog .title-bar {
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.dialog-content {
  padding: 20px;
}

.dialog-buttons {
  display: flex;
  justify-content: flex-end;
  margin-top: 15px;
}

.dialog-btn {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  border: none;
  border-radius: var(--border-radius);
  padding: 8px 20px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s;
}

.dialog-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(52, 152, 219, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .content {
    padding: 15px;
  }

  .user-info {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .recharge-options {
    grid-template-columns: repeat(2, 1fr);
  }

  .command-buttons {
    flex-direction: column;
  }

  .install-header {
    flex-direction: column;
    gap: 10px;
  }

  .footer-content {
    flex-direction: column;
  }

  .footer-section {
    min-width: 100%;
  }
}

@media (max-width: 480px) {
  .recharge-options {
    grid-template-columns: 1fr;
  }

  .command-display {
    font-size: 12px;
    padding: 12px;
  }
}
