body {
  --bg-color: #1a1a1a;
  --border-color: #000;
  --content-bg-color: #666666;
  --text-color: #f3f3e3;
  --link-color: #ff8080;
  --link-hover-color: rgba(0, 0, 0, 0.05);
  --unavailable-bg-color: rgba(0, 0, 0, 0.1);
  --unavailable-color: #999;
  --tab-bg-color: #595959;
  --tab-color: #4d4d4d;
  --tab-hover-color: #333333;
  --card-border-color: #ccc; 
  --card-bg-color: #ddd; 
  font-family: "Minion Pro", Georgia, serif;
  background-color: var(--bg-color);
  margin: 0 auto;
  padding: 0;
  line-height: 155%;
  overflow-y: scroll;
}
body.dark-mode {
  --bg-color: #000;
  --border-color: #fff;
  --content-bg-color: #242424;
  --text-color: #fff;
  --link-color: #ff8080;
  --link-hover-color: rgba(100, 100, 100, 0.1);
  --tab-bg-color: #555555;
  --tab-color: #505050;
  --tab-hover-color: #242424;
  --card-border-color: #4c4c4c;
  --card-bg-color: #3f3f3f;
}
body.dark-mode #content {
  border-style: double;
  border-width: 4px;
  border-color: #888;
  margin-top: 0; 
}
body.dark-mode .tools {
  border-style: double;
  border-width: 4px;
  border-color: #888;
}
header, #content, footer {
  color: var(--text-color);
  max-width: 540px;
  margin: 0 auto;
  overflow: auto;
  box-sizing: border-box;
}
#content {
  position: relative;
  background-color: var(--content-bg-color);
  font-size: 1.1em;
  padding: 1.5em; 
  padding-top: 1.5em;
  box-shadow: 2px 2px 12px rgba(0, 0, 0, 0.2);
  margin-top: 0;
}
footer {
  margin-top: 1em;
  font-size: 0.8em;
  position: relative;
}
footer a {
  padding-right: 1em;
}
header {
  text-align: center;
  padding: 0;
  margin-bottom: 0;
  background-color: var(--tab-bg-color);
}

#news_wrapper {
  position: absolute;
  right: 0.4em;
  width: 14rem;
  color: var(--text-color);
  background-color: var(--content-bg-color);
  box-shadow: 2px 2px 12px rgba(0, 0, 0, 0.2);
}

#news_content {
  padding: 0.6em;
  font-size: 0.95em;
  line-height: 1.4;
}

#header-links {
  text-align: center;
  display: inline-block;
  margin-bottom: 0;
  padding: 0;
  background-color: var(--tab-bg-color);
  width: 100%;
  box-sizing: border-box;
}

#header-links a {
  cursor: default;
  padding: 5.5px;
  margin: 0;
  background-color: var(--tab-color);
  color: var(--text-color);
  font-family: "Minion Pro", Georgia, serif;
  border: none;
  outline: none;
  display: inline-block;
  transition: background-color 0.3s ease;
}

#header-links a:hover {
  cursor: default;
  background-color: var(--tab-hover-color);
}

#header-links a.active {
  background-color: var(--content-bg-color);
}

header h1, header h2 {
  display: inline-block;
  font-weight: normal;
  margin: 0;
  font-size: 1em;
}
header h1 {
  font-weight: bold;
}
header h2:before {
  content: "by";
  font-style: italic;
  padding: 0 0.3em 0 0;
}

#content #read-marker {
  border: none;
  border-top: 1px solid var(--border-color);
  height: 1px;
  width: 20%;
  clear: left;
}
#content h1:first-child {
  margin-top: 0.5em;
}
#content h1 {
  margin: 2em 0 1em 0;
  font-size: 1.35em;
  font-weight: normal;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-shadow: rgba(255, 255, 255, 0.75) 2px 2px 2px,
               rgba(0, 0, 0, 0.1) -1px -1px 2px;
}
a {
  color: var(--link-color);
  text-decoration: none;
}
p {
  margin: 0;
  margin-bottom: 1em;
  text-indent: 1em;
}
p.game-over {
  border: 2px solid #bbb;
  padding: 0.5em;
  margin: 0.5em 0 0 0;
  border-radius: 4px;
  color: #999;
}
ul.choices {
  border: 2px solid #876;
  padding: 0;
  margin: 0.25em 0 0 0;
  list-style-type: none;
  border-radius: 4px;
  clear: left;
}
ul.choices li {
  border-bottom: 1px solid #876;
  padding: 0.5em;
}
ul.choices li div.subtitle {
  margin-left: 2em;
  font-style: italic;
}
ul.choices li.unavailable {
  color: var(--unavailable-color);
  background-color: var(--unavailable-bg-color) !important;
  cursor: default !important;
}
ul.choices li:hover {
  background-color: var(--link-hover-color);
  cursor: default;
}
ul.choices li:last-child {
  border-bottom: none;
}
ul.choices a {
  text-decoration: none;
}
blockquote {
  margin: 1em 2em;
}
blockquote.attribution {
  margin-left: 4em;
}
blockquote + blockquote.attribution {
  margin-top: -1em;
}

