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

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Quicksand', sans-serif;
    color: white;
    min-height: 100vh;
    background:
        radial-gradient(circle at top, rgba(255,255,255,.08), transparent 60%),
        linear-gradient(180deg,#1c1635 0%,#2f2456 50%,#392a67 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: radial-gradient(white 1px, transparent 1px);
    background-size: 70px 70px;
    opacity: .25;
    pointer-events: none;
    z-index: -1;
}

.site-header,
.character-header {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    padding: 50px 20px 20px;
}

.site-header h1,
.character-header h1 {
    font-size: 3rem;
    color: #ffe0f6;
}

.tagline,
.character-header p {
    color: #ddd9ff;
    margin-top: 10px;
}

.hub-description {
    max-width: 700px;
    margin: 25px auto 0;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 30px;
    padding: 25px;
    line-height: 1.7;
}

.search-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 35px 20px;
}

#searchInput {
    width: 100%;
    max-width: 650px;
    padding: 18px 28px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    color: white;
    font-size: 1rem;
    backdrop-filter: blur(15px);
    box-shadow: 0 10px 25px rgba(0,0,0,.2);
}

#searchInput::placeholder {
    color: rgba(255,255,255,.6);
}

#searchInput:focus {
    outline: none;
    border-color: rgba(255,214,244,.55);
}

.character-grid {
    width: 90%;
    max-width: 1400px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 360px));
    justify-content: center;
    gap: 30px;
    padding-bottom: 80px;
}

.character-card {
    display: block;
    width: 100%;
    max-width: 360px;
    text-decoration: none;
    color: white;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 35px;
    padding: 40px;
    text-align: center;
    backdrop-filter: blur(16px);
    transition: .3s;
    overflow: hidden;
}

.character-card:hover {
    transform: translateY(-8px);
    background: rgba(255,255,255,.12);
}

.character-card img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    display: block;
    margin: 0 auto 25px;
    border-radius: 50%;
    border: 5px solid #ffd6f4;
    box-shadow: 0 0 25px rgba(255,214,244,.3);
}

.character-card h2 {
    color: #ffd6f4;
    font-size: 2rem;
    margin-bottom: 10px;
}

.character-card p,
.loading {
    color: #ddd9ff;
    text-align: center;
}

.back-button,
.profile-nav a {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    text-decoration: none;
    color: white;
    margin-bottom: 20px;
    transition: .3s;
}

.back-button:hover,
.profile-nav a:hover {
    background: rgba(255,255,255,.15);
    transform: translateY(-2px);
}

.profile-page {
    width: 92%;
    max-width: 1250px;
    margin: auto;
    padding-bottom: 80px;
}

.profile-card {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 40px;
    align-items: start;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 35px;
    padding: 40px;
    backdrop-filter: blur(16px);
}

.main-ref {
    width: 100%;
    height: 600px;
    object-fit: cover;
    border-radius: 25px;
    display: block;
    background: rgba(255,255,255,.08);
}

.quick-facts {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quick-facts h2,
.quick-facts h3 {
    color: #ffd6f4;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 35px 0;
}

.tab-button {
    border: none;
    cursor: pointer;
    color: white;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 999px;
    padding: 12px 20px;
    font-family: inherit;
    font-size: 1rem;
    transition: .2s;
}

.tab-button:hover,
.tab-button.active {
    background: rgba(255,214,244,.22);
    color: #ffe0f6;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(280px,1fr));
    gap: 22px;
}

.content-card,
.relationship-card {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 30px;
    padding: 28px;
    backdrop-filter: blur(14px);
}

.content-card h2,
.section-title h2 {
    color: #ffd6f4;
    margin-bottom: 12px;
}

.content-card p,
.relationship-card p {
    color: #f3efff;
    line-height: 1.6;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(255,214,244,.18);
    color: #ffe0f6;
    border: 1px solid rgba(255,255,255,.12);
}

.section-title {
    text-align: center;
    margin-bottom: 28px;
}

.gallery-grid,
.relationship-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(240px,1fr));
    gap: 22px;
}

.image-card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 20px;
    cursor: pointer;
    background: rgba(255,255,255,.08);
}

.image-card p {
    text-align: center;
    margin-top: 10px;
    color: #ddd9ff;
}

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(10, 8, 25, .92);
    justify-content: center;
    align-items: center;
    padding: 30px;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 95%;
    max-height: 90vh;
    border-radius: 20px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    border: none;
    background: rgba(255,255,255,.12);
    color: white;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
}

