
.hp-page-games .hp-content{padding:30px 38px 36px!important;max-width:1650px!important;margin:auto!important}
.g351-head{display:flex;justify-content:space-between;align-items:flex-start;gap:24px;margin-bottom:20px}.g351-head h1{font-size:28px;margin:0 0 6px}.g351-head p{margin:0;color:#777;font-size:13px}.g351-head-actions{display:flex;gap:8px;flex-wrap:wrap}.g351-public-btn,.g351-new-btn{height:50px;padding:0 22px;border-radius:8px;font-weight:900;display:flex;align-items:center;justify-content:center}.g351-public-btn{background:#fff;color:#111;border:1px solid #ddd}.g351-new-btn{background:linear-gradient(90deg,#ff6900,#ff4b00);color:#fff}
.g351-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:16px}.g351-summary-card{background:#fff;border:1px solid #e6e7e9;border-radius:10px;padding:17px 18px}.g351-summary-card span{display:block;font-size:11px;color:#777}.g351-summary-card strong{display:block;font-size:27px;margin-top:4px}.g351-summary-card.win strong{color:#ff5708}.g351-summary-card.rate strong{color:#2aa865}
.g351-ad{height:86px;margin:16px 0;background:#fff;border:1px solid #e6e7e9;border-radius:10px;display:grid;place-items:center;text-align:center;color:#999}.g351-ad small{font-size:8px;letter-spacing:.2em}.g351-ad strong{display:block;color:#555;font-size:13px;margin-top:3px}
.g351-filter-panel{background:#fff;border:1px solid #e6e7e9;border-radius:10px;padding:16px;margin-bottom:14px}.g351-filter-top{display:grid;grid-template-columns:1.5fr repeat(3,.8fr) auto;gap:10px}.g351-search-wrap input,.g351-filter-panel select{width:100%;height:44px;min-height:44px;border:1px solid #ddd;border-radius:7px;background:#fff;padding:0 12px;outline:none;margin:0}.g351-clear-btn{height:44px;border:1px solid #ddd;background:#fff;border-radius:7px;padding:0 16px;font-size:12px;font-weight:800}
.g351-list-card{background:#fff;border:1px solid #e6e7e9;border-radius:10px;overflow:hidden}.g351-list-head,.g351-game-row{display:grid;grid-template-columns:120px 1.25fr 1.3fr .7fr .85fr .65fr 150px;gap:12px}.g351-list-head{padding:13px 18px;background:#fafafa;border-bottom:1px solid #eee;color:#777;font-size:10px;font-weight:800}.g351-game-row{align-items:center;padding:16px 18px;border-bottom:1px solid #eee;transition:background .15s}.g351-game-row:hover{background:#fffaf6}.g351-date b{display:block;font-size:13px}.g351-date small{color:#999;font-size:10px}.g351-game-title{font-size:14px}.g351-opponent{display:flex;align-items:center;gap:10px}.g351-team-dot{width:32px;height:32px;border-radius:8px;background:#f2f2f2;display:grid;place-items:center;font-weight:900;flex:0 0 32px}.g351-score{font-size:21px;font-weight:950;white-space:nowrap}.g351-mode{display:inline-flex;width:max-content;padding:5px 8px;border-radius:5px;font-size:9px;font-weight:900}.g351-mode-score{background:#fff0e8;color:#ff5708}.g351-mode-game{background:#edf4ff;color:#2f7bdc}.g351-mode-chart{background:#ecf9f2;color:#2aa865}.g351-result{font-size:11px;font-weight:950}.g351-result-win{color:#ff5708}.g351-result-lose{color:#2f7bdc}.g351-result-draw{color:#777}.g351-result-play{color:#2aa865}
.g351-actions{display:flex;justify-content:flex-end;gap:6px}.g351-actions form{margin:0}.g351-action-btn{width:34px;height:34px;border:1px solid #ddd;background:#fff;border-radius:7px;display:grid;place-items:center;padding:0;transition:.15s;cursor:pointer}.g351-action-btn img{width:18px;height:18px}.g351-action-btn:hover{background:#f7f7f7;transform:translateY(-1px)}.g351-action-btn.edit:hover{border-color:#ff8a55;background:#fff5f0}.g351-action-btn.duplicate:hover{border-color:#7ba8e8;background:#f2f7ff}.g351-action-btn.delete:hover{border-color:#e98787;background:#fff3f3}
.g351-filter-empty,.g351-empty-state{display:none;padding:54px 20px;text-align:center;color:#777}.g351-filter-empty strong,.g351-empty-state strong{display:block;color:#111;margin-bottom:8px}.g351-filter-empty span,.g351-empty-state span{display:block}.g351-empty-state{display:block;background:#fff;border:1px solid #e6e7e9;border-radius:10px}.g351-empty-state a{display:inline-flex;margin-top:18px;padding:10px 16px;border-radius:7px;background:#ff5708;color:#fff;font-weight:800}
.g351-pagination{display:flex;justify-content:center;gap:6px;margin-top:18px}.g351-pagination button{width:36px;height:36px;border:1px solid #ddd;background:#fff;border-radius:7px;display:grid;place-items:center;font-size:12px;font-weight:800;cursor:pointer}.g351-pagination button.active{background:#111;color:#fff}.g351-ad-bottom{margin-top:18px}
@media(max-width:800px){.hp-page-games .hp-content{padding:20px 14px 95px!important}.g351-head{display:block}.g351-head h1{font-size:24px}.g351-head-actions{display:grid;grid-template-columns:1fr 1fr;margin-top:15px}.g351-public-btn,.g351-new-btn{height:46px;padding:0 10px;font-size:12px}.g351-summary{grid-template-columns:1fr 1fr;gap:8px}.g351-summary-card{padding:14px}.g351-summary-card strong{font-size:24px}.g351-filter-top{grid-template-columns:1fr 1fr;gap:8px}.g351-search-wrap{grid-column:1/-1}.g351-clear-btn{height:44px}.g351-list-head{display:none}.g351-list-card{background:transparent;border:0;overflow:visible}.g351-game-row{grid-template-columns:1fr auto;gap:10px;background:#fff;border:1px solid #e6e7e9;border-radius:9px;padding:14px;margin-bottom:9px}.g351-date{grid-column:1}.g351-game-title{grid-column:1}.g351-opponent{grid-column:1}.g351-score{grid-column:2;grid-row:1/3;font-size:22px}.g351-game-row>.g351-result{display:none}.g351-game-row>.g351-mode{grid-column:1;width:max-content}.g351-actions{grid-column:2;grid-row:3/5}.g351-ad{height:92px}}


/* ============================================================
   v3.52 FILTER ALIGNMENT / TWO ACTION BUTTONS
   ============================================================ */
.hp-page-games .g351-filter-top{
  align-items:center !important;
}
.hp-page-games .g351-search-wrap{
  display:flex !important;
  align-items:center !important;
  min-width:0 !important;
  height:44px !important;
}
.hp-page-games .g351-search-wrap input,
.hp-page-games .g351-filter-panel select,
.hp-page-games .g351-clear-btn{
  box-sizing:border-box !important;
  height:44px !important;
  min-height:44px !important;
  max-height:44px !important;
  margin:0 !important;
}
.hp-page-games .g351-search-wrap input{
  display:block !important;
  width:100% !important;
  line-height:42px !important;
  padding-top:0 !important;
  padding-bottom:0 !important;
}
.hp-page-games .g351-filter-panel select{
  display:block !important;
  line-height:42px !important;
}
.hp-page-games .g351-clear-btn{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  line-height:1 !important;
}

.hp-page-games .g351-list-head,
.hp-page-games .g351-game-row{
  grid-template-columns:120px 1.25fr 1.3fr .7fr .85fr .65fr 95px !important;
}
.hp-page-games .g351-actions{
  gap:8px !important;
}

@media(max-width:800px){
  .hp-page-games .g351-filter-top{
    align-items:stretch !important;
  }
  .hp-page-games .g351-search-wrap{
    height:44px !important;
  }
}


/* ============================================================
   v3.53 EDIT CONFIRM MODAL
   ============================================================ */
html.g353-modal-open,
body.g353-modal-open{
  overflow:hidden !important;
}

.g353-modal-backdrop{
  position:fixed;
  inset:0;
  z-index:1000;
  background:rgba(0,0,0,.48);
  opacity:0;
  transition:opacity .18s ease;
}
.g353-modal-backdrop.is-open{opacity:1}

.g353-modal{
  position:fixed;
  inset:0;
  z-index:1001;
  display:grid;
  place-items:center;
  padding:20px;
  opacity:0;
  transform:translateY(8px);
  transition:opacity .18s ease,transform .18s ease;
  pointer-events:none;
}
.g353-modal.is-open{
  opacity:1;
  transform:none;
  pointer-events:auto;
}

.g353-modal-panel{
  position:relative;
  width:min(460px,calc(100vw - 32px));
  background:#fff;
  border-radius:14px;
  padding:30px 30px 24px;
  box-shadow:0 24px 70px rgba(0,0,0,.25);
  text-align:center;
}

.g353-modal-close{
  position:absolute;
  top:12px;
  right:12px;
  width:34px;
  height:34px;
  border:0;
  border-radius:50%;
  background:#f3f4f5;
  font-size:22px;
  line-height:1;
  cursor:pointer;
}

.g353-modal-icon{
  width:58px;
  height:58px;
  margin:0 auto 14px;
  border-radius:50%;
  background:#fff3ec;
  display:grid;
  place-items:center;
}
.g353-modal-icon img{width:25px;height:25px}

.g353-modal h2{
  margin:0;
  font-size:22px;
  line-height:1.35;
}
.g353-modal p{
  margin:8px 0 0;
  color:#777;
  font-size:13px;
}
.g353-modal-game{
  margin:18px 0;
  padding:13px 14px;
  border:1px solid #ececec;
  border-radius:8px;
  background:#fafafa;
  font-size:13px;
  font-weight:800;
  color:#333;
}

.g353-modal-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.g353-modal-cancel,
.g353-modal-go{
  min-height:46px;
  border-radius:8px;
  font-weight:900;
  display:flex;
  align-items:center;
  justify-content:center;
}
.g353-modal-cancel{
  border:1px solid #ddd;
  background:#fff;
  color:#111;
  cursor:pointer;
}
.g353-modal-go{
  background:linear-gradient(90deg,#ff6900,#ff4b00);
  color:#fff;
}
.g353-modal-cancel:hover{background:#f7f7f7}
.g353-modal-go:hover{filter:brightness(.97)}

@media(max-width:800px){
  .g353-modal{padding:16px}
  .g353-modal-panel{padding:28px 18px 20px}
  .g353-modal h2{font-size:20px}
  .g353-modal-actions{grid-template-columns:1fr}
  .g353-modal-cancel{order:2}
  .g353-modal-go{order:1}
}


/* ============================================================
   v3.54 MOBILE GAMES — SAMPLE SCREEN MATCH
   ============================================================ */
@media (max-width:800px){

  /* Page spacing */
  .hp-page-games .hp-content{
    padding:20px 12px 96px !important;
  }

  /* Heading + actions: sample has two full-width stacked buttons */
  .hp-page-games .g351-head{
    display:block !important;
    margin-bottom:16px !important;
  }
  .hp-page-games .g351-head h1{
    margin:0 0 5px !important;
    font-size:24px !important;
    line-height:1.25 !important;
  }
  .hp-page-games .g351-head p{
    font-size:12px !important;
    line-height:1.55 !important;
  }
  .hp-page-games .g351-head-actions{
    display:flex !important;
    flex-direction:column !important;
    gap:18px !important;
    width:100% !important;
    margin-top:14px !important;
  }
  .hp-page-games .g351-public-btn,
  .hp-page-games .g351-new-btn{
    width:100% !important;
    height:44px !important;
    min-height:44px !important;
    margin:0 !important;
    padding:0 14px !important;
    border-radius:7px !important;
    font-size:13px !important;
    line-height:1 !important;
    justify-content:center !important;
  }

  /* Summary cards */
  .hp-page-games .g351-summary{
    grid-template-columns:1fr 1fr !important;
    gap:8px !important;
    margin-top:0 !important;
    margin-bottom:14px !important;
  }
  .hp-page-games .g351-summary-card{
    min-height:67px !important;
    padding:12px !important;
    border-radius:8px !important;
  }
  .hp-page-games .g351-summary-card span{
    font-size:9px !important;
    margin-bottom:2px !important;
  }
  .hp-page-games .g351-summary-card strong{
    margin:0 !important;
    font-size:23px !important;
    line-height:1.1 !important;
  }

  /* Top advertisement */
  .hp-page-games .g351-ad{
    height:80px !important;
    min-height:80px !important;
    margin:14px 0 !important;
    border-radius:8px !important;
  }
  .hp-page-games .g351-ad small{
    font-size:7px !important;
  }
  .hp-page-games .g351-ad strong{
    font-size:11px !important;
  }

  /* Filter panel */
  .hp-page-games .g351-filter-panel{
    padding:12px !important;
    margin-bottom:14px !important;
    border-radius:8px !important;
  }
  .hp-page-games .g351-filter-top{
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:8px !important;
    align-items:stretch !important;
  }
  .hp-page-games .g351-search-wrap{
    grid-column:1/-1 !important;
    width:100% !important;
    height:38px !important;
  }
  .hp-page-games .g351-search-wrap input,
  .hp-page-games .g351-filter-panel select,
  .hp-page-games .g351-clear-btn{
    height:38px !important;
    min-height:38px !important;
    max-height:38px !important;
    border-radius:6px !important;
    font-size:12px !important;
    margin:0 !important;
  }
  .hp-page-games .g351-filter-panel select{
    padding-left:11px !important;
    padding-right:30px !important;
  }

  /* Cards instead of desktop table */
  .hp-page-games .g351-list-card{
    background:transparent !important;
    border:0 !important;
    overflow:visible !important;
  }
  .hp-page-games .g351-list-head{
    display:none !important;
  }
  .hp-page-games .g351-game-row{
    position:relative !important;
    display:grid !important;
    grid-template-columns:minmax(0,1fr) auto !important;
    grid-template-rows:auto auto auto auto !important;
    column-gap:12px !important;
    row-gap:6px !important;
    min-height:142px !important;
    margin:0 0 9px !important;
    padding:13px 12px !important;
    background:#fff !important;
    border:1px solid #e4e5e7 !important;
    border-radius:8px !important;
    align-items:start !important;
  }
  .hp-page-games .g351-game-row:hover{
    background:#fffaf6 !important;
  }

  /* Date at top-left */
  .hp-page-games .g351-date{
    grid-column:1 !important;
    grid-row:1 !important;
    align-self:start !important;
  }
  .hp-page-games .g351-date b{
    display:block !important;
    font-size:11px !important;
    line-height:1.2 !important;
  }
  .hp-page-games .g351-date small{
    display:block !important;
    margin-top:3px !important;
    font-size:8px !important;
    line-height:1 !important;
    color:#999 !important;
  }

  /* Score at top-right, matching sample */
  .hp-page-games .g351-score{
    grid-column:2 !important;
    grid-row:1/3 !important;
    justify-self:end !important;
    align-self:center !important;
    margin:0 !important;
    font-size:22px !important;
    line-height:1 !important;
    white-space:nowrap !important;
  }

  /* Tournament / game name */
  .hp-page-games .g351-game-title{
    grid-column:1 !important;
    grid-row:2 !important;
    min-width:0 !important;
    max-width:190px !important;
    margin:0 !important;
    font-size:12px !important;
    line-height:1.35 !important;
    font-weight:700 !important;
    overflow-wrap:anywhere !important;
  }

  /* Opponent */
  .hp-page-games .g351-opponent{
    grid-column:1 !important;
    grid-row:3 !important;
    display:flex !important;
    align-items:center !important;
    min-width:0 !important;
    gap:8px !important;
    margin:0 !important;
    font-size:12px !important;
    line-height:1.2 !important;
  }
  .hp-page-games .g351-team-dot{
    width:28px !important;
    height:28px !important;
    min-width:28px !important;
    flex:0 0 28px !important;
    border-radius:7px !important;
    font-size:12px !important;
  }
  .hp-page-games .g351-opponent > span:last-child{
    min-width:0 !important;
    overflow-wrap:anywhere !important;
  }

  /* Mode bottom-left */
  .hp-page-games .g351-game-row > .g351-mode{
    grid-column:1 !important;
    grid-row:4 !important;
    align-self:end !important;
    width:max-content !important;
    margin:0 !important;
    padding:4px 7px !important;
    border-radius:4px !important;
    font-size:7px !important;
    line-height:1 !important;
  }

  /* Hide result text in SP just like the sample */
  .hp-page-games .g351-game-row > .g351-result{
    display:none !important;
  }

  /* Edit/Delete at lower right */
  .hp-page-games .g351-actions{
    grid-column:2 !important;
    grid-row:3/5 !important;
    justify-self:end !important;
    align-self:end !important;
    display:flex !important;
    gap:6px !important;
    margin:0 !important;
  }
  .hp-page-games .g351-action-btn{
    width:31px !important;
    height:31px !important;
    min-width:31px !important;
    min-height:31px !important;
    border-radius:6px !important;
  }
  .hp-page-games .g351-action-btn img{
    width:16px !important;
    height:16px !important;
  }

  /* Pagination */
  .hp-page-games .g351-pagination{
    margin-top:14px !important;
    gap:6px !important;
  }
  .hp-page-games .g351-pagination button{
    width:32px !important;
    height:32px !important;
    border-radius:6px !important;
    font-size:11px !important;
  }

  /* Bottom ad */
  .hp-page-games .g351-ad-bottom{
    margin-top:16px !important;
    height:80px !important;
  }

  /* Copyright spacing */
  .hp-page-games .hp-copyright{
    padding-bottom:88px !important;
  }
}

/* Narrow phones */
@media (max-width:380px){
  .hp-page-games .g351-game-title{
    max-width:160px !important;
  }
  .hp-page-games .g351-score{
    font-size:20px !important;
  }
}

/* v3.58 result button */
.hp-page-games .g351-list-head,
.hp-page-games .g351-game-row{
  grid-template-columns:120px 1.25fr 1.3fr .7fr .85fr .65fr 150px !important;
}
.hp-page-games .g358-result-btn{
  width:52px !important;
  padding:0 8px !important;
  color:#fff !important;
  background:#111 !important;
  border-color:#111 !important;
  font-size:9px !important;
  font-weight:900 !important;
}
.hp-page-games .g358-result-btn span{display:block;white-space:nowrap}
.hp-page-games .g358-result-btn:hover{background:#ff5708 !important;border-color:#ff5708 !important}
@media(max-width:800px){
  .hp-page-games .g351-game-row{grid-template-columns:minmax(0,1fr) auto !important}
  .hp-page-games .g351-actions{flex-wrap:wrap !important;max-width:112px !important;justify-content:flex-end !important}
  .hp-page-games .g358-result-btn{width:auto !important;min-width:52px !important;height:31px !important}
}
