﻿/* Moonchild Breedables — Shared Website Styling */

:root {
  color-scheme: dark;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;

  --mc-background: #181223;
  --mc-header: #20172f;
  --mc-accent: #b18be8;
  --mc-text: #f1e7ff;
  --mc-muted: #cfc0dc;
  --mc-border: #ffffff25;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--mc-background);
  color: var(--mc-text);
}

/* Shared header */

#site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px max(24px, calc((100vw - 1200px) / 2));
  background: var(--mc-header);
  border-bottom: 1px solid var(--mc-border);
}

.site-brand {
  color: var(--mc-text);
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 800;
  white-space: nowrap;
}

#site-header nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 22px;
}

#site-header nav a {
  color: var(--mc-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

#site-header nav a:hover,
#site-header nav a[aria-current="page"] {
  color: var(--mc-accent);
}

#header-login {
  padding: 11px 20px;
  border: 0;
  border-radius: 10px;
  background: var(--mc-accent);
  color: #180f24;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

#header-login:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Shared page layout */

.site-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px 100px;
}

.site-card {
  padding: 28px;
  background: #ffffff0b;
  border: 1px solid var(--mc-border);
  border-radius: 16px;
}

/* Mobile layout */

@media (max-width: 800px) {
  #site-header {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  #site-header nav {
    gap: 14px;
  }

  #header-login {
    align-self: flex-start;
  }

  .site-main {
    padding-top: 36px;
  }
}

/* Moonchild unified centred header */
#site-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 22px 20px 18px;
    text-align: center;
}

#site-header > a:first-child {
    display: block;
    text-align: center;
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 750;
}

#site-header nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 22px;
    width: 100%;
    flex-wrap: wrap;
}

#mc-header-account-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    width: 100%;
}

#mc-header-account-row > div {
    align-items: center;
    justify-content: center;
    gap: 5px !important;
}

#mc-header-account-row button,
#mc-header-account-row a[href="/settings.html"] {
    box-sizing: border-box;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 40px;
    padding: 9px 13px;
    border: 1px solid #7856a0;
    border-radius: 8px;
    background: #51316f;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

#mc-header-account-row button:hover,
#mc-header-account-row a[href="/settings.html"]:hover {
    background: #69428b;
}

#mc-header-account-row #mc-notifications-menu {
    min-width: 40px;
    padding: 8px;
}

#mc-header-account-row a[href="/settings.html"] {
    min-width: 40px;
    padding: 8px;
}

#mc-header-account-row #header-login {
    align-self: center;
}

@media (max-width: 600px) {
    #site-header {
        gap: 12px;
        padding: 18px 12px;
    }

    #site-header nav {
        gap: 12px;
    }

    #mc-header-account-row {
        gap: 5px;
    }
}

/* Moonchild uniform header icon buttons */
#mc-header-account-row {
    gap: 6px;
}

#mc-header-account-row > div {
    gap: 6px !important;
}

#mc-header-account-row #mc-notifications-menu,
#mc-header-account-row a[href="/settings.html"],
#mc-header-account-row #header-login,
#mc-header-account-row #header-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    margin: 0;
    border: 1px solid #7856a0;
    border-radius: 10px;
    background: #51316f;
    color: #ffffff;
    box-sizing: border-box;
    flex: 0 0 44px;
    vertical-align: middle;
}

#mc-header-account-row svg {
    display: block;
    width: 21px;
    height: 21px;
    flex-shrink: 0;
}

#mc-header-account-row #mc-notification-count {
    position: absolute;
    top: -5px;
    right: -5px;
    z-index: 2;
}

#mc-header-account-row #mc-notifications-menu:hover,
#mc-header-account-row a[href="/settings.html"]:hover,
#mc-header-account-row #header-login:hover,
#mc-header-account-row #header-logout:hover {
    background: #69428b;
}