@media(max-width: 900px) {
    .profile-card {
        grid-template-columns: 1fr;
    }

    .main-ref {
        height: auto;
        max-height: 650px;
        object-fit: contain;
    }

    .site-header h1,
    .character-header h1 {
        font-size: 2.3rem;
    }
}



/* Universal page additions */

.character-count {
    margin-top: 18px;
    color: #ffe0f6;
    font-weight: 700;
}

.profile-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 35px;
}

.wide-card {
    grid-column: 1 / -1;
}

.relationship-type {
    color: #ffe0f6;
    font-weight: 700;
}

.relationship-card h3 {
    color: #ffd6f4;
    margin-bottom: 8px;
}

.relationship-card a {
    display: inline-block;
    margin-top: 12px;
    color: #ffe0f6;
    font-weight: 700;
}


/* Folder grouping additions */

.folder-container {
    width: 92%;
    max-width: 1450px;
    margin: 0 auto;
    padding-bottom: 80px;
}

.folder-section {
    margin-bottom: 55px;
}

.folder-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;

    max-width: 1180px;
    margin: 0 auto 22px;

    padding: 18px 24px;

    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 24px;

    backdrop-filter: blur(14px);
}

.folder-heading h2 {
    color: #ffd6f4;
    font-size: 1.8rem;
}

.folder-heading span {
    color: #ddd9ff;
    font-weight: 700;
}

@media(max-width: 700px) {
    .folder-heading {
        flex-direction: column;
        text-align: center;
    }
}

.folder-heading {
    cursor: pointer;
}

.folder-section.collapsed .character-grid {
    display: none;
}
.folder-title{
    display:flex;
    align-items:center;
    gap:15px;
}

.folder-arrow{
    color:#ffd6f4;
    font-size:1.2rem;
    transition:.3s;
    user-select:none;
}


/* NSFW / Mature Gallery additions */

.reveal-button {
    margin-top: 16px;
    padding: 10px 18px;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    color: white;
    background: rgba(255,214,244,.20);
    border: 1px solid rgba(255,255,255,.14);
}

.reveal-button:hover {
    background: rgba(255,214,244,.30);
}

.nsfw-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
}

.nsfw-card img {
    filter: blur(32px);
    transform: scale(1.03);
    transition: .25s ease;
}

.nsfw-card.revealed img {
    filter: none;
    transform: scale(1);
}

.nsfw-overlay {
    position: absolute;
    inset: 0;
    min-height: 280px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;

    background: rgba(10, 8, 25, .62);
    color: white;
    text-align: center;

    cursor: pointer;
    transition: .25s ease;
}

.nsfw-overlay strong {
    font-size: 1.1rem;
}

.nsfw-overlay small {
    color: #ffd6f4;
}

.nsfw-card.revealed .nsfw-overlay {
    opacity: 0;
    pointer-events: none;
}

/* Creator database image credit pills */

.image-credit-pills {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.image-credit-pill {
    text-decoration: none;
    font-size: .82rem;
    padding: 7px 12px;
}

.image-credit-pill:hover {
    background: rgba(255,214,244,.26);
    transform: translateY(-1px);
}

.image-title {
    text-align: center;
    margin-top: 10px;
    color: #ffe0f6;
    font-weight: 700;
}

.artist-pill{
    background:#ffd7ef;
    color:#9b4772;
}

.base-pill{
    background:#d9e8ff;
    color:#4a6ea8;
}

.designer-pill{
    background:#e8ddff;
    color:#7256a8;
}

.colorist-pill{
    background:#d8fff0;
    color:#4f9980;
}

.commissioner-pill{
    background:#fff0cf;
    color:#aa8543;
}

.gift-pill{
    background:#ffe2d2;
    color:#b46b4c;
}



/* ==========================================
   CHARACTER PAGE LAYOUT SYSTEM
   Notion Layout Select options:
   Default, Classic, Visual Novel, Magazine, Minimal
========================================== */


/* =========================
   DEFAULT
   Your normal current layout.
========================= */

body.layout-default .profile-card {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(260px, 420px);
    gap: 30px;
    align-items: start;
}

body.layout-default .content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
}


/* =========================
   CLASSIC
   Toyhouse-ish stacked profile.
   Image on top, facts underneath.
========================= */

body.layout-classic .profile-page {
    max-width: 1000px;
}

body.layout-classic .profile-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: center;
    text-align: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

