﻿:root {
  --bg1: #f4f7fb;
  --bg2: #eaf2ff;
  --card: #ffffff;
  --primary: #1d4ed8;
  --primary-hover: #1e40af;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --line: #dbe5f3;
  --shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text-main);
  background:
    radial-gradient(circle at 90% 10%, rgba(29, 78, 216, 0.12), transparent 35%),
    radial-gradient(circle at 10% 90%, rgba(56, 189, 248, 0.15), transparent 40%),
    linear-gradient(160deg, var(--bg1), var(--bg2));
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  overflow-x: hidden;
}

.container {
  margin-top: 5vh;
  margin-bottom: 4vh;
  max-width: 860px;
  padding: 28px;
  border: 1px solid rgba(219, 229, 243, 0.85);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(2px);
}

body.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.login-page .container {
  width: min(92vw, 560px);
  margin-top: 0;
  margin-bottom: 0;
}

body.login-page #gamename,
body.login-page .blockquote.text-center {
  word-break: break-word;
}

body.login-page #loginForm .form-group.row {
  margin-left: 0;
  margin-right: 0;
}

body.login-page #loginForm .form-group.row > [class*="col-"] {
  padding-left: 0;
  padding-right: 0;
}

.blockquote.text-center {
  margin-bottom: 0.8rem;
  color: var(--text-main);
  font-weight: 600;
  letter-spacing: 0.2px;
}

#gamename {
  margin-bottom: 1.2rem;
  font-size: 1.15rem;
  font-weight: 700;
}

h4 {
  margin-bottom: 1rem;
  color: var(--text-main);
  font-weight: 700;
}

label,
legend {
  color: var(--text-main);
  font-weight: 600;
}

.form-control,
.form-select,
input[type="date"] {
  border: 1px solid var(--line);
  border-radius: 10px;
  background-color: #fdfefe;
  transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus,
input[type="date"]:focus {
  border-color: rgba(29, 78, 216, 0.45);
  box-shadow: 0 0 0 0.2rem rgba(29, 78, 216, 0.16);
}

.form-group,
fieldset {
  margin-bottom: 1rem;
}

fieldset {
  border: 1px solid #e6eef9;
  border-radius: 12px;
  padding: 0.7rem 0.9rem 0.2rem;
  background: #fbfdff;
}

fieldset.form-group.row > legend.col-sm-2 {
  max-width: 100%;
  flex: 0 0 100%;
  width: 100%;
  margin-bottom: 0.55rem;
  white-space: nowrap;
}

fieldset.form-group.row > .col-sm-10 {
  max-width: 100%;
  flex: 0 0 100%;
  width: 100%;
}

.form-check {
  margin-bottom: 0.55rem;
}

.form-check-label {
  color: #1e293b;
}

#radioGroup,
#itemGroup {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.recharge-item {
  margin: 0;
  position: relative;
  padding-left: 0;
}

.recharge-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.recharge-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  min-height: 250px;
  margin: 0;
  padding: 14px 12px 12px;
  border: 1px solid #dfe7f5;
  border-radius: 12px;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.recharge-card:hover {
  border-color: #97b9ef;
  box-shadow: 0 8px 18px rgba(30, 64, 175, 0.12);
  transform: translateY(-1px);
}

.recharge-img {
  width: 152px;
  height: 152px;
  object-fit: contain;
  margin-bottom: 2px;
}

.recharge-name {
  color: #0f172a;
  font-weight: 700;
  line-height: 1.3;
  text-align: left;
}

.recharge-price {
  color: #dc2626;
  font-weight: 700;
  font-size: 1.08rem;
  text-align: left;
}

.recharge-tip {
  margin: 0.4rem 0 1rem;
  color: #dc2626;
  font-weight: 700;
  line-height: 1.45;
}

.recharge-radio:checked + .recharge-card {
  border-color: #1d4ed8;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.14), 0 10px 20px rgba(29, 78, 216, 0.18);
  background: linear-gradient(180deg, #f9fcff, #eef5ff);
}

.form-check-input {
  cursor: pointer;
}

.form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

.btn {
  border: none;
  border-radius: 10px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #2563eb);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.26);
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, var(--primary-hover), var(--primary));
  transform: translateY(-1px);
}

#historypay {
  margin-bottom: 0.6rem;
}

#searchBtn {
  min-width: 120px;
  margin-bottom: 0.8rem;
}

.table-responsive {
  border: 1px solid #e7edf8;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.table {
  margin-bottom: 0;
}

.table thead th {
  border-top: none;
  background: #f2f7ff;
  color: #1e3a8a;
  font-weight: 700;
}

.table td,
.table th {
  vertical-align: middle;
}

.pagination {
  margin-top: 1rem;
  gap: 0.3rem;
}

.page-item .page-link {
  border-radius: 8px;
  border: 1px solid #d7e2f3;
  color: #1d4ed8;
}

.page-item.active .page-link {
  background-color: #1d4ed8;
  border-color: #1d4ed8;
}

@media (max-width: 768px) {
  .container {
    margin: 2vh 12px;
    padding: 18px 15px;
  }

  body.login-page {
    padding: 12px;
  }

  body.login-page .container {
    width: 100%;
    max-width: 460px;
    padding: 16px 14px;
  }

  .form-group.row,
  fieldset.form-group.row {
    margin-left: 0;
    margin-right: 0;
  }

  .form-group.row > [class*="col-"],
  fieldset.form-group.row > [class*="col-"] {
    padding-left: 0;
    padding-right: 0;
  }

  .col-sm-2,
  .col-sm-10,
  .col-form-label {
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
    text-align: left;
  }

  .float-right {
    float: none !important;
    width: 100%;
    margin-bottom: 0.8rem;
  }

  .btn.col-sm-12 {
    width: 100%;
  }

  .recharge-card {
    min-height: 230px;
    padding: 12px 10px 10px;
  }

  .recharge-img {
    width: 132px;
    height: 132px;
  }
}

@media (min-width: 768px) {
  #radioGroup,
  #itemGroup {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  #radioGroup,
  #itemGroup {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
