/* ============================================================
   COMODO PARTY WIKI - OCEAN TIDE THEME
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Nunito:wght@400;500;600;700&display=swap');

/* ============================================================
   THEME VARIABLES
   ============================================================ */

/* Light Theme - Warm Coastal Day */
:root {
  --md-default-bg-color: #f5f0e8;
  --md-default-fg-color: #1a2e3b;

  --md-primary-fg-color: #0e4d6e;
  --md-primary-bg-color: #ffffff;

  --md-accent-fg-color: #e07b4a;
  --md-typeset-a-color: #1366a0;

  --md-default-fg-color--light: #5a7a8a;
  --md-default-fg-color--lighter: #a0bfcc;

  --cp-sand: #f5f0e8;
  --cp-sand-border: #d4c9a8;
  --cp-ocean-deep: #0e4d6e;
  --cp-ocean-mid: #1a7ca8;
  --cp-ocean-light: #4faed4;
  --cp-coral: #e07b4a;
  --cp-seafoam: #4db8a0;
  --cp-wave: #c8e8f5;
  --cp-text: #1a2e3b;
  --cp-text-muted: #4a6070;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
.md-typeset h1,
.md-typeset h2,
.md-typeset h3 {
  font-family: 'Cinzel', Georgia, serif;
  letter-spacing: 0.02em;
}

.md-typeset,
.md-nav,
.md-search__input {
  font-family: 'Nunito', sans-serif;
}

/* ============================================================
   HEADER - BASE & LIGHT MODE
   ============================================================ */
.md-header {
  background: linear-gradient(135deg, #0a3a55 0%, #0e4d6e 40%, #1a7ca8 100%);
  border-bottom: 2px solid #e07b4a;
}

/* Light mode header override */
[data-md-color-scheme="default"] .md-header {
  background: linear-gradient(90deg, #1f7fa8, #3fa9c9) !important;
  border-bottom: 2px solid #e07b4a !important;
}

.md-header__title {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* ============================================================
   HEADER LAYOUT
   ============================================================ */
.md-header__inner {
  justify-content: space-between !important;
  gap: 8px;
  align-items: center;
}

/* Title on the left */
.md-header__title {
  flex: 1 1 auto;
  margin-right: auto;
  display: flex;
  align-items: center;
  min-width: 0;
  font-size: 1.1rem;
}

/* Desktop */
@media (min-width: 960px) {
  .md-header .md-search {
    margin-left: auto !important;
    order: 3;
  }

  .md-header .md-icon[for="__palette"] {
    order: 2;
    margin-right: 10px !important;
    margin-left: 4px;
  }

  .md-header .md-search__form {
    width: 270px;
  }
}

/* Mobile */
@media (max-width: 959px) {
  .md-header__inner {
    padding: 0 8px !important;
    gap: 4px !important;
  }

  .md-header__title {
    font-size: 0.98rem !important;
    letter-spacing: normal !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    flex-shrink: 2 !important;
    padding-right: 8px !important;
  }

  .md-header .md-search__form {
    width: 130px !important;
  }

  .md-header .md-icon[for="__palette"] {
    margin-right: 4px !important;
  }

  .md-header__button:first-child {
    display: none !important;
  }
}

@media (max-width: 420px) {
  .md-header__title {
    font-size: 0.93rem !important;
  }
  .md-header .md-search__form {
    width: 105px !important;
  }
}

/* Hide repo button */
.md-header__source {
  display: none;
}

/* Light mode header text colors */
[data-md-color-scheme="default"] .md-header__title,
[data-md-color-scheme="default"] .md-header__title *,
[data-md-color-scheme="default"] .md-header__button,
[data-md-color-scheme="default"] .md-header__button svg {
  color: #ffffff !important;
  fill: #ffffff !important;
}

/* ============================================================
   SEARCH STYLING
   ============================================================ */

/* Light Mode */
[data-md-color-scheme="default"] .md-header .md-search__form,
:root .md-header .md-search__form {
  background: #ddf0fb !important;
  border: 1px solid #a8d8ef !important;
  border-radius: 8px !important;
  box-shadow: 0 1px 6px rgba(14, 77, 110, 0.15) !important;
}

[data-md-color-scheme="default"] .md-header .md-search__input,
:root .md-header .md-search__input {
  background: #ddf0fb !important;
  color: #1a2e3b !important;
  -webkit-text-fill-color: #1a2e3b !important;
  caret-color: #e07b4a !important;
}

[data-md-color-scheme="default"] .md-header .md-search__input::placeholder,
:root .md-header .md-search__input::placeholder {
  color: #4a6070 !important;
  opacity: 1 !important;
}

[data-md-color-scheme="default"] .md-header .md-search__icon,
[data-md-color-scheme="default"] .md-header .md-search__icon svg {
  color: #0e4d6e !important;
  fill: #0e4d6e !important;
}

[data-md-color-scheme="default"] .md-header .md-search__form:focus-within {
  background: #eef6fc !important;
  border-color: #e07b4a !important;
  box-shadow: 0 0 0 3px rgba(224, 123, 74, 0.25), 0 1px 6px rgba(14, 77, 110, 0.15) !important;
}

[data-md-color-scheme="default"] .md-header .md-search__kbd {
  background: #ddf0fb !important;
  color: #1a2e3b !important;
  border: 1px solid #a8d8ef !important;
}

/* Dark Mode */
[data-md-color-scheme="slate"] .md-header .md-search__form {
  background: #0a2535 !important;
  border: 1px solid #1e3545 !important;
  border-radius: 8px !important;
}

[data-md-color-scheme="slate"] .md-header .md-search__input {
  background: #0a2535 !important;
  color: #cce8f4 !important;
  -webkit-text-fill-color: #cce8f4 !important;
  caret-color: #f09060 !important;
}

[data-md-color-scheme="slate"] .md-header .md-search__input::placeholder {
  color: #6a9ab0 !important;
}

[data-md-color-scheme="slate"] .md-header .md-search__icon,
[data-md-color-scheme="slate"] .md-header .md-search__icon svg {
  color: #4faed4 !important;
  fill: #4faed4 !important;
}

[data-md-color-scheme="slate"] .md-header .md-search__kbd {
  background: #1e3545 !important;
  color: #cce8f4 !important;
  border: 1px solid #2e4f60 !important;
}

/* ============================================================
   MAIN BACKGROUND & SIDEBAR
   ============================================================ */
.md-main,
.md-content {
  background: var(--cp-sand);
}

.md-content__inner {
  background-image:
    radial-gradient(ellipse at 80% 20%, rgba(224, 123, 74, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse at 20% 80%, rgba(14, 77, 110, 0.04) 0%, transparent 60%);
}

.md-sidebar__scrollwrap {
  border-right: 1px solid var(--cp-sand-border);
}

.md-nav__title {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--cp-ocean-deep);
  text-transform: uppercase;
}

.md-nav__link--active,
.md-nav__link:is(:focus, :hover) {
  color: var(--cp-coral) !important;
}

/* ============================================================
   CONTENT STYLING (Typeset, Links, HR, Blockquote, Images)
   ============================================================ */
.md-typeset {
  color: var(--cp-text);
}

.md-typeset a {
  color: var(--cp-ocean-mid);
  text-decoration: none;
  border-bottom: 1px dotted rgba(26, 124, 168, 0.4);
  transition: color 0.2s, border-color 0.2s;
}

.md-typeset a:hover {
  color: var(--cp-coral);
  border-bottom-color: var(--cp-coral);
}

.md-typeset hr {
  border: none;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cp-ocean-light), transparent);
  margin: 2rem 0;
}

.md-typeset blockquote {
  border-left: 3px solid var(--cp-coral);
  background: rgba(224, 123, 74, 0.06);
  color: var(--cp-text-muted);
  border-radius: 0 4px 4px 0;
}

.md-typeset img {
  border-radius: 6px;
  box-shadow: 0 2px 12px rgba(10, 58, 85, 0.12);
  image-rendering: -webkit-optimize-contrast; /* Safari */
  image-rendering: crisp-edges;
}

/* ============================================================
   HOME PAGE - BANNERS, PANELS & GRID
   ============================================================ */

/* Banner Grid */
.home-banners {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 1.5rem 0 2.5rem;
}

.home-banners p {
  display: contents;
}

.home-banners a {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  display: block;
  box-shadow: 0 3px 10px rgba(10, 58, 85, 0.18);
}

.home-banners a img {
  width: 100%;
  border-radius: 8px;
  display: block;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.home-banners a::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 30%,
    rgba(255, 255, 255, 0.18) 50%,
    transparent 70%
  );
  transform: translateX(-100%);
  transition: transform 0.5s ease;
  border-radius: 8px;
}

.home-banners a:hover img {
  transform: scale(1.04);
  filter: brightness(1.05);
}

.home-banners a:hover::after {
  transform: translateX(100%);
}

/* Top Panels & News Layout */
.top-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 0 2rem;
}