body.layout-classic .main-ref-wrap {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

body.layout-classic .main-ref {
    max-width: 650px;
    width: 100%;
}

body.layout-classic .quick-facts {
    width: 100%;
    max-width: 700px;
}

body.layout-classic .content-grid {
    grid-template-columns: 1fr;
}


/* =========================
   VISUAL NOVEL
   Big character art + text panel.
========================= */

body.layout-visual-novel .profile-page {
    max-width: 1300px;
}

body.layout-visual-novel .profile-card {
    display: grid !important;
    grid-template-columns: minmax(300px, 48%) minmax(280px, 52%);
    gap: 35px;
    align-items: center;
}

body.layout-visual-novel .main-ref {
    max-height: 680px;
    width: 100%;
    object-fit: contain;
}

body.layout-visual-novel .quick-facts {
    min-height: 420px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

body.layout-visual-novel #overview .content-grid {
    grid-template-columns: 1.4fr .8fr;
}

body.layout-visual-novel #introduction,
body.layout-visual-novel #summary {
    font-size: 1.05rem;
    line-height: 1.8;
}


/* =========================
   MAGAZINE
   Editorial / scrapbook layout.
========================= */

body.layout-magazine .profile-page {
    max-width: 1450px;
}

body.layout-magazine .profile-card {
    display: grid !important;
    grid-template-columns: 420px 1fr;
    gap: 30px;
    align-items: stretch;
}

body.layout-magazine .main-ref {
    height: 100%;
    max-height: 560px;
    object-fit: cover;
}

body.layout-magazine .quick-facts {
    display: grid;
    align-content: center;
}

body.layout-magazine .content-grid {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: 26px;
}

body.layout-magazine .wide-card {
    grid-column: 1 / -1;
}

body.layout-magazine .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 260px));
    justify-content: center;
}


/* =========================
   MINIMAL
   Clean, airy, low decoration.
========================= */

body.layout-minimal {
    background: #151225 !important;
}

body.layout-minimal::before {
    display: none !important;
}

body.layout-minimal .profile-card,
body.layout-minimal .content-card,
body.layout-minimal .section-title,
body.layout-minimal .quick-facts {
    background: rgba(255,255,255,.04) !important;
    border: 1px solid rgba(255,255,255,.08) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

body.layout-minimal .profile-card {
    display: flex !important;
    flex-direction: column;
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
}

body.layout-minimal .main-ref {
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

body.layout-minimal .tabs {
    gap: 8px;
}

body.layout-minimal .tab-button {
    background: transparent !important;
    border: 1px solid rgba(255,255,255,.12) !important;
}

body.layout-minimal .tab-button.active {
    background: rgba(255,255,255,.12) !important;
}

body.layout-minimal .content-grid {
    grid-template-columns: 1fr;
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
}


/* =========================
   MOBILE SAFETY
========================= */

@media (max-width: 850px) {
    body.layout-default .profile-card,
    body.layout-visual-novel .profile-card,
    body.layout-magazine .profile-card,
    body.layout-classic .profile-card,
    body.layout-minimal .profile-card {
        display: flex !important;
        flex-direction: column !important;
        align-items: center;
    }

    body.layout-visual-novel #overview .content-grid,
    body.layout-magazine .content-grid,
    body.layout-default .content-grid {
        grid-template-columns: 1fr;
    }

    body.layout-magazine .main-ref,
    body.layout-visual-novel .main-ref {
        height: auto;
        max-height: none;
        object-fit: contain;
    }
}
.relationship-preview-card{
    text-align:center;
}

.relationship-preview-card img{
    width:110px;
    height:110px;
    object-fit:cover;
    border-radius:50%;
    margin:0 auto 14px;
    display:block;
    border:4px solid rgba(255,214,244,.7);
}

.relationship-preview-card .relationship-type{
    display:inline-block;
    margin:8px 0;
    padding:6px 12px;
    border-radius:999px;
    background:rgba(255,214,244,.18);
}
.admin-generator{
    max-width:700px;
    margin:40px auto;
    padding:25px;
    border-radius:25px;
    background:rgba(255,255,255,.08);
    text-align:center;
}

.admin-generator input,
.admin-generator textarea{
    width:100%;
    margin:8px 0;
    padding:12px 16px;
    border-radius:15px;
    border:1px solid rgba(255,255,255,.15);
}

.admin-generator textarea{
    min-height:80px;
}

.admin-generator button{
    margin:8px;
    padding:10px 18px;
    border-radius:999px;
    border:0;
    cursor:pointer;
}
