:root{
  --gold:#f1d77e;
  --gold-border:#c8a95a;
  --panel:#1d3275;
  --text:#e8efff;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  min-height:100vh;
  font-family:"Be Vietnam Pro",Arial,sans-serif;
  color:var(--text);
  background:#081224;
}

.bg{
  position:fixed;
  inset:0;
  z-index:-2;
  background:
    linear-gradient(to bottom, rgba(9,13,25,.66), rgba(30,116,190,.50)),
    url("./background/backgroundnew.png") center/cover no-repeat;
  filter:saturate(1.12) brightness(.88);
}

.overlay{
  position:fixed;
  inset:0;
  z-index:-1;
  background:linear-gradient(to bottom, rgba(15,20,32,.10), rgba(33,123,206,.26));
}

.topbar{
  position:fixed;
  top:0;left:0;right:0;
  height:82px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-bottom:2px solid rgba(241,215,126,.62);
  background:linear-gradient(to bottom, rgba(0,0,0,.66), rgba(0,0,0,.38));
  z-index:20;
}

.top-logo{
  position:absolute;
  left:14px;
  top:50%;
  transform:translateY(-50%);
  width:auto;
  height:48px;
  max-width:min(240px,42vw);
  display:flex;
  align-items:center;
}
.top-logo img{
  height:100%;
  width:auto;
  max-width:100%;
  object-fit:contain;
}

.top-nav{display:flex;gap:28px}
.top-nav a{
  color:#fff4d5;
  text-decoration:none;
  font-family:"Cinzel",serif;
  font-size:22px;
  font-weight:700;
  letter-spacing:.8px;
}
.top-nav a.active,.top-nav a:hover{color:var(--gold)}

.page{
  width:min(1080px,92vw);
  margin:0 auto;
  padding:120px 0 80px;
}

.title{
  margin:0 0 14px;
  text-align:center;
  font-family:"Cinzel",serif;
  font-size:54px;
  color:#ffe48d;
  text-shadow:0 2px 0 #6f5718;
}

.grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
}

.card{
  border:2px solid var(--gold-border);
  border-radius:12px;
  background:linear-gradient(to bottom, rgba(30,53,121,.96), rgba(20,43,101,.96));
  padding:18px;
  box-shadow:0 16px 28px rgba(0,0,0,.45);
}
.account-card{
  display:flex;
  flex-direction:column;
}
.card h3{
  margin:0 0 12px;
  font-family:"Cinzel",serif;
  color:#ffe8a9;
  font-size:30px;
}

.kv{
  display:grid;
  grid-template-columns:140px 1fr;
  gap:8px;
  margin-bottom:7px;
}
.k{color:#d9e6ff;font-weight:700}
.v{color:#fff}

.prof-prime-balance{
  color:#ffe48d;
  font-weight:700;
  text-shadow:0 1px 0 #6f5718;
}
.prof-mileage-balance{
  color:#ffe48d;
  font-weight:700;
}

.email-status-cell{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  line-height:1.35;
}
.email-status-cell .btn{
  flex-shrink:0;
  font-size:12px;
  line-height:1.2;
  padding:2px 10px;
  border-radius:5px;
}
#verifyEmailBtn[hidden],
#verifyEmailBtn.is-hidden{
  display:none !important;
}

.msg{
  margin-top:10px;
  min-height:18px;
  font-size:13px;
}
.msg.ok{color:#87f3b2}
.msg.error{color:#ff9da0}

.btn-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:auto;
  padding-top:14px;
}
.btn-row .btn{
  font-size:18px;
  padding:8px 12px;
}
.btn{
  display:inline-block;
  text-decoration:none;
  border:1px solid #bda65a;
  border-radius:8px;
  background:linear-gradient(to bottom,#f8e8a7,#debe5a);
  color:#2f2208;
  font-family:"Cinzel",serif;
  font-size:24px;
  font-weight:800;
  padding:8px 16px;
  cursor:pointer;
}

.chars{
  list-style:none;
  margin:0;
  padding:0;
}
.chars li{
  border:1px solid rgba(255,255,255,.15);
  border-radius:8px;
  padding:10px 12px;
  margin-bottom:8px;
  background:rgba(255,255,255,.04);
  display:block;
}

.char-main{
  display:flex;
  align-items:center;
  gap:4px;
  flex-wrap:wrap;
}

.class-wrap{
  display:inline-flex;
  align-items:center;
  gap:6px;
}

.class-icon{
  width:26px;
  height:26px;
  display:inline-block;
  border-radius:3px;
  border:1px solid rgba(255,255,255,.25);
  background-image:url("./assets/class-icons.png");
  background-repeat:no-repeat;
  background-size:156px 208px;
  image-rendering:auto;
}

.prof-tabs{
  display:flex;
  justify-content:center;
  gap:10px;
  flex-wrap:wrap;
  margin:0 0 18px;
}
.prof-tab{
  font-family:"Cinzel",serif;
  font-size:17px;
  font-weight:700;
  letter-spacing:.5px;
  padding:10px 22px;
  border-radius:10px;
  border:2px solid rgba(200,169,90,.55);
  background:rgba(30,53,121,.55);
  color:#fff4d5;
  cursor:pointer;
}
.prof-tab:hover{color:var(--gold)}
.prof-tab.is-active{
  color:#2f2208;
  border-color:#c8a95a;
  background:linear-gradient(to bottom,#f8e8a7,#debe5a);
}
.prof-tab--disabled-feature,
.prof-panel--disabled-feature{
  display:none !important;
}
.prof-tab-panel{display:none;margin-top:4px;overflow:visible}
.prof-tab-panel.is-active{display:block;overflow:visible}

#profPanelClass .prof-class-card{
  width:100%;
  max-width:620px;
}
#profPanelClass.prof-tab-panel.is-active{
  display:flex;
  justify-content:center;
}
#profPanelRebirth .prof-class-card{
  width:100%;
  max-width:620px;
}
#profPanelRebirth.prof-tab-panel.is-active{
  display:flex;
  justify-content:center;
}
#profPanelExchange .prof-class-card{
  width:100%;
  max-width:620px;
}
#profPanelExchange.prof-tab-panel.is-active{
  display:flex;
  justify-content:center;
}
.prof-class-card{
  text-align:left;
}