#mid_panel {
  margin: 0 16rem 0 16rem; 
}

#page {
  margin: 0 auto;
  position: relative;
}
#tools_wrapper {
  position: absolute;
  width: 100%;
  max-width: 69em;
  left: 0;
  right: 0;
  margin: 0 auto;
}
.tools {
  padding: 0.6em;
  width: 14rem;
  color: var(--text-color);
  background-color: var(--content-bg-color);
  box-shadow: 2px 2px 12px rgba(0, 0, 0, 0.2);
}
.tools.left {
  float: left;
  left: 0.4em;
}
.tools.right {
  float: right;
  right: 0.4em;
}
#qualities {
  text-indent: 0;
  line-height: 1.3em;
}
#qualities p {
  text-indent: 0;
}
#qualities h1 {
  font-size: 1.1em;
  font-weight: normal;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-shadow: rgba(255, 255, 255, 0.75) 2px 2px 2px,
               rgba(0, 0, 0, 0.1) -1px -1px 2px;
}
#qualities h1 + p:first-line {
  font-weight: normal;
}


/* tabs */
.tab_container {
    background-color: var(--tab-bg-color);
    margin-top: -0.6em;
    margin-left: -0.6em;
    margin-right: -0.6em;
}
.tab_button {
    cursor: default; 
    font-family: "Minion Pro", Georgia, serif;
    background-color: var(--tab-color);
    color: var(--text-color);
    border: none;
    outline: none;
    padding: 10px;
}
.tab_button.active {
    cursor: default;
    background-color: var(--content-bg-color);
}
.tab_button:hover {
    cursor: default;
    background-color: var(--tab-hover-color);
}


.overlay {
    background: rgba(0,0,0,0.7);
    display: none;
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    overflow: scroll;
}
.overlay_top {
    position: relative;
    max-width: 540px;
    margin: 100px auto;
    background: rgba(50,50,50,0.7);
    border: 2px solid;
    color: white;
}
.save_info {
    min-width: 10em;
}
.background {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: var(--bg-color);
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
    overflow: hidden;
}
/*
 * This is used for overlaying transparencies
 * only transition on fade-in
 * */
#bg2 {
    z-index: -100;
}
#bg1 {
    z-index: -99;
}
.b {
}
.save_button {
}
.delete_button {
}

/*
 * Card stuff for dendrynexus
 * 
 */

ul.decks, ul.hand, ul.pinned-cards {
  list-style: none;
  padding-left: 0;
}

.hand {

}

.pinned-cards {

}

.deck {

}

a.card {
  display: inline-block;
  width: 120px;
  height: 150px;
  box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2);
  border: 10px solid var(--card-border-color);
  margin-bottom: 0.5em;
  position: relative;
}
a.card:hover {
  box-shadow: 10px 10px 10px rgba(0, 0, 0, 0.2);
  left: -5px;
  top: -5px;
}
div.blank-card {
  display: inline-block;
  width: 120px;
  height: 150px;
  background-color: var(--card-bg-color);
  border: 10px solid var(--card-border-color);
  margin-bottom: 0.5em;
}

.card-in-hand, .pinned-card, .deck {
  display: inline-block;
  position: relative;
  max-width: 120px;
  margin-right: 1em;
  vertical-align: top;
}

/* TODO: unavailable card */
.unavailable-card {
  color: var(--unavailable-color);
  background-color: var(--unavailable-bg-color) !important;
  cursor: default !important;
}

.card-caption {
  text-align: center;
  display: block;
  font-size: 1em;
}

.card-tooltip {
  position: absolute;
  visibility: hidden;
  width: 150px;
  max-width: 200px;
  font-size: 0.9em;
  z-index: 2;
  padding: 0.2em;
  border: 1px solid var(--border-color);
  background-color: var(--content-bg-color);
  left: 105%;
}

.card-img {
  height: 150px;
  width: 120px;
  object-fit: cover;
}

a.card:focus .card-tooltip, a.card:hover .card-tooltip {
  visibility: visible;
  position: absolute;
}

