/* 参考图片风格的CSS变量 */
:root {
  --primary-color: #4a90e2;
  --primary-dark: #357abd;
  --primary-gradient: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
  --secondary-color: #10b981;
  --accent-color: #f59e0b;
  --danger-color: #ef4444;
  --background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  --card-bg: rgba(255, 255, 255, 0.95);
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --border-color: #e1e5e9;
  --border-focus: #4a90e2;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --border-radius-lg: 16px;
}

/* 通用样式 */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--background);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  color: var(--text-primary);
  line-height: 1.6;
}

h2 {
  font-size: 24px;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 24px;
  color: var(--text-primary);
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
}

p {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 16px;
  margin: 16px 0;
  color: var(--text-secondary);
}

.container {
  max-width: 420px;
  margin: 20px auto;
  padding: 24px;
  background: var(--card-bg);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 现代化表单布局 */
.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  padding: 1px 0;
  transition: transform 0.2s ease;
  position: relative;
}

.form-row:hover {
  transform: translateX(2px);
}

.form-row label {
  flex: 1;
  font-weight: 600;
  color: var(--text-primary);
  margin-right: 16px;
  font-size: 14px;
  min-width: 80px;
}

.form-row input,
.form-row select {
  text-align: left;
  width: 100%;
  flex: 1.2;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  box-sizing: border-box;
  min-height: 44px;
  font-size: 14px;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(5px);
}


.form-row input:focus,
.form-row select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
  transform: translateY(-1px);
}

.form-row input:hover,
.form-row select:hover {
  border-color: var(--border-focus);
  background: rgba(255, 255, 255, 1);
}

/* 现代化按钮样式 */
.button-container {
  display: flex;
  justify-content: center;
  gap: 12px;
  width: 100%;
  margin-top: 24px;
  flex-wrap: wrap;
}

.modern-button {
  padding: 12px 24px;
  border: none;
  border-radius: var(--border-radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  min-height: 44px;
  position: relative;
  overflow: hidden;
}

.modern-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.modern-button:hover::before {
  left: 100%;
}

.button-primary {
  background: var(--primary-gradient);
  color: white;
  box-shadow: var(--shadow-md);
}

.button-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.button-secondary {
  background: var(--secondary-color);
  color: white;
  box-shadow: var(--shadow-md);
}

.button-secondary:hover {
  background: #059669;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.button-accent {
  background: var(--accent-color);
  color: white;
  box-shadow: var(--shadow-md);
}

.button-accent:hover {
  background: #d97706;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.button-danger {
  background: var(--danger-color);
  color: white;
  box-shadow: var(--shadow-md);
}

.button-danger:hover {
  background: #dc2626;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* 导航链接样式 */
.form-row.text-center {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin: 24px 100;
  padding: 16px;
  background: rgba(255, 255, 255, 0.6);
  /* border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm); */
  justify-content: center;
  flex-wrap: wrap;
  backdrop-filter: blur(5px);
}

.form-row.text-center a {
  text-decoration: none;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--border-radius-sm);
  transition: all 0.3s ease;
  display: inline-block;
  width: fit-content;
  font-size: 13px;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.form-row.text-center a:not(.button-primary) {
  background: var(--primary-gradient);
  color: white;
  box-shadow: var(--shadow-sm);
}

.form-row.text-center a:hover:not(.button-primary) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  filter: brightness(1.1);
}

/* 特殊按钮样式 */
#toyota5050-link a {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
}

#toyota5050-link a:hover {
  filter: brightness(1.1) !important;
}

/* 优化小屏幕下的按钮布局 */
@media (max-width: 480px) {
    .form-row.text-center {
        gap: 6px;
        padding: 12px;
    }

    .form-row.text-center a {
        padding: 8px 12px;
        font-size: 12px;
        min-width: 35%;
        text-align: center;
        margin-bottom: 0;
    }
}