/* Ensure "Change character class" block is centered inside Class change tab */
#profPanelClass .prof-class-card h3{
  text-align:center;
  width:100%;
}
#profPanelClass .prof-class-hint{
  text-align:center;
  width:100%;
}
#profPanelClass .prof-field{
  max-width:420px;
  margin-left:auto;
  margin-right:auto;
}
#profPanelClass .prof-class-actions{
  margin-top:8px;
  display:flex;
  justify-content:center;
}
#profPanelClass .prof-class-info{
  margin-left:auto;
  margin-right:auto;
  width:100%;
  max-width:560px;
}
#profPanelRebirth .prof-class-card h3{
  text-align:center;
  width:100%;
}
#profPanelRebirth .prof-class-hint{
  text-align:center;
  width:100%;
}
#profPanelRebirth #profRebirthStatus{
  text-align:center;
}
#profPanelRebirth .prof-field{
  max-width:420px;
  margin-left:auto;
  margin-right:auto;
}
#profPanelRebirth .prof-field-label{
  text-align:center;
}
#profPanelRebirth .prof-class-actions{
  margin-top:8px;
  display:flex;
  justify-content:center;
}
#profPanelRebirth .prof-class-info{
  margin-left:auto;
  margin-right:auto;
  width:100%;
  max-width:560px;
}

#profPanelExchange .prof-class-card h3{
  text-align:center;
  width:100%;
}
#profPanelExchange .prof-class-hint{
  text-align:center;
  width:100%;
}
#profPanelExchange .prof-field{
  max-width:420px;
  margin-left:auto;
  margin-right:auto;
}
#profPanelExchange .prof-class-actions{
  margin-top:8px;
  display:flex;
  justify-content:center;
}
#profPanelExchange .prof-class-info{
  margin-left:auto;
  margin-right:auto;
  width:100%;
  max-width:560px;
}
#profPanelClass #profClassOffersWrap,
#profPanelClass #profClassLegacyWrap{
  display:flex;
  flex-direction:column;
  align-items:center;
}
#profPanelClass #profClassOffersWrap[hidden],
#profPanelClass #profClassLegacyWrap[hidden]{
  display:none !important;
}
#profPanelClass #profClassOfferTargetSelectUI,
#profPanelClass #profClassNewSelectUI{
  margin:0 auto;
}

.prof-class-card{
  overflow:visible;
}
.prof-class-card h3{margin-top:0}
.prof-class-hint{
  margin:0 0 14px;
  color:#c8d8f6;
  font-size:14px;
  line-height:1.5;
  max-width:720px;
}
.prof-class-status{
  min-height:22px;
  margin-bottom:12px;
  font-size:14px;
}
.prof-class-status.is-ok{
  color:#b8ffd4;
  font-weight:700;
  font-size:16px;
  text-shadow:0 0 12px rgba(80,220,140,.35);
}
.prof-class-status.is-err{color:#ff9da0}

#profClassSvc.is-ok{
  color:#87f3b2;
  font-weight:700;
}
#profClassSvc.is-err{
  color:#ff9da0;
}