.wiki-panel {
  border: 1px solid var(--cp-sand-border);
  background: linear-gradient(160deg, #ffffff 0%, #f9f5ec 100%);
  border-radius: 10px;
  overflow: hidden;
  padding: 0;
  min-height: 260px;
  box-shadow:
    0 4px 16px rgba(10, 58, 85, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  position: relative;
}

.wiki-panel::before {
  content: '~~~~~';
  position: absolute;
  bottom: 10px;
  right: 10px;
  font-size: 2rem;
  color: rgba(14, 77, 110, 0.06);
  letter-spacing: -4px;
  pointer-events: none;
  user-select: none;
}

.wiki-panel-body {
  padding: 18px 20px 16px;
}

.wiki-panel h2 {
  margin: 0;
  padding: 12px 20px;
  background: linear-gradient(90deg, #2fa4d6, #6fd3f5);
  color: #ffffff;
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 2px solid var(--cp-coral);
}

.wiki-panel h2::before {
  content: '* ';
  color: var(--cp-coral);
  font-size: 10px;
}

.news-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 24px;
  align-items: start;
  padding: 18px 20px 16px;
}

.news-layout h3 {
  margin-top: 0;
  color: var(--cp-ocean-deep);
  font-family: 'Cinzel', serif;
  font-size: 1rem;
}

.news-layout img {
  width: 260px;
  height: 315px;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(10, 58, 85, 0.15);
}

/* Home Grid & Sections */
.home-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-top: 0.5rem;
}

.home-section {
  border: 1px solid var(--cp-sand-border);
  background: linear-gradient(160deg, #ffffff 0%, #f9f5ec 100%);
  border-radius: 10px;
  overflow: hidden;
  min-height: 360px;
  padding-bottom: 12px;
  box-shadow:
    0 3px 12px rgba(10, 58, 85, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border-top: 3px solid var(--cp-seafoam);
  position: relative;
}

.home-section:hover {
  transform: translateY(-3px);
  box-shadow:
    0 8px 24px rgba(10, 58, 85, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.home-section h2 {
  margin: 0;
  padding: 11px 14px;
  background: linear-gradient(90deg, #2a8db3, #4fb5d6);
  color: #ffffff;
  font-family: 'Cinzel', serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 2px solid #e07b4a;
}

.home-section a {
  display: block;
  padding: 3px 14px;
  color: var(--cp-ocean-mid);
  font-size: 13.5px;
  font-family: 'Nunito', sans-serif;
  font-weight: 500;
  line-height: 1.5;
  border-left: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s, padding-left 0.15s;
}

.home-section a:hover {
  color: var(--cp-coral);
  border-left-color: var(--cp-coral);
  padding-left: 18px;
  border-bottom: none;
}

.home-section h2 + a {
  margin-top: 12px;
}

/* CSS Tabs */
.fake-tabs input {
  display: none;
}

.tab-labels {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--cp-wave);
  margin: 0 20px 0;
}

.tab-labels label {
  cursor: pointer;
  padding: 10px 18px;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cp-text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
}

#tab-episode:checked ~ .tab-labels label[for="tab-episode"],
#tab-event:checked ~ .tab-labels label[for="tab-event"] {
  color: var(--cp-coral);
  border-bottom: 2px solid var(--cp-coral);
}

.tab-content {
  display: none;
}

#tab-episode:checked ~ .episode-content {
  display: block;
}

#tab-event:checked ~ .event-content {
  display: block;
}

/* ============================================================
   DARK THEME - DEEP OCEAN NIGHT
   ============================================================ */
[data-md-color-scheme="slate"] {
  --md-default-bg-color: #0d1b24;
  --md-default-fg-color: #cce8f4;

  --md-primary-fg-color: #4faed4;
  --md-typeset-a-color: #4faed4;

  --md-default-fg-color--light: #6a9ab0;
  --md-default-fg-color--lighter: #2e4f60;

  --cp-sand: #0d1b24;
  --cp-sand-border: #1e3545;
  --cp-ocean-deep: #0a2535;
  --cp-ocean-mid: #4faed4;
  --cp-coral: #f09060;
  --cp-seafoam: #3dcfb0;
  --cp-text: #cce8f4;
  --cp-text-muted: #6a9ab0;
  --cp-wave: #1e3545;
}

[data-md-color-scheme="slate"] .md-header {
  background: linear-gradient(135deg, #05111a 0%, #0a2535 60%, #0d3347 100%);
  border-bottom: 2px solid var(--cp-coral);
}

[data-md-color-scheme="slate"] .md-main,
[data-md-color-scheme="slate"] .md-content {
  background: #0d1b24;
}

[data-md-color-scheme="slate"] .md-content__inner {
  background-image:
    radial-gradient(ellipse at 80% 20%, rgba(240, 144, 96, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse at 20% 80%, rgba(79, 174, 212, 0.04) 0%, transparent 60%);
}

[data-md-color-scheme="slate"] .md-typeset {
  color: #cce8f4;
}

[data-md-color-scheme="slate"] .md-typeset a {
  color: #4faed4;
  border-bottom-color: rgba(79, 174, 212, 0.3);
}

[data-md-color-scheme="slate"] .md-typeset a:hover {
  color: #f09060;
  border-bottom-color: #f09060;
}

[data-md-color-scheme="slate"] .md-typeset hr {
  background: linear-gradient(90deg, transparent, #4faed4, transparent);
}

[data-md-color-scheme="slate"] .md-typeset blockquote {
  border-left-color: #f09060;
  background: rgba(240, 144, 96, 0.06);
  color: #6a9ab0;
}

[data-md-color-scheme="slate"] .wiki-panel,
[data-md-color-scheme="slate"] .home-section {
  border-color: #1e3545;
  background: linear-gradient(160deg, #111f2b 0%, #0d1b24 100%);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

[data-md-color-scheme="slate"] .wiki-panel h2,
[data-md-color-scheme="slate"] .home-section h2 {
  background: linear-gradient(90deg, #051017, #0a2535);
  color: #cce8f4;
  border-bottom-color: #f09060;
}

[data-md-color-scheme="slate"] .home-section:hover {
  background: linear-gradient(160deg, #142433 0%, #0f1e28 100%);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
}

/* ============================================================
   JOB SYSTEM
   ============================================================ */
.job-info-card {
  float: right;
  width: 300px;
  margin: -18px 0 18px 24px;
}

.job-info-card table {
  width: 100%;
  border-collapse: collapse;
  background: #f7f7f7;
  font-size: 11px;
  line-height: 1.2;
}

.job-info-card th {
  background: #efe8a0;
  text-align: center;
  padding: 5px;
  border: 1px solid #cfcfcf;
}

.job-info-card td {
  border: 1px solid #cfcfcf;
  padding: 4px 6px;
  vertical-align: middle;
  background: #fafafa;
}

.job-info-card td:first-child {
  width: 52%;
  font-weight: 700;
  white-space: nowrap;
}

.job-image {
  text-align: center !important;
  background: #ececec !important;
  padding: 10px !important;
}

.job-image img {
  display: inline-block;
  max-width: 105px;
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  image-rendering: pixelated;
}

.job-bonus {
  padding: 0 !important;
  background: #fafafa !important;
}

.job-bonus-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  font-size: 11px;
  text-align: center;
}

.job-bonus-grid span {
  padding: 8px 2px;
  border-right: 1px solid #d8d8d8;
  border-bottom: 1px solid #d8d8d8;
  background: #ffffff;
  line-height: 1.2;
  font-weight: 600;
}

.job-bonus-grid span:nth-child(3),
.job-bonus-grid span:nth-child(6) {
  border-right: none;
}

.job-bonus-grid span:nth-child(n+4) {
  border-bottom: none;
}

.job-info-card tr:first-child th,
.job-info-card tr:nth-last-child(2) th {
  text-align: center !important;
}

/* Job System - Dark Mode */
[data-md-color-scheme="slate"] .job-info-card table {
  background: #10202b;
  color: #d7e7f2;
}

[data-md-color-scheme="slate"] .job-info-card th {
  background: #8f8650;
  border-color: #4a5a66;
  color: #ffffff;
}

[data-md-color-scheme="slate"] .job-info-card td {
  background: #1a2a36;
  border-color: #4a5a66;
  color: #d7e7f2;
}

[data-md-color-scheme="slate"] .job-image {
  background: #22313d !important;
}

[data-md-color-scheme="slate"] .job-bonus-grid span {
  background: #1f2d38;
  border-color: #4a5a66;
  color: #e6f4ff;
}

/* ============================================================
   SKILL SYSTEM
   ============================================================ */
.skill-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}

.skill-table th {
  background: #d9dde3;
  border: 1px solid #888;
  padding: 7px 6px;
  text-align: center;
  vertical-align: middle;
  font-weight: 700;
}

.skill-table .col-level,
.skill-table .col-type,
.skill-table .col-quest {
  white-space: nowrap;
}

.skill-table td {
  border: 1px solid #888;
  padding: 8px;
  vertical-align: middle;
}

.skill-table .col-skill {
  width: 18%;
}

.skill-table .col-desc {
  width: 42%;
}

.skill-table .col-level {
  width: 7%;
}

.skill-table .col-type {
  width: 11%;
}

.skill-table .col-req {
  width: 14%;
  text-align: center;
}

.skill-table .col-quest {
  width: 8%;
}

.md-typeset img:not(.skill-entry img) {
  border-radius: 6px;
  box-shadow: 0 2px 12px rgba(10, 58, 85, 0.12);
  image-rendering: crisp-edges;
}

.skill-table .skill-entry img {
  border-radius: 0 !important;
}

.skill-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: normal;
}

.skill-entry a {
  overflow-wrap: anywhere;
}

.skill-entry img {
width: 24px;
  height: 24px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  box-shadow: none;
  flex-shrink: 0;
  border-radius: 2px !important;
  background: transparent;
}

/* Skill Type Colors - Light */
.skill-offensive {
  background: #f4cccc;
  text-align: center;
  font-weight: 700;
}

.skill-supportive {
  background: #bfe6a8;
  text-align: center;
  font-weight: 700;
}

.skill-passive {
  background: #cfeff3;
  text-align: center;
  font-weight: 700;
}

.skill-utility {
  background: #dbdeff;
  text-align: center;
  font-weight: 700;
}

.skill-life {
  background: #fce5cd;
  text-align: center;
  font-weight: 700;
}

/* Skill System - Dark Mode */
[data-md-color-scheme="slate"] .skill-table th {
  background: #22313d;
  border: 1px solid #4a5a66;
  color: #e6f4ff !important;
}

[data-md-color-scheme="slate"] .skill-table td {
  border: 1px solid #4a5a66;
  color: #d7e7f2;
}

[data-md-color-scheme="slate"] .skill-table td:not(.skill-offensive):not(.skill-supportive):not(.skill-passive):not(.skill-utility):not(.skill-life) {
  background: #10202b;
}

[data-md-color-scheme="slate"] .skill-offensive {
  background: #7a4444;
  color: #fff1f1;
}

[data-md-color-scheme="slate"] .skill-supportive {
  background: #5d7f49;
  color: #f4fff0;
}

[data-md-color-scheme="slate"] .skill-passive {
  background: #4b7480;
  color: #f2fdff;
}

[data-md-color-scheme="slate"] .skill-utility {
  background: #5a5f94;
  color: #f4f3ff;
}

[data-md-color-scheme="slate"] .skill-life {
  background: #8a6846;
  color: #fff6ea;
}

/* ============================================================
   ASPD CALCULATOR
   ============================================================ */
.aspd-calc {
  border: 1px solid var(--cp-sand-border);
  background: rgba(255, 255, 255, 0.45);
  padding: 16px;
  max-width: 520px;
}

.aspd-calc h3 {
  margin-top: 0;
}

.aspd-grid {
  display: grid;
  grid-template-columns: 1fr 110px 110px;
  gap: 10px;
}

.aspd-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-weight: 700;
  font-size: 12px;
}

.aspd-grid select,
.aspd-grid input {
  padding: 7px 8px;
  border: 1px solid #999;
  background: #ffffff;
  color: #1a2e3b;
}

.aspd-potions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.aspd-potions button {
  border: 1px solid #999;
  background: #eeeeee;
  padding: 7px 10px;
  cursor: pointer;
  font-weight: 700;
}

.aspd-potions button.is-active {
  background: linear-gradient(180deg, #cfeebc, #b5df9a);
  border-color: #7ea866;
  color: #1d2a16;
}

.aspd-result {
  margin-top: 16px;
  padding: 12px;
  background: #cfd6de;
  color: #1a2e3b;
  border: 1px solid #7f8c99;
  font-size: 26px;
  font-weight: 700;
  text-align: center;
}

/* ASPD Calculator - Dark Mode */
[data-md-color-scheme="slate"] .aspd-calc {
  background: #10202b;
  border-color: #4a5a66;
}

[data-md-color-scheme="slate"] .aspd-grid select,
[data-md-color-scheme="slate"] .aspd-grid input {
  background: #1a2a36;
  color: #e6f4ff;
  border-color: #4a5a66;
}

[data-md-color-scheme="slate"] .aspd-potions button {
  background: #22313d;
  color: #e6f4ff;
  border-color: #4a5a66;
}

[data-md-color-scheme="slate"] .aspd-potions button.is-active {
  background: #55784c;
  color: #f4fff0;
}

[data-md-color-scheme="slate"] .aspd-result {
  background: #22313d;
  border: 1px solid #4a5a66;
  color: #e6f4ff;
}

/* ============================================================
   RESPONSIVE & UTILITIES
   ============================================================ */
@media (max-width: 1200px) {
  .home-grid { grid-template-columns: repeat(3, 1fr); }
  .news-layout { grid-template-columns: minmax(0, 1fr) 260px; }
}

@media (max-width: 900px) {
  .home-grid { grid-template-columns: repeat(2, 1fr); }
  .home-banners { grid-template-columns: repeat(2, 1fr); }
  .top-panels { grid-template-columns: 1fr; }
  .news-layout { grid-template-columns: minmax(0, 1fr) 260px; }
}

@media (max-width: 600px) {
  .home-grid { grid-template-columns: 1fr; }
  .news-layout { grid-template-columns: 1fr; }
  .news-layout img {
    width: 100%;
    height: auto;
    max-width: 321px;
  }
  .home-banners { grid-template-columns: repeat(2, 1fr); }
}

/* Footer Social Icons */
.footer-social-icons {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  display: flex;
  gap: 12px;
}

.footer-social-icons img {
  width: 22px;
  height: 22px;
  opacity: 0.85;
  transition: all 0.25s ease;
}

.footer-social-icons img:hover {
  opacity: 1;
  transform: translateY(-2px) scale(1.08);
  filter: drop-shadow(0 0 6px rgba(79,174,212,0.8)) drop-shadow(0 0 12px rgba(79,174,212,0.5));
}

.footer-social-icons a {
  text-decoration: none !important;
  border-bottom: none !important;
}

@media (max-width: 600px) {
  .footer-social-icons {
    flex-direction: column;
    right: 10px;
    bottom: 10px;
    gap: 8px;
  }
  .footer-social-icons img {
    width: 18px;
    height: 18px;
  }
}

.md-content__inner > h1:first-child {
  display: none;
}

.home-logo {
  text-align: center;
  margin: 50px 0 20px;
}

.home-logo img {
  width: 220px;
  max-width: 80%;
  height: auto;
  opacity: 0.9;
}

.home-logo img:hover {
  opacity: 1;
  transform: translateY(-2px);
}

/* Dark Mode News Panel Fixes */
[data-md-color-scheme="slate"] .news-layout h3 {
  color: #cce8f4 !important;
  font-weight: 700;
}

[data-md-color-scheme="slate"] .news-layout p {
  color: #b0c8d8 !important;
}

[data-md-color-scheme="slate"] .news-layout a {
  color: #4faed4 !important;
}

/* Sidebar Titles */
[data-md-color-scheme="default"] .md-sidebar--secondary .md-nav__title {
  color: #263238 !important;
  opacity: 0.9;
}

[data-md-color-scheme="slate"] .md-sidebar--secondary .md-nav__title {
  color: #e6f4ff !important;
  opacity: 0.95;
}

/* Navi Copy Utility */
.naviBlock {
  cursor: pointer;
  border-bottom: 1px dotted currentColor;
  position: relative;
  border: none;
  text-decoration: none;
  margin-top: 5px;
  line-height: 1.1;
}

.naviCopied {
  display: none;
  margin-left: 6px;
  color: #e07b4a;
  font-size: 11px;
  font-weight: 700;
}

.naviBlock.is-copied .naviCopied {
  display: inline;
}

.naviGroup {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.naviBlock:hover {
  color: #44bbf1;           /* Your desired hover color */
}

/* Job System Mobile */
@media (max-width: 700px) {
  .job-info-card {
    float: none;
    width: 100%;
    margin: 0 0 24px 0;
  }
}

/* ASPD Calculator Mobile */
@media (max-width: 700px) {
  .aspd-grid {
    grid-template-columns: 1fr;
  }
}

.aspd-disabled {
  opacity: 0.45;
  cursor: not-allowed !important;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.table-scroll .skill-table {
  min-width: 650px;
}

@media (max-width: 700px) {
  .skill-table {
    font-size: 11px;
  }

  .skill-entry {
    white-space: nowrap;
  }
}

/*=============================================================
   IMAGE ROWS
   ============================================================ */
.imgRow {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 10px;
}

.imgRow img {
  width: 150px;
  height: auto;
  display: block;
}

.imgRow > div {
  width: 150px;
  text-align: center;
  margin-bottom: 8px;
}

/*=============================================================
  ELEMENTS
=============================================================*/

.element-table {
    border-collapse: collapse;
    margin: 20px auto;
    background-color: #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.element-table th,
.element-table td {
    border: 1px solid #bcccda;
    padding: 6px;
    text-align: center;
    min-width: 60px;
    font-size: 14px;
    transition: background-color 0.15s ease;
}

.element-table th {
    background-color: #f0f4f8;
    color: #333;
    font-weight: bold;
}

.row-header {
    background-color: #f0f4f8;
    font-weight: bold;
    text-align: right;
}

.neutral-cell {
    background-color: #ffffff;
}

.weak-cell {
    background-color: #fcd5b4;
    color: #a04000;
}

.strong-cell {
    background-color: #c6efce;
    color: #006100;
}

.immune-cell {
    background-color: #ffc7ce;
    color: #9c0006;
}

/* Hover Effects */
.neutral-cell:hover {
    background-color: #c7d9eb;
}

.weak-cell:hover {
    background-color: #e78b3f;
}

.strong-cell:hover {
    background-color: #58ba6e;
}

.immune-cell:hover {
    background-color: #ff6675;
}

/* Table Scrolling */
.table-scroll {
    overflow-x: auto;
    margin: 20px 0;
    -webkit-overflow-scrolling: touch;
}

/* Mobile */
@media screen and (max-width: 768px) {

    .element-table th,
    .element-table td {
        min-width: 45px;
        padding: 4px;
        font-size: 12px;
    }

    .row-header {
        min-width: 70px;
    }
}

/* Dark Mode */
[data-md-color-scheme="slate"] .element-table {
    background-color: #1a2a36;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

[data-md-color-scheme="slate"] .element-table th,
[data-md-color-scheme="slate"] .row-header {
    background-color: #22313d;
    color: #d7e7f2;
    border-color: #4a5a66;
}

[data-md-color-scheme="slate"] .element-table td {
    border-color: #4a5a66;
}

[data-md-color-scheme="slate"] .neutral-cell {
    background-color: #1a2a36;
    color: #d7e7f2;
}

[data-md-color-scheme="slate"] .weak-cell {
    background-color: #5b3d24;
    color: #ffd6b3;
}

[data-md-color-scheme="slate"] .strong-cell {
    background-color: #23492b;
    color: #c7f5d0;
}

[data-md-color-scheme="slate"] .immune-cell {
    background-color: #5a2328;
    color: #ffc8ce;
}

[data-md-color-scheme="slate"] .neutral-cell:hover {
    background-color: #4a6478;
}

[data-md-color-scheme="slate"] .weak-cell:hover {
    background-color: #b16f3a;
}

[data-md-color-scheme="slate"] .strong-cell:hover {
    background-color: #4aa45f;
}

[data-md-color-scheme="slate"] .immune-cell:hover {
    background-color: #b74b56;
}

