/*
  PokeMUD site theme - loaded after website.css (see website/base.html),
  so anything here overrides Evennia's stock look without needing to
  touch/copy that file. Bootstrap 4 itself is CDN-loaded and precompiled
  (no SCSS variables to hook into), so this reskins the specific classes
  the stock templates actually use rather than theming Bootstrap itself.
*/

@font-face {
  font-family: 'PokeMUDFont';
  src: url('font.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --pm-navy: #101a33;
  --pm-navy-mid: #16213e;
  --pm-navy-light: #1f2b4d;
  --pm-panel: #202f57;
  --pm-red: #e3350d;
  --pm-red-dark: #b8290a;
  --pm-gold: #ffcb05;
  --pm-gold-dark: #e0ab00;
  --pm-blue: #3d7dca;
  --pm-text: #eef2f8;
  --pm-text-dim: #a9b4c9;
}

html, body {
  background-color: var(--pm-navy);
  color: var(--pm-text);
  font-family: 'PokeMUDFont', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Sticky-footer math from website.css, kept in sync with the new footer height */
body {
  margin-bottom: 76px;
}

h1, h2, h3, h4, .card-title, .navbar-brand {
  font-family: 'PokeMUDFont', sans-serif;
  letter-spacing: .02em;
}

h1.card-title { font-size: 1.4rem; line-height: 1.6; }
h4.card-header { font-size: .95rem; }

/* Front page: bigger text throughout - the hero tagline, the sign-up
   nudge below the play button, and the "How it works" copy card. */
.homepage-hero h1 { font-size: 2.6rem; }
.homepage-hero .lead { font-size: 1.5rem; line-height: 1.6; }
.homepage-hero .homepage-subtext { font-size: 1.1rem; }
.homepage-copy { font-size: 1.15rem; line-height: 1.7; }
.homepage-copy h4.card-title { font-size: 1.3rem; }

a:link, a:visited { color: var(--pm-gold); }
a:hover, a:active { color: #fff; }

/* --- Nav & footer: Pokeball red-over-navy, gold trim ---------------- */

.navbar {
  background: linear-gradient(180deg, var(--pm-red) 0%, var(--pm-red-dark) 100%);
  border-bottom: 3px solid var(--pm-gold);
}

.navbar .nav-link, .navbar-brand, .navbar .media-body small {
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(0,0,0,.4);
}

.navbar .nav-link:hover { color: var(--pm-gold) !important; }

.footer {
  background: var(--pm-navy-mid);
  border-top: 3px solid var(--pm-gold);
  height: 56px;
  line-height: 56px;
}

.footer .text-white { color: var(--pm-text-dim) !important; }
.footer a.text-white { color: var(--pm-gold) !important; }

/* --- Cards / panels -------------------------------------------------- */

.card {
  background-color: var(--pm-panel);
  border: 1px solid rgba(255, 203, 5, .25);
  border-radius: .5rem;
  color: var(--pm-text);
}

.card-header {
  background-color: var(--pm-navy-light);
  border-bottom: 1px solid rgba(255, 203, 5, .25);
  color: var(--pm-gold);
}

.list-group-item {
  background-color: transparent;
  color: var(--pm-text);
  border-color: rgba(255, 203, 5, .15);
}

hr { border-top: 1px solid rgba(255, 203, 5, .25); }

/* --- Forms ------------------------------------------------------------ */

.form-control {
  background-color: var(--pm-navy);
  border: 1px solid rgba(255, 203, 5, .35);
  color: var(--pm-text);
}

.form-control:focus {
  background-color: var(--pm-navy);
  color: var(--pm-text);
  border-color: var(--pm-gold);
  box-shadow: 0 0 0 .2rem rgba(255, 203, 5, .25);
}

.form-control::placeholder { color: var(--pm-text-dim); }
label { color: var(--pm-text-dim); font-weight: 600; }
small.form-text { color: var(--pm-text-dim) !important; }

/* --- Buttons ------------------------------------------------------------ */

.btn-outline-secondary,
input.btn-outline-secondary[type="submit"] {
  background: linear-gradient(180deg, var(--pm-red) 0%, var(--pm-red-dark) 100%);
  border: 1px solid var(--pm-gold-dark);
  color: #fff;
  font-weight: 700;
}

.btn-outline-secondary:hover,
input.btn-outline-secondary[type="submit"]:hover {
  background: linear-gradient(180deg, var(--pm-red-dark) 0%, var(--pm-red) 100%);
  color: var(--pm-gold);
  border-color: var(--pm-gold);
}

.btn-link { color: #fff; }
.btn-link:hover { color: var(--pm-gold); text-decoration: none; }

a.playbutton {
  box-shadow: 0 2px 12px rgba(255, 203, 5, .35);
  background: linear-gradient(180deg, var(--pm-red) 0%, var(--pm-red-dark) 100%);
  border: 2px solid var(--pm-gold);
  border-radius: 999px;
  font-family: 'PokeMUDFont', sans-serif;
  font-size: .85rem;
  padding: .9rem 1.8rem;
  text-shadow: none;
}
a.playbutton:hover {
  background: linear-gradient(180deg, var(--pm-red-dark) 0%, var(--pm-red) 100%);
  color: var(--pm-gold);
}

/* --- Alerts ------------------------------------------------------------ */

.alert-danger {
  background-color: rgba(227, 53, 13, .18);
  border-color: var(--pm-red);
  color: #ffb4a4;
}
.alert-info {
  background-color: rgba(61, 125, 202, .18);
  border-color: var(--pm-blue);
  color: #bcdcff;
}

/* --- A little Pokeball motif for the hero section, no image assets --- */

.pm-pokeball {
  display: inline-block;
  width: 1.4em;
  height: 1.4em;
  vertical-align: -.2em;
  border-radius: 50%;
  background:
    linear-gradient(var(--pm-red) 0 48%, #111 48% 52%, #fff 52% 100%);
  border: 2px solid #111;
  position: relative;
}
.pm-pokeball::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: .45em; height: .45em;
  background: #fff;
  border: 2px solid #111;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

/* --- Trainer card ------------------------------------------------------ */

.trainer-card {
  background: linear-gradient(160deg, var(--pm-navy-light) 0%, var(--pm-panel) 100%);
  border-radius: .75rem;
  border: 3px solid var(--tc-color, var(--pm-gold));
  box-shadow: 0 4px 24px rgba(0,0,0,.4);
  padding: 1.5rem;
}

.trainer-card .trainer-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 2px solid var(--tc-color, var(--pm-gold));
  padding-bottom: .5rem;
  margin-bottom: 1rem;
}

.trainer-card .trainer-card-header h2 {
  color: var(--tc-color, var(--pm-gold));
  margin: 0;
}

.trainer-card .party-mon {
  display: flex;
  justify-content: space-between;
  background: rgba(0,0,0,.2);
  border-radius: .4rem;
  padding: .5rem .8rem;
  margin-bottom: .4rem;
}

.trainer-card .party-mon.fainted { opacity: .55; }

.trainer-card .badge-ok { color: #6fd66f; }
.trainer-card .badge-fainted { color: #ff8a80; }
