﻿/* ==========================================================================
   RF4 官网本地复刻（rf4game.com/cn）· 样式表
   配色取自原站：页面 #594836 / 米白面板 rgba(255,255,255,.9)
   按钮：salat #bdb504 / orange #ff5909
   ========================================================================== */

@font-face {
  font-family: "Roboto";
  src: url("../fonts/Roboto-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: url("../fonts/Roboto-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Roboto Condensed";
  src: url("../fonts/RobotoCondensed-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

:root {
  --brown: #594836;
  --brown-deep: #3d3025;
  --cream: rgba(255, 255, 255, 0.9);
  --cream-solid: #efedeb;
  --salat: #bdb504;
  --salat-bright: #cdc631;
  --orange: #ff5909;
  --orange-bright: #ff8a3d;
  --ink: #1a1a1a;
  --steel: #405c6d;
  --line: #000;
  --ui: Roboto, "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  --ui-cond: "Roboto Condensed", Roboto, "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--brown) url("../img/bg-full.jpg") center top / cover no-repeat;
  color: var(--ink);
  font: 400 14px/1.4 var(--ui);
  text-align: center;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; }

/* --------------------------------------------------------------------------
   顶部：促销条 + 导航条
   -------------------------------------------------------------------------- */
.header {
  position: relative;
  background: transparent;
}

.promo {
  display: block;
  height: 84px;
  background: #123 url("../img/banner-synergy.jpg") center / cover no-repeat;
  border-bottom: 1px solid rgba(0, 0, 0, 0.35);
}

.header-bar {
  height: 86px;
  border-bottom: 1px solid #000;
}

.header-inner {
  width: 1170px;
  max-width: 100%;
  height: 100%;
  margin: 0 auto;
  padding: 0 30px;
  display: grid;
  grid-template-columns: 61px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  text-align: left;
}

.logo-mini {
  display: block;
  width: 61px;
  height: 63px;
  background: url("../img/rf4-logo-s.png") no-repeat left center / contain;
}

.nav { display: flex; align-items: center; height: 100%; }

.nav a {
  display: inline-block;
  margin: 0 12px;
  font-family: var(--ui-cond);
  font-size: 21px;
  color: #000;
  line-height: 86px;
  transition: color 0.12s ease;
}
.nav a:hover { color: var(--orange); text-decoration: none; }
.nav a.is-current { position: relative; }
.nav a.is-current::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 22px;
  height: 3px;
  background: #000;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.lang {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-left: 8px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.45);
  background: rgba(255, 255, 255, 0.78);
  color: #000;
  font-family: var(--ui-cond);
  font-size: 14px;
  letter-spacing: 0.04em;
}
.lang img { display: none; }

/* 平行四边形按钮（原站用 SVG polygon 画框，这里用 clip-path 复刻） */
.btn {
  --btn-bg: var(--salat);
  position: relative;
  display: inline-grid;
  place-items: center;
  min-width: 64px;
  height: 39px;
  padding: 0 16px;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
  background: var(--btn-bg);
  clip-path: polygon(2.5% 0, 100% 4%, 97% 100%, 0 95%);
  transition: filter 0.12s ease, transform 0.12s ease;
  cursor: pointer;
  border: 0;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.salat { --btn-bg: var(--salat); }
.btn.orange { --btn-bg: var(--orange); }

/* --------------------------------------------------------------------------
   主体
   -------------------------------------------------------------------------- */
.main { width: 1170px; max-width: 100%; margin: 0 auto; padding: 0; text-align: left; }

.hero { padding: 30px 0 45px; text-align: center; }
.hero-logo { width: 216px; height: 237px; margin: 0 auto; }

.btn-download {
  display: inline-grid;
  place-items: center;
  width: 156px;
  height: 57px;
  margin-top: 29px;
  border-radius: 8px;
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  background: linear-gradient(180deg, #ff8f4a 0%, #ff5909 52%, #e84a00 100%);
  box-shadow: 0 3px 0 #b93a00, inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: filter 0.12s ease, transform 0.12s ease;
}
.btn-download:hover { filter: brightness(1.07); text-decoration: none; }
.btn-download:active { transform: translateY(1px); box-shadow: 0 2px 0 #b93a00; }

.block {
  background: var(--cream);
  padding: 30px;
  margin-bottom: 30px;
  position: relative;
}

.block h2 {
  margin: 0 0 14px;
  font-size: 30px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.2;
}

.about-block { background: var(--cream) url("../img/about.png") no-repeat right top; }
.about-body { display: grid; grid-template-columns: 1fr; gap: 10px; max-width: 940px; }
.about-body p { margin: 0; font-size: 14px; line-height: 1.7; color: #1a1a1a; }

/* 视频：原站是一张“投影幕布”插画，这里在幕布位置留出视频坑 */
.video-block {
  background: #f3f2cc url("../img/video-bg.jpg") center / cover no-repeat;
  min-height: 632px;
  padding: 30px;
}
.video-screen {
  position: absolute;
  left: 21.37%;
  top: 13.45%;
  width: 58.12%;
  height: 62.18%;
  display: grid;
  place-items: center;
  text-align: center;
  color: #b9b2a6;
  font-size: 15px;
  letter-spacing: 0.18em;
  background: #3a3330;
  box-shadow: inset 0 0 40px rgba(0,0,0,.45);
  border: 0;
}
.video-screen span { padding: 6px 14px; background: rgba(0, 0, 0, 0.25); }

.video-more {
  position: absolute;
  left: 50%;
  bottom: -18px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 22px 0 14px;
  border-radius: 20px;
  background: #ff5909;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 2px 0 #b93a00;
}
.video-more:hover { filter: brightness(1.07); text-decoration: none; }
.video-more::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 10px solid #fff;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

/* 画廊 */
.gallery-block {
  background: var(--steel);
  min-height: 441px;
  padding: 25px 30px 30px;
  margin-bottom: 30px;
  position: relative;
}
.gallery-block h2 {
  margin: 0 0 20px;
  font-family: var(--ui-cond);
  font-size: 36px;
  font-weight: 400;
  color: #fff;
}
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.gallery-tile {
  height: 130px;
  border: 1px dashed rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.12);
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
  letter-spacing: 0.16em;
}

.btn-more {
  display: inline-grid;
  place-items: center;
  min-width: 95px;
  height: 45px;
  padding: 0 18px;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  background: var(--salat);
  clip-path: polygon(3% 0, 100% 6%, 96% 100%, 0 94%);
}
.btn-more:hover { filter: brightness(1.08); text-decoration: none; }

/* 消息 */
.news-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.news-head h2 { margin: 0; }

.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }

.news-item { display: grid; align-content: start; gap: 6px; }
.news-date { font-family: var(--ui-cond); font-size: 14px; color: #6e6a63; }
.news-title { margin: 0; font-size: 16px; font-weight: 700; color: #1a1a1a; }
.news-text { margin: 0; font-size: 14px; line-height: 1.55; color: #333; }
.news-link { font-size: 14px; color: var(--orange); }
.news-link:hover { text-decoration: underline; }

/* 轮播图 + 下载卡 */
.bottom-row {
  display: grid;
  grid-template-columns: 762px 382px;
  gap: 26px;
  margin-bottom: 30px;
  align-items: stretch;
}
.carousel {
  position: relative;
  height: 466px;
  background: #2a2522;
  overflow: hidden;
}
.carousel img { width: 100%; height: 100%; object-fit: cover; }

.download-card {
  background: var(--cream);
  padding: 65px 40px 40px;
  text-align: center;
  display: grid;
  align-content: start;
  gap: 18px;
}
.download-card .req-link { font-size: 16px; text-decoration: underline; color: #1a1a1a; }
.download-card h3 {
  margin: 10px 0 0;
  font-family: var(--ui-cond);
  font-size: 21px;
  font-weight: 400;
  color: #4f2e09;
}
.socials { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.socials a {
  width: 45px;
  height: 45px;
  background: center / contain no-repeat;
  transition: filter 0.12s ease;
}
.socials a:hover { filter: brightness(1.15); }
.socials .s-fb { background-image: url("../img/social/facebook-with-circle.png"); }
.socials .s-yt { background-image: url("../img/social/youtube-with-circle.png"); }
.socials .s-vk { background-image: url("../img/social/vk-with-circle.png"); }
.socials .s-dc { background-image: url("../img/social/discord-with-circle.png"); }
.socials .s-x { background-image: url("../img/social/X.png"); }

/* --------------------------------------------------------------------------
   页脚
   -------------------------------------------------------------------------- */
.footer {
  position: relative;
  width: 1170px;
  max-width: 100%;
  margin: 0 auto;
  padding: 26px 30px 50px;
  text-align: left;
  color: rgba(255, 255, 255, 0.86);
}
/* 页脚整条压一层深色，保证插画背景上文字仍然可读 */
.footer::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(61, 48, 37, 0.92), rgba(45, 35, 27, 0.97));
  z-index: 0;
}
.footer > * { position: relative; z-index: 1; }
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding-top: 26px;
}
.footer h4 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}
.footer ul { list-style: none; margin: 0 0 18px; padding: 0; }
.footer li { margin-bottom: 6px; }
.footer a { font-size: 14px; color: rgba(255, 255, 255, 0.86); }
.footer a:hover { color: #fff; }
.footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}
.footer-meta .badge-18 { width: 45px; height: 45px; }
.footer-meta .pay { width: 286px; height: 28px; }
.copyright { font-size: 12px; color: rgba(255, 255, 255, 0.6); }
.footer-note { font-size: 12px; line-height: 1.7; color: rgba(255, 255, 255, 0.5); margin-top: 10px; }

/* --------------------------------------------------------------------------
   账号页（注册 / 登录 / 玩家中心）
   -------------------------------------------------------------------------- */
.auth-wrap {
  width: 1170px;
  max-width: 100%;
  margin: 0 auto;
  padding: 40px 30px 60px;
}

.auth-card {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  background: #f2f2f2;
  padding: 38px 40px 34px;
  text-align: center;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.auth-card h1 {
  margin: 0 0 26px;
  font-size: 30px;
  font-weight: 700;
  color: #1a1a1a;
}

.field { max-width: 370px; margin: 0 auto 14px; text-align: left; position: relative; }

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field select {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  font: 400 15px/1 var(--ui);
  color: #1a1a1a;
  background: #fff;
  border: 1px solid #9d9d9d;
  border-radius: 0;
  outline: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.field select { height: 44px; }
.field input::placeholder { color: #6f6f6f; }
.field input:focus,
.field select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 89, 9, 0.16);
}
.field.has-error input,
.field.has-error select { border-color: #d92b2b; }

.hint { margin: 6px 0 0; font-size: 12px; line-height: 1.5; color: #6b6b6b; }
.err { margin: 6px 0 0; font-size: 12px; line-height: 1.5; color: #c62828; display: none; }
.field.has-error .err { display: block; }
.err-line { margin: 10px 0 0; font-size: 12px; line-height: 1.5; color: #c62828; text-align: center; }
.err-line:empty { display: none; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.captcha-row { display: grid; grid-template-columns: 1fr 28px 150px; align-items: center; gap: 10px; }
.captcha-refresh {
  width: 28px;
  height: 44px;
  border: 0;
  background: transparent url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a1a1a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='15 5 20 5 20 10'/><path d='M20 5l-4.6 4.6A7 7 0 1 0 19 14'/></svg>") center / 22px no-repeat;
  cursor: pointer;
}
.captcha-refresh:hover { filter: brightness(0.6); }
.captcha-img {
  height: 44px;
  width: 150px;
  border: 1px solid #9d9d9d;
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.captcha-img img { height: 100%; width: 100%; object-fit: contain; }

.checks { margin: 18px 0 6px; display: grid; gap: 12px; justify-items: center; text-align: center; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: #1a1a1a; cursor: pointer; }
.check input {
  appearance: none;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1px solid #8b8b8b;
  background: #fff;
  cursor: pointer;
  position: relative;
}
.check input:checked { background: #fff; border-color: #8b8b8b; }
.check input:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid #1a1a1a;
  border-width: 0 2px 2px 0;
  transform: rotate(43deg);
}
.check a { color: var(--orange); }
.check a:hover { text-decoration: underline; }

.btn-submit {
  margin-top: 18px;
  display: inline-grid;
  place-items: center;
  min-width: 156px;
  height: 50px;
  padding: 0 26px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(180deg, #ff8f4a 0%, #ff5909 52%, #e84a00 100%);
  box-shadow: 0 3px 0 #b93a00, inset 0 1px 0 rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: filter 0.12s ease, transform 0.12s ease;
}
.btn-submit:hover { filter: brightness(1.07); }
.btn-submit:active { transform: translateY(1px); }
.btn-submit[disabled] { cursor: progress; filter: grayscale(0.25) brightness(0.95); }

.auth-links { margin-top: 18px; font-size: 14px; color: #4a4a4a; }
.auth-links a { color: var(--orange); }

.form-alert {
  display: none;
  margin: 0 0 16px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
  color: #8d1c1c;
  background: #fdeaea;
  border: 1px solid #f3c2c2;
}
.form-alert.is-on { display: block; }

.success-panel { display: none; text-align: center; }
.success-panel.is-on { display: block; }
.success-panel .ok-mark {
  width: 64px;
  height: 64px;
  margin: 4px auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #dff3d8;
  color: #2f7a26;
  font-size: 30px;
}
.success-panel h2 { margin: 0 0 10px; font-size: 24px; }
.success-panel p { margin: 0 0 8px; font-size: 14px; line-height: 1.6; color: #333; }
.success-panel .account-line { font-family: var(--ui-cond); font-size: 20px; color: #1a1a1a; }

.spinner {
  display: none;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn-submit[disabled] .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 玩家中心 */
.account-card {
  width: 640px;
  margin: 0 auto;
  max-width: 100%;
  background: var(--cream);
  padding: 34px 38px;
  text-align: left;
}
.account-card h1 { margin: 0 0 6px; font-size: 26px; }
.account-sub { margin: 0 0 22px; font-size: 14px; color: #5c5c5c; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 8px 18px; font-size: 14px; }
.kv dt { color: #6b6b6b; }
.kv dd { margin: 0; color: #1a1a1a; font-weight: 500; }
.account-actions { display: flex; gap: 12px; margin-top: 26px; }

/* 建设中页 */
.soon-box {
  width: 720px;
  max-width: 100%;
  margin: 60px auto 80px;
  padding: 46px 40px;
  background: var(--cream);
  text-align: center;
}
.soon-box h1 { margin: 0 0 12px; font-size: 30px; }
.soon-box p { margin: 0 0 24px; font-size: 14px; color: #444; line-height: 1.7; }

/* --------------------------------------------------------------------------
   响应式
   -------------------------------------------------------------------------- */
@media (max-width: 1240px) {
  .header-inner, .main, .footer, .auth-wrap { width: 100%; }
  .bottom-row { grid-template-columns: 1fr 340px; }
}

@media (max-width: 980px) {
  .header-inner { grid-template-columns: 52px 1fr auto; padding: 0 16px; gap: 12px; }
  .logo-mini { width: 52px; height: 54px; }
  .nav a { margin: 0 9px; font-size: 17px; line-height: 78px; }
  .header-bar { height: 78px; }
  .lang { display: none; }
  .news-grid { grid-template-columns: 1fr; gap: 22px; }
  .bottom-row { grid-template-columns: 1fr; }
  .carousel { height: auto; }
  .video-block { min-height: 0; aspect-ratio: 1170 / 632; }
  .video-screen { font-size: 12px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .promo { height: 56px; }
  .header-bar { height: auto; }
  .header-inner { grid-template-columns: 44px 1fr; grid-template-areas: "logo actions" "nav nav"; padding: 10px 14px 12px; }
  .logo-mini { width: 44px; height: 46px; }
  .nav { grid-area: nav; flex-wrap: wrap; margin-top: 8px; }
  .nav a { line-height: 32px; margin: 0 10px 0 0; font-size: 15px; }
  .header-actions { justify-content: flex-end; }
  .btn { min-width: 56px; height: 33px; padding: 0 12px; font-size: 13px; }
  .hero { padding: 20px 0 26px; }
  .hero-logo { width: 150px; height: 165px; }
  .btn-download { width: 136px; height: 50px; font-size: 20px; }
  .block, .gallery-block { padding: 20px; margin-bottom: 20px; }
  .block h2, .gallery-block h2 { font-size: 24px; }
  .main, .footer, .auth-wrap { padding-left: 14px; padding-right: 14px; }
  .footer { padding-bottom: 36px; }
  .footer-meta { flex-direction: column; align-items: flex-start; }
  .footer-meta .pay { width: 240px; height: auto; }
  .auth-card { padding: 26px 20px; }
  .captcha-row { grid-template-columns: 1fr 26px 120px; }
  .captcha-img { width: 120px; }
  .kv { grid-template-columns: 96px 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