.prof-field{
  display:block;
  margin-bottom:14px;
  overflow:visible;
}
.prof-field-label{
  display:block;
  margin-bottom:6px;
  color:#d9e6ff;
  font-weight:700;
  font-size:14px;
}
.prof-select{
  width:100%;
  max-width:420px;
  padding:10px 12px;
  border-radius:8px;
  border:1px solid rgba(200,169,90,.45);
  background:rgba(10,18,44,.85);
  color:var(--text);
  font-size:15px;
}

.prof-select--hidden{ display:none; }

.prof-class-dd{
  width:100%;
  max-width:420px;
  border-radius:8px;
  border:1px solid rgba(200,169,90,.45);
  background:rgba(10,18,44,.85);
  position:relative;
  min-height:44px;
}

.prof-class-dd.is-disabled{
  opacity:.55;
  pointer-events:none;
}

.prof-class-dd__trigger{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  cursor:pointer;
  user-select:none;
}

.prof-class-dd__left{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.prof-class-dd__label{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.prof-class-dd__caret{
  width:10px;
  height:10px;
  border-right:2px solid rgba(241,215,126,.9);
  border-bottom:2px solid rgba(241,215,126,.9);
  transform:rotate(45deg);
  margin-top:-3px;
  flex-shrink:0;
}

.prof-class-dd__menu{
  position:absolute;
  left:-1px;
  right:-1px;
  top:auto;
  bottom:calc(100% - 2px);
  background:rgba(8,18,36,.98);
  border:1px solid rgba(200,169,90,.45);
  border-radius:8px;
  padding:8px;
  z-index:500;
  max-height:240px;
  overflow:auto;
  box-shadow:0 18px 40px rgba(0,0,0,.45);
}

.prof-class-dd__item{
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 10px;
  border-radius:7px;
  cursor:pointer;
  color:#fff;
}
.prof-class-dd__item:hover{ background:rgba(241,215,126,.14); }

.prof-class-dd__item.is-active{
  background:linear-gradient(to bottom,#f8e8a7,#debe5a);
  color:#2f2208;
  font-weight:800;
}

.prof-class-info{
  display:grid;
  grid-template-columns:minmax(140px,200px) 1fr;
  gap:8px 16px;
  margin:8px 0 16px;
  padding:12px;
  border-radius:8px;
  background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.12);
  max-width:560px;
}
.prof-class-actions{margin-top:8px}

/* Rebirth: keep item requirement tidy + aligned */
.prof-rebirth-req{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-width:0;
}
.prof-rebirth-item{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.prof-rebirth-item__icon{
  width:40px;
  height:40px;
  border-radius:8px;
  border:1px solid rgba(255,255,255,.22);
  background:rgba(255,255,255,.06);
  object-fit:cover;
  flex:0 0 auto;
}
.prof-rebirth-item__name{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.prof-rebirth-item__count{
  flex:0 0 auto;
  font-weight:800;
  color:#d9e6ff;
}
.prof-rebirth-item__count.is-ok{ color:#b8ffd4; }
.prof-rebirth-item__count.is-err{ color:#ffb7ba; }

.prof-offers-wrap{
  display:block;
  margin-bottom:14px;
}
.prof-offers-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:8px;
  max-width:420px;
}
.prof-offer-card{
  width:100%;
  text-align:left;
  border-radius:10px;
  border:1px solid rgba(200,169,90,.45);
  background:rgba(10,18,44,.72);
  padding:12px 14px;
  cursor:pointer;
  color:var(--text);
  font-size:15px;
  line-height:1.35;
  transition:border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.prof-offer-card:hover{
  border-color:rgba(241,215,126,.55);
  background:rgba(18,28,58,.88);
}
.prof-offer-card.is-selected{
  border-color:rgba(241,215,126,.9);
  box-shadow:0 0 0 1px rgba(241,215,126,.35);
  background:rgba(30,53,121,.55);
}
.prof-offer-card__title{
  display:block;
  font-weight:700;
  color:#ffe8a9;
  margin-bottom:4px;
}
.prof-offer-card__meta{
  display:block;
  font-size:13px;
  color:#c8d8f6;
}

@media (max-width:980px){
  .top-nav a{font-size:17px}
  .title{font-size:38px}
  .grid{grid-template-columns:1fr}
  .kv{grid-template-columns:110px 1fr}
}