/* 针对更小屏幕进一步优化 */
@media (max-width: 380px) {
    .form-row.text-center {
        gap: 4px;
        padding: 8px;
    }

    .form-row.text-center a {
        min-width: 35%;
        font-size: 11px;
        padding: 6px 10px;
    }
}

/* 必填字段样式 */
.required {
  color: var(--danger-color);
  font-weight: 600;
}

/* 现代化分割线 */
hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-color), transparent);
  margin: 8px 0;
  border-radius: 1px;
}

.red-text {
  color: var(--danger-color);
  font-weight: 600;
}

/* 加载动画和微交互 */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 成功/错误提示样式 */
.success-message {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 12px 16px;
  border-radius: var(--border-radius-sm);
  margin: 16px 0;
  box-shadow: var(--shadow-md);
  font-weight: 500;
  animation: slideIn 0.3s ease;
}

.error-message {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  padding: 12px 16px;
  border-radius: var(--border-radius-sm);
  margin: 16px 0;
  box-shadow: var(--shadow-md);
  font-weight: 500;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* 二维码弹出框 */
.qrcode-popup {
  position: absolute;
  display: none;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 999;
}

/* 专用计算器表头排列方式 */
/* 如果需要水平排列两个链接，可以改为flex-direction: row; 并适当调整间距 */

/* 现代化滚动公告样式 */
.marquee {
    background: var(--primary-gradient);
    color: white;
    padding: 12px 0;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    box-sizing: border-box;
    box-shadow: var(--shadow-md);
    position: relative;
}

.marquee::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.marquee-content {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 35s linear infinite;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* 二维码图片样式 */
#qrcode {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 999;
    display: none;
}

/* 复选框区域样式 */
.info-section {
    display: flex;
    justify-content: center;
    padding: 8px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #e1e5e9;
    border-radius: 4px;
    background: white;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-custom::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.2s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: var(--primary-gradient);
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::before {
    transform: rotate(45deg) scale(1);
}

.checkbox-text {
    font-weight: 500;
    transition: color 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked ~ .checkbox-text {
    color: var(--primary-color);
    font-weight: 600;
}

/* 参考图片风格的方案选择容器 */
#discountMethodContainer {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 4px 0;
}

#discountMethodContainer label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    margin-top: 12px;
    white-space: nowrap;
}

.select-with-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1.2;
    position: relative;
}



/* 参考图片风格的信息图标 */
.info-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: #f3f4f6;
    color: #6b7280;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    z-index: 2;
}

.info-icon:hover {
    background: #4a90e2;
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.info-icon:active {
    transform: translateY(-50%) scale(0.95);
}

/* 优化标题样式 */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 16px;
}

/* 改进文本样式 */
.text-muted {
    color: var(--text-secondary);
}

.text-primary {
    color: var(--primary-color);
}

.text-success {
    color: var(--secondary-color);
}

.text-warning {
    color: var(--accent-color);
}

.text-danger {
    color: var(--danger-color);
}

/* 现代化卡片样式 */
.card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px;
    margin: 16px 0;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
}

.card-header {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
}

/* 购置税区域样式 */
.purchase-tax-section {
  background: rgba(248, 250, 252, 0.7);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 16px;
  margin: 16px 0;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(5px);
}

.purchase-tax-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.purchase-tax-container .form-row {
  margin-bottom: 0;
  padding: 4px 0;
}

.purchase-tax-container .form-row:first-child {
  margin-bottom: 8px;
}

.purchase-tax-container .checkbox-section {
  justify-content: flex-start;
  padding: 0;
}

.purchase-tax-container .form-row:not(.checkbox-row) input {
  text-align: left;
  width: 100%;
  flex: 1.2;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  box-sizing: border-box;
  min-height: 44px;
  font-size: 14px;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(5px);
}

.purchase-tax-container .form-row label {
  flex: 1;
  font-weight: 600;
  color: var(--text-primary);
  margin-right: 16px;
  font-size: 14px;
  min-width: 80px;
}