#mc-header-account-row #mc-notifications-menu:focus-visible,
#mc-header-account-row a[href="/settings.html"]:focus-visible,
#mc-header-account-row #header-login:focus-visible,
#mc-header-account-row #header-logout:focus-visible {
    outline: 2px solid #d8b9ff;
    outline-offset: 3px;
}

/* Moonchild header visibility fix */
#mc-header-account-row [hidden] {
    display: none !important;
}

#mc-header-account-row #mc-notifications-menu,
#mc-header-account-row a[href="/settings.html"],
#mc-header-account-row #header-login,
#mc-header-account-row #header-logout {
    display: inline-flex;
}

/* Preserve JavaScript-controlled visibility */
#mc-header-account-row [style*="display: none"] {
    display: none !important;
}

/* Keep the notification dropdown correctly positioned */
#mc-header-account-row #mc-notification-count[hidden],
#mc-header-account-row #mc-notification-panel[hidden] {
    display: none !important;
}

/* Moonchild top-right account controls */
#site-header {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 76px 20px 20px;
    gap: 12px;
}

#mc-header-account-row {
    position: absolute;
    top: 14px;
    right: 20px;
    width: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

#mc-header-account-row > div {
    justify-content: flex-end !important;
}

#site-header > a:first-child {
    text-align: center;
    margin: 0;
}

#site-header nav {
    justify-content: center;
    width: 100%;
}

@media (max-width: 480px) {
    #site-header {
        padding-top: 76px;
    }

    #mc-header-account-row {
        top: 12px;
        right: 12px;
    }
}

/* Moonchild redesigned profile page */
.mc-profile-page {
    max-width: 1500px;
    margin: 0 auto;
}

.mc-profile-title {
    text-align: center;
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.2;
    margin: 26px 0 36px;
    color: #f4eaff;
    text-shadow: 0 0 22px rgba(174, 108, 255, .16);
}

.mc-title-moon {
    color: #ca8dff;
    margin: 0 18px;
    font-weight: 400;
}

.mc-profile-panel {
    border: 1px solid #564168;
    border-radius: 24px;
    padding: 34px;
    background: linear-gradient(145deg, #241a30, #21192b);
    box-shadow: 0 18px 55px rgba(0,0,0,.15);
}

.mc-profile-name-card,
.mc-profile-stat-card,
.mc-profile-moonchildren-card {
    border: 1px solid #64417e;
    border-radius: 18px;
    background: linear-gradient(135deg, #382348, #30203e);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}

.mc-profile-name-card {
    text-align: center;
    padding: 25px 20px 18px;
    margin-bottom: 20px;
}

.mc-profile-name-card h2 {
    font-size: clamp(1.5rem, 3.5vw, 2.7rem);
    margin: 0;
    color: #f7edff;
    overflow-wrap: anywhere;
}

.mc-profile-name-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 16px auto 0;
    max-width: 400px;
    color: #bd7df0;
}

.mc-profile-name-divider > span:first-child,
.mc-profile-name-divider > span:last-child {
    height: 1px;
    flex: 1;
    background: linear-gradient(90deg, transparent, #a363d2);
}

.mc-profile-name-divider > span:last-child {
    transform: rotate(180deg);
}

.mc-profile-divider-moon {
    font-size: 25px;
}

.mc-profile-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.mc-profile-stat-card {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 25px 30px;
    min-width: 0;
}

.mc-profile-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    border-radius: 18px;
    background: #573477;
    color: #eed5ff;
}

.mc-profile-icon svg {
    width: 38px;
    height: 38px;
}

.mc-profile-stat-card h3,
.mc-profile-moonchildren-card h3 {
    color: #ddaaff;
    margin: 0 0 12px;
    font-size: 1.25rem;
}

.mc-profile-stat-card p {
    color: #f7edff;
    margin: 0;
    font-size: 1.15rem;
    overflow-wrap: anywhere;
}

.mc-profile-moonchildren-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px;
}

.mc-profile-moonchildren-card .mc-profile-icon {
    margin-bottom: 14px;
}

.mc-profile-moonchildren-card h3 {
    margin-bottom: 12px;
}

#profile-moonchildren {
    color: #e5a3ff;
    font-size: 2.6rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: underline;
    text-underline-offset: 5px;
}

