/* ui-modern.css - Minimalist & Premium V5 (Enhanced Modal) */
:root {
  --primary: #007aff;
  --bg-body: #f5f5f7;
  --bg-card: #ffffff;
  --text-main: #1d1d1f;
  --text-sub: #86868b;
  --radius-l: 24px;
  --radius-m: 16px;
  --shadow-card: 0 10px 30px rgba(0,0,0,0.04);
  --trans: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex; flex-direction: column;
}

.wrap {
  width: 100%; max-width: 920px; margin: 0 auto;
  padding: 40px 20px; flex: 1; display: flex; flex-direction: column; justify-content: center;
}

/* 顶部导航 */
.nav-bar { position: absolute; top: 0; left: 0; right: 0; padding: 20px; display: flex; justify-content: flex-end; z-index: 100; }
.brand-logo { font-size: 24px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; color: var(--text-main); }

/* 通用卡片 */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-card);
  padding: 40px; margin-bottom: 24px;
  transition: var(--trans);
  border: 1px solid rgba(0,0,0,0.02);
}
@media (max-width: 600px) { .card { padding: 24px 20px; } }

h1 { font-size: 32px; font-weight: 700; margin: 0 0 10px; letter-spacing: -1px; }
h2 { font-size: 24px; font-weight: 600; margin: 0 0 20px; }
.sub-text { color: var(--text-sub); font-size: 15px; }

/* 首页输入框 */
.hero-section { text-align: center; max-width: 600px; margin: 0 auto; }
.hero-input-group { position: relative; margin-top: 30px; }
.hero-input {
  width: 100%; height: 64px; border-radius: 99px;
  border: 1px solid #d2d2d7; padding: 0 24px 0 54px;
  font-size: 18px; outline: none; transition: var(--trans);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2386868b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'%3E%3C/rect%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'%3E%3C/path%3E%3C/svg%3E") no-repeat 20px center;
}
.hero-input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(0,122,255,0.15); }
.hero-btn {
  margin-top: 20px; height: 54px; padding: 0 48px;
  background: var(--text-main); color: #fff;
  border: none; border-radius: 99px;
  font-size: 17px; font-weight: 600; cursor: pointer; transition: var(--trans);
}
.hero-btn:hover { background: #000; transform: scale(1.02); }

/* 软件选择 Grid */
.soft-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.soft-item {
  position: relative; background: #f9f9fa;
  border-radius: var(--radius-m); padding: 20px;
  display: flex; align-items: center; gap: 16px;
  cursor: pointer; border: 2px solid transparent; transition: var(--trans);
}
.soft-item:hover { background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,0.06); transform: translateY(-2px); }
.soft-item.active { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(0,122,255,0.1); }
.soft-icon {
  width: 56px; height: 56px; object-fit: contain;
  border-radius: 14px; background: #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05); flex-shrink: 0;
}
.soft-info .name { font-weight: 600; font-size: 16px; margin-bottom: 2px; }
.soft-info .meta { font-size: 13px; color: var(--text-sub); }
.check-badge {
  position: absolute; top: 10px; right: 10px;
  width: 20px; height: 20px; background: var(--primary); color: #fff;
  border-radius: 50%; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; scale: 0.5; transition: var(--trans);
}
.soft-item.active .check-badge { opacity: 1; scale: 1; }

