/* ===== 基础重置 ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

@font-face {
  font-family: "idolFont";
  src: url("/assets/font/IrisIdol.ttf") format("truetype");
}

html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* ===== 背景 ===== */
#background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

/* ===== 漂浮图案 ===== */
.shape {
  position: absolute;
  pointer-events: none;
  user-select: none;
}

.navbar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:20px 50px;
    background:#1f1f1f;
}

/* logo */
.logo img{
    height:50px;
    transition:0.3s;
}

.logo img:hover{
    transform:scale(1.1);
}

/* 导航容器 */
.navbar nav{
    display:flex;
}

/* 导航链接 */
.navbar a{
    color:white;
    margin-left:20px;
    text-decoration:none;
    font-size:16px;
}
/* ===== 标题 ===== */
h1 {
  text-align: center;
  font-size: clamp(20px, 6vw, 48px);
  padding: 15px;
  background: linear-gradient(90deg, #FFAF2E, #FFDA60);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle {
  text-align: center;
  color: #999;
  font-size: 20px;
  margin-bottom: 10px;
  letter-spacing: 2px;
}

/* ===== 卡片容器（核心） ===== */
.container {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 手机默认2列 */
  gap: 10px;
  padding: 10px;
}

/* ===== 卡片 ===== */
.card {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 12px;
  background: #eee;
  cursor: pointer;
  transition: transform 0.2s;
}

.card:active {
  transform: scale(0.96);
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 右下角标识 */
.card::after {
  content: "2P";
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0,0,0,0.6);
  color: white;
  padding: 2px 6px;
  font-size: 12px;
  border-radius: 6px;
}

/* ===== 分页 ===== */
.pagination {
  text-align: center;
  margin: 20px 0;
}

.btn-glow {
  position: relative;
  overflow: hidden;
  padding: 10px 20px;
  min-height: 40px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(90deg, #FFAF2E, #FFDA60);
  color: white;
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
}

.btn-glow::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255,255,255,0.6),
    transparent
  );
  transition: 0.6s;
}

.btn-glow:hover::before {
  left: 100%;
}

/* ===== 上传区域 ===== */
.custom-file-btn input {
  display: none;
}

.custom-file-btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 999px;
  background: linear-gradient(90deg, #FFAF2E, #FFDA60);
  color: white;
  font-weight: bold;
  cursor: pointer;
}

.upload-area {
  text-align: center;
  padding: 20px;
}

/* ===== Modal（移动优先） ===== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
}

.modal-content {
  display: flex;
  flex-direction: column; /* 手机竖排 */
  align-items: center;
  gap: 10px;
}

.modal-content img {
  max-width: 90vw;
  max-height: 40vh;
}

/* ===== Footer ===== */
footer {
  background: #1f1f1f;
  color: white;
  text-align: center;
  padding: 20px;
}

/* ========================= */
/* ===== 平板及以上 ===== */
/* ========================= */

@media (min-width: 600px) {
  .container {
    grid-template-columns: repeat(3, 1fr);
  }
}
}

/* ========================= */
/* ===== 大屏（PC） ===== */
/* ========================= */

@media (min-width: 768px) {
.navbar{
        flex-direction:column;        /* 👈 变竖排 */
        align-items:center;
    }

    .navbar nav{
        flex-wrap:wrap;              /* 👈 允许换行 */
        justify-content:center;
        margin-top:10px;
    }

    .navbar a{
        margin:6px 10px;             /* 👈 改成上下间距 */
        font-size:14px;
    }

    .logo img{
        height:40px;                 /* 👈 小屏缩小一点 */
    }

  .modal-content {
    flex-direction: row;
  }

  .modal-content img {
    max-width: 40vw;
    max-height: 80vh;
  }
}

/* ========================= */
/* ===== 更大屏 ===== */
/* ========================= */

@media (min-width: 1024px) {
  .container {
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    padding: 20px;
  }

  .upload-area {
    padding: 50px;
  }
}