#profile-moonchildren:hover {
    color: #fff;
}

@media (max-width: 700px) {
    .mc-profile-title {
        margin: 20px 0 26px;
    }

    .mc-title-moon {
        margin: 0 6px;
    }

    .mc-profile-panel {
        padding: 14px;
    }

    .mc-profile-stats {
        grid-template-columns: 1fr;
        gap: 14px;
        margin-bottom: 14px;
    }

    .mc-profile-stat-card {
        padding: 20px;
        gap: 16px;
    }

    .mc-profile-icon {
        flex-basis: 58px;
        width: 58px;
        height: 58px;
    }

    .mc-profile-icon svg {
        width: 30px;
        height: 30px;
    }
}

/* Moonchild redesigned settings page */
.mc-settings-page {
    max-width: 1500px;
    margin: 0 auto;
}

.mc-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 20px;
}

.mc-settings-grid[hidden] {
    display: none !important;
}

.mc-settings-card {
    min-width: 0;
    padding: 24px;
    border: 1px solid #64417e;
    border-radius: 22px;
    background: linear-gradient(145deg, #352343, #271b35);
    box-shadow: 0 14px 35px rgba(0,0,0,.16);
    color: #f4eaff;
}

.mc-settings-heading {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 22px;
}

.mc-settings-heading h2 {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    margin: 0;
    color: #f4eaff;
}

.mc-settings-icon {
    width: 80px;
    height: 80px;
    flex: 0 0 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 17px;
    border: 1px solid #8f50bc;
    background: #583477;
    color: #e9cbff;
}

.mc-settings-icon svg {
    width: 43px;
    height: 43px;
}

.mc-settings-card > p {
    margin: 20px 0;
}

.mc-settings-current-name strong {
    color: #d69bff;
}

.mc-settings-form-row {
    display: flex;
    align-items: stretch;
    gap: 12px;
    margin-top: 8px;
}

.mc-settings-form-row input,
.mc-settings-form-row select {
    min-width: 0;
    flex: 1 1 auto;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #8954b3;
    border-radius: 9px;
    background: #251b33;
    color: #fff;
    font: inherit;
}

.mc-settings-form-row button {
    flex: 0 0 auto;
    padding: 12px 18px;
    border: 1px solid #995ac6;
    border-radius: 9px;
    background: #60397f;
    color: #fff;
    font: inherit;
    cursor: pointer;
}

.mc-settings-form-row button:hover:not(:disabled) {
    background: #754698;
}

.mc-settings-form-row button:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.mc-settings-checks {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
}

.mc-settings-checks label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.mc-settings-checks input[type="checkbox"] {
    width: 19px;
    height: 19px;
    margin: 0;
    accent-color: #c98bff;
}

.mc-settings-reminders {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #79518f;
}

.mc-settings-reminders h3 {
    margin: 0 0 18px;
    color: #f0dcff;
}

.mc-settings-frequency-label {
    display: block;
    margin-top: 24px;
}

.mc-settings-cooldown {
    color: #e3baff;
    overflow-wrap: anywhere;
}

#settings-name-status:empty,
#settings-preferences-status:empty {
    display: none;
}

#settings-name-status,
#settings-preferences-status {
    color: #e0b6ff;
}

@media (max-width: 850px) {
    .mc-settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .mc-settings-card {
        padding: 18px;
    }

    .mc-settings-heading {
        gap: 14px;
    }

    .mc-settings-icon {
        width: 60px;
        height: 60px;
        flex-basis: 60px;
    }

    .mc-settings-icon svg {
        width: 32px;
        height: 32px;
    }

    .mc-settings-form-row {
        flex-direction: column;
    }

    .mc-settings-form-row button {
        width: 100%;
    }
}