/* 系统选择卡片 */
.os-group { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.os-card {
  flex: 1; min-width: 200px; max-width: 300px;
  background: #fff; border: 2px solid #eee;
  border-radius: var(--radius-l); padding: 30px 20px;
  text-align: center; cursor: pointer; transition: var(--trans);
}
.os-card:hover { border-color: #ccc; transform: translateY(-2px); }
.os-card.active { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(0,122,255,0.1); }
.os-icon-img { width: 80px; height: 80px; object-fit: contain; margin: 0 auto 16px auto; display: block; }
.os-name { font-weight: 700; font-size: 18px; }

/* === 确认页布局 === */
.confirm-header {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: #f0f7ff; border: 1px solid rgba(0,122,255,0.1);
  padding: 30px; border-radius: 20px; margin-bottom: 30px;
}
.confirm-os-icon { width: 64px; height: 64px; object-fit: contain; margin-bottom: 12px; }
.confirm-os-title { font-size: 20px; font-weight: 700; color: #000; }
.confirm-os-sub { font-size: 14px; color: var(--text-sub); margin-top: 4px; }

.confirm-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 40px; }
.confirm-item {
  display: flex; align-items: center; justify-content: space-between;
  background: #fff; padding: 16px 20px; border-radius: 16px;
  border: 1px solid #f0f0f0;
}
.confirm-left { display: flex; align-items: center; gap: 16px; }
.confirm-icon { width: 44px; height: 44px; object-fit: contain; border-radius: 10px; background: #fff; padding: 2px; border:1px solid #f5f5f7; }
.confirm-name { font-weight: 600; font-size: 16px; }

/* === 弹窗 (Modal) 样式优化 === */
.modal-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px); z-index: 999;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 24px 12px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 0; visibility: hidden; transition: opacity 0.2s;
}
.modal-mask.show { opacity: 1; visibility: visible; }
.modal-box {
  width: 90%; max-width: 420px; background: #fff;
  border-radius: 20px; padding: 30px; text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  transform: scale(0.9); transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.modal-mask.show .modal-box { transform: scale(1); }

/* 弹窗内的详情框 */
.modal-preview {
  text-align: left; background: #f5f7fa; padding: 16px;
  border-radius: 16px; margin: 20px 0; font-size: 14px;
  color: var(--text-main);
}
.modal-big-os {
  font-size: 26px; font-weight: 900; color: var(--primary);
  display: block; margin-top: 4px;
}

.modal-btns { display: flex; gap: 12px; justify-content: center; margin-top: 24px; }
.modal-btn { flex: 1; height: 48px; border-radius: 12px; font-weight: 600; border: none; cursor: pointer; font-size: 15px; }
.modal-btn.cancel { background: #f0f0f0; color: #333; }
.modal-btn.confirm { background: var(--primary); color: #fff; }

/* 通用组件 */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 24px; border-radius: 99px;
  font-weight: 600; font-size: 14px; border: 1px solid #e5e5e5;
  background: #fff; color: var(--text-main); cursor: pointer; text-decoration: none; transition: var(--trans);
}
.btn:hover { background: #f5f5f7; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); box-shadow: 0 4px 12px rgba(0,122,255,0.3); }

.notice-bar { background: #eef7ff; color: #0066cc; padding: 12px 20px; border-radius: 12px; font-size: 14px; margin-bottom: 24px; border: 1px solid rgba(0,122,255,0.1); }
.status-pill { display: inline-block; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; background: #f0f0f0; color: #666; }
.list-row { display: flex; align-items: center; justify-content: space-between; padding: 20px; border-bottom: 1px solid #f0f0f0; gap: 16px; }
.list-actions { display: flex; gap: 10px; }
@media (max-width: 600px) {
  .list-row { flex-direction: column; align-items: flex-start; }
  .list-actions { width: 100%; justify-content: flex-end; margin-top: 10px; }
}
/* 解决按钮悬停变白/消失的终极补丁 */
.btn.btn-primary:hover {
    background-color: #005bb5 !important; /* 强制使用深蓝色 */
    color: #ffffff !important;            /* 强制文字为白色 */
    opacity: 1 !important;                /* 确保不透明 */
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3) !important;
}

/* 针对 Next 按钮的特别锁定 */
#chooseBtn:hover {
    background-color: #005bb5 !important;
    color: #ffffff !important;
}
/* 让退出按钮更明显 */
a[href*="logout=1"] {
    background: #fff0f0 !important;   /* 浅粉色背景 */
    color: #d70015 !important;        /* 红色文字 */
    border: 1px solid #ffcccc !important; /* 浅红色边框 */
    padding: 4px 12px !important;     /* 增加内边距 */
    border-radius: 8px !important;    /* 圆角 */
    font-weight: 600 !important;      /* 文字加粗 */
    transition: all 0.2s !important;
}

/* 悬停效果：颜色加深 */
a[href*="logout=1"]:hover {
    background: #d70015 !important;
    color: #ffffff !important;
    border-color: #d70015 !important;
    text-decoration: none !important;
}