/* Unlike cards, face images can have different sizes. */
.face-figure {
  display: block;             /* was inline-block */
  width: 100%;                /* full width of the parent (likely #content) */
  border: 5px solid var(--card-border-color);
  margin-bottom: 0.5em;
  overflow: hidden;
}

.face-img {
  width: 100%;               /* Fill the width of the .face-figure container */
  height: auto;              /* Maintain aspect ratio */
  object-fit: contain;       /* Prevent cropping */
  display: block;
}



/*
 * sprite stuff- feel free to comment out/remove if not using
 */
img {
    max-width: 100%;
    max-height: 100%;
}
#contentSpriteContainer {
  position: fixed;
  width: 100%;
  height: 100%;
  max-width: 62em;
  left: 0;
  right: 0;
  margin: 0 auto;
  z-index: -97;
}
.sprite {
    position: absolute;
    width: 180px;
}
#topLeftSprite {
    float: left;
    top: -1em;
    left: 0.4em;
}
#topRightSprite {
    float: right;
    top: -1em;
    right: 0.4em;
}
#bottomLeftSprite {
    float: left;
    left: 0.4em;
    top: 50%;
}
#bottomRightSprite {
    float: right;
    right: 0.4em;
    top: 50%;
}

/* smaller screens: hide left margin */
@media screen and (max-width: 1200px) {
  .tools {
      margin-right: 0.4em;
      margin-left: 0.4em;
  }
  #mid_panel {
    margin-right: 16rem;
  }
  #news_wrapper {
    position: static;
    float: none;
    width: 90%;
    margin: 0.4em auto;
  }
}

@media screen and (max-width: 900px) {
  #mid_panel {
    margin: 0 0.4em;
  }
  
  .tools.left,
  .tools.right,
  #news_wrapper {
    position: static;
    float: none;
    width: 90%;
    margin: 0.4em auto;
  }
}

/* mobile: move the stat box to the top if the screen is too small,
 * and reduce font size slightly. */
@media screen and (max-width: 560px) {
  #page {
      position: static;
  }
  #content {
      position: static;
      font-size: 1em;
      line-height: 160%;
      padding: 1em 1em 1.5em 1em;
  }
  #qualities {
      font-size: 1em;
  }
  #tools_wrapper {
    position: static;
  }
  .tools {
      width: 90%;
      margin: 2em 0 1em 0;
      margin: 0.4em;
  }
  .tools.left {
      float: none;
      left: 0;
  }
  .tools.right {
      float: none;
      right: 0;
  }
  #mid_panel {
      margin: 0 auto;
  }

  /* cards are smaller on mobile */
  .card-img {
    height: 125px;
    width: 100px;
  }
  a.card {
    width: 100px;
    height: 125px;
    border: 8px solid var(--card-border-color);
    margin-bottom: 0.5em;
    position: relative;
  }
  div.blank-card {
    width: 100px;
    height: 125px;
    border: 8px solid var(--card-border-color);
    margin-bottom: 0.5em;
  }
  .card-in-hand, .pinned-card, .deck {
    max-width: 120px;
    margin-right: 1em;
    vertical-align: top;
  }
}

#global_news_tab {
    background-color: var(--content-bg-color) !important; 
    cursor: default !important;
}

body.dark-mode #global_news_tab {
    background-color: var(--content-bg-color) !important;
}


/* New stuff just for this game */

/* colored box div */
.box {
  display: inline-block;
  height: 1em;
  width: 1em;
}

table {
    border-spacing: 0.5em;
}

/* Styles for parties */
.seat.IRSP {
    fill: #FF7F7F;
    stroke: var(--border-color);
    stroke-width: 1.5px;
}
.seat.Provisionals {
    fill: #008000;
}
.seat.ILs {
    fill: #eae374;
}
.seat.UP_NI {
    fill: #ffcc66;
}
.seat.Officials {
    fill: #CC3333;
}
.seat.IRs {
    fill: #90bc7c;
}
.seat.SDLP {
    fill: #98FB98;
}
.seat.alliance {
    fill: #FFFF00;
}
.seat.NILP {
    fill: #FFC0CB;
}
.seat.UUP {
    fill: #C17E5A;
}
.seat.DUP {
    fill: #FFA500;
}
.seat.Vanguard {
    fill: #FFD580;
}
.seat.FF {
    fill: #009E58;
}
.seat.FG {
    fill: #18eaed;
}
.seat.Labour {
    fill: #cc0000;
}
.seat.INDs {
    fill: #999999;
}


.tooltip-text {
    text-decoration: underline;
    text-decoration-style: dotted;
}
