/* =========================
   GLOBAL
========================= */

:root {
    --accent: #e44e53;
    --accent-dark: #b41b1f;
    --accent-glow: rgba(228, 78, 83, 0.4);
    --accent-glow-strong: rgba(228, 78, 83, 0.25);
    --bg-hover: #222;
    --text-hover: #e44e53;
    --border-hover: #e44e53;
    --frame-border: #b41b1f;
    --frame-inner: #2e2e2e;
    --frame-glow: rgba(228, 78, 83, 0.15);
    --link: #e44e53;
    --link-hover: #b41b1f;
}

/* BLUE THEME OVERRIDES */
body.blue-theme {
    --accent: #4771C5;
    --accent-dark: #2f4f86;
    --accent-glow: rgba(71, 113, 197, 0.4);
    --accent-glow-strong: rgba(71, 113, 197, 0.25);
    --bg-hover: #1b2433;
    --text-hover: #4771C5;
    --border-hover: #4771C5;
    --frame-border: #2a3a5a;
    --frame-inner: #1b2433;
    --frame-glow: rgba(71, 113, 197, 0.15);
    --link: #4771C5;
    --link-hover: #C1D1F4;
}


@font-face {
    font-family: "PORCELAIN";
    src: url("fonts/PORCELAIN.woff2") format("woff2");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

* {
    box-sizing: border-box;
}

.main-box,
.box,
.box2,
.series-box {
    background: rgba(46, 46, 46, 0.85);
}

body {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    margin: 0;
    font-family: 'Hiragino Kaku Gothic ProN', verdana, arial;
    letter-spacing: 0.05rem;
    text-shadow: 1px 1px 0 #000000c4;
    font-size: 11px;
    color: #C1C1C1;
    background-color: #111;
    background-image: url("https://porcelainpills.neocities.org/me/bg.jpg");
    background-repeat: repeat;
    background-attachment: fixed;
}

.background-layer {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

.bg-art {
    --art-size: 260px;
    --art-rotation: 0deg;
    --art-opacity: 0.4;
    --art-blend: color-dodge;
    position: fixed;
    display: block;
    width: var(--art-size);
    height: var(--art-size);
    opacity: var(--art-opacity);
    transform: rotate(var(--art-rotation));
    transform-origin: center;
    mix-blend-mode: var(--art-blend);
    filter: saturate(1.05);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    background-image: url("https://porcelainpills.neocities.org/me/bg-rose-red.png");
    image-rendering: pixelated;
}

body.blue-theme .bg-art {
    background-image: url("https://porcelainpills.neocities.org/me/bg-rose-blue.png");
}

.bg-art--rose {
    top: 400px;
    left: -180px;
    --art-size: 800px;
    --art-rotation: 12deg;
    --art-opacity: 0.42;
    --art-blend: color-dodge;
    transform: rotate(var(--art-rotation)) scaleX(-1);
}

.bg-art--petal {
    right: 200px;
    bottom: 400px;
    --art-size: 385px;
    --art-rotation: 15deg;
    --art-opacity: 0.28;
    --art-blend: screen;
    transform: rotate(var(--art-rotation)) scaleY(-1);
}

.top-section,
#layout,
.content-layout,
.sidebar,
.main,
.main-box,
.grid {
    position: relative;
    z-index: 1;
}

.top-section {
    background: #111;
    width: 100%;
}

#header1,
#topnav {
    background: #111;
}

#topnav {
    display: none;
}

.blue-theme #theme-text {
    color: #4771C5;
    text-shadow:
        0 0 4px #4771C5,
        0 0 10px #4771C5,
        0 0 20px #4771C5;
}

p {
    margin: 0 0 1em 0;
}

h2 {
    margin: 0 0 1em 0;
    font-family: 'Crimson Text', verdana, arial;
    font-size: 16px;
    color: #C1C1C1;
    letter-spacing: 0.5px;
    line-height: 19px;
}

highlight {
  background-color: rgba(142, 142, 142, 0.4);
  padding: 1px;
  text-shadow: 1px 1px #000000c4;
}

a {
    color: var(--link);
    transition: color 0.3s ease;
    text-decoration: none;
}

a:hover {
    color: var(--link-hover);
    transition: all 0.25s ease;
    opacity: 0.8;
    transform: translateY(-1px);
}


b {
    color: #aaa;
    font-weight: 900;
}

i {
    font-style: italic;
    color: #aaa;
}

u {
    color: #aaa;
    text-decoration: underline;
}

hr {
    border: none;
    border-top: 1px dashed #555555;
    margin: 10px 0;
}


/* =========================
   SCROLLBAR
========================= */

::-webkit-scrollbar-thumb {
    background-color: #111;
    border-radius: 0px;
    border: 1px solid #666;
}

::-webkit-scrollbar {
    width: 7px;
    height: 0px;
    background: transparent;
}

/* =========================
   LAYOUT WRAPPER
========================= */

#layout {
    width: 940px;
    margin: 0 auto;
}


/* =========================
   HEADER
========================= */

#header1 {
    background: #111;
        margin: 5px;
    padding: 0;
}

#topnav {
    background: #111;
    border-bottom: 1px dashed #222;
    margin-bottom: 0;
}

#header2 {
    height: 230px;
    background: #111 url(https://porcelainpills.neocities.org/me/red.gif) no-repeat center;
}

#sitename {
    padding-top: 90px;
    text-align: center;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 28px;
    background: rgba(16,16,16,.92);
    border-radius: 40px;
    text-decoration: none;
}

.logo-porcelain {
   font-family: "Porcelain" !important;
    font-size: 68px;
    font-weight: normal;
    color: #d8d8d8;
    text-transform: none;
    line-height: .8;
}

.logo-pills {
    font-family: "Courier New", monospace;
    font-size: 42px;
    letter-spacing: 8px;
    text-transform: uppercase;
    color: #aaa;
    font-weight: 100;
}

.logo-pill {
    width: 35px;
    height: 35px;
    image-rendering: pixelated;
    animation: spinPill 6s linear infinite;
    transform-origin: center;
}


.logo-pill:hover {
    animation-duration: 0.8s;
}

@keyframes spinPill {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}


.header-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    background: rgba(26, 26, 26, .75);
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
    border-radius: 36px 36px 0 0;
    margin: -30px -30px 25px;
    padding: 15px 30px 14px;
}

.header-nav a {
        display: inline-block;
        padding: 4px 10px;
        background: #1a1a1a;
        border: 1px solid #2a2a2a;
        font-family: monospace;
        font-size: 12px;
        letter-spacing: 1px;
        text-transform: uppercase;
        color: #ccc;
        text-decoration: none;
        box-shadow: inset 0 0 0 1px #0f0f0f;
        transition: all 0.2s ease;
    }

    .header-nav a:hover {
        transform: translateY(-1px);
        background: var(--bg-hover);
        border-color: var(--border-hover);
        color: var(--text-hover);
        text-shadow:
            0 0 4px var(--text-hover),
            0 0 10px var(--text-hover),
            0 0 20px var(--accent-dark);
        box-shadow:
            0 0 6px var(--accent-glow),
            0 0 14px var(--accent-glow-strong);
    }


/* 3 BOX GRID */
.grid {
    display: flex;
    gap: 16px;
    width: min(100%, 900px);
    margin: 0 auto;
    align-items: stretch;
}

.grid > * {
    flex: 1 1 0;
    min-width: 0;
}

/* MAIN CONTENT */

.content-layout {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    width: min(100%, 900px);
    margin: 30px auto 40px;
}

.sidebar {
    flex: 0 0 250px;
}

.main {
    flex: 1 1 0;
    min-width: 0;
}


.main-box {
  width: 100%;
  background-color: rgba(51, 51, 51, 0.336);
  border-radius: 40px;
  padding: 30px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  border: 4px ridge #ffffff3f;
  backdrop-filter: blur(5px);
  margin-top: 20px;
}


.writing-title {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -81%);
    font-family: "UnifrakturCook", serif;
    font-size: 2.5rem;
    color: var(--text-hover);
    z-index: 2;
    white-space: nowrap;
}

.textbox {
    padding: 1em 0.5em;
    border: 1px dotted #111111;
    border-radius: 6px;
    overflow-wrap: break-word;
    overflow: hidden;
    background: rgba(78, 78, 78, 0.94);
    padding-bottom: 1px;
    margin-bottom:20px;
}


.fic-filter {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.fic-filter button {
    background: #1a1a1a;
    border: 1px solid #3a3a3a;
    color: #ccc;
    padding: 4px 10px;
    font-family: monospace;
    cursor: pointer;
}

.fic-filter button:hover {
    border-color: var(--accent);
    color: var(--accent-dark);
}


.basic-button {
 background: #1a1a1a;
    border: 1px solid #2a2a2a;
    padding: 5px 5px;
    font-family: 'Hiragino Kaku Gothic ProN', verdana, arial;
    letter-spacing: 0.05rem;
    text-shadow: 1px 1px 0 #000000c4;
    font-size: 11px;
    color: #C1C1C1;
    cursor: pointer;
    transition: transform 0.15s ease,
                background 0.3s ease,
                color 0.3s ease,
                border-color 0.3s ease;
}

.basic-button:hover {
    color: var(--accent);
    transition: all 0.25s ease;
    opacity: 0.8;
    transform: translateY(-1px);
     text-shadow:
        0 0 4px var(--text-hover),
        0 0 10px var(--text-hover),
        0 0 20px var(--accent-dark);
    box-shadow:
        0 0 6px var(--accent-glow),
        0 0 14px var(--accent-glow-strong);
}

.basic-button:active, 
.basic-button:focus {
    transform: translateY(1px);
}


/* =========================
   Fic Card
========================= */

.fic-card {
    display: grid;
    grid-template-columns: 50px 1fr;
    gap: 14px;
    padding: 14px;
    margin-bottom: 18px;
    background: rgba(46, 46, 46, 0.85);
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    box-shadow: inset 0 1px rgba(255,255,255,0.05);
}

/* thumbnail */
.fic-thumb {
    width: 50px;
    height: 50px;
    border: 1px solid #555;
    object-fit: cover;
}

/* main content column */
.fic-body {
    min-width: 0; 
}

/* title */
.fic-title {
    margin: 0;
    font-family: "UnifrakturCook", serif;
    font-size: 1.4rem;
    line-height: 1.1;
}

.fic-title a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s ease, opacity 0.3s ease;
}

.fic-title a:hover {
    text-decoration: underline;
}

/* metadata row */
.fic-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    color: #cfcfcf;
    margin-top: 4px;
}

.fic-meta span {
    position: relative;
    padding-right: 10px;
}

.fic-meta span::after {
    content: "|";
    position: absolute;
    right: 0;
    color: #666;
}

.fic-meta span:last-child::after {
    display: none;
}

/* tags dropdown */
.fic-tags {
    margin-top: 10px;
    color: #aaa;
}

.fic-tags summary {
    cursor: pointer;
    color: #ddd;
    user-select: none;
}

.tag-list {
    margin-top: 6px;
    padding-left: 10px;
    border-left: 2px solid #444;
    color: #aaa;
}



.fic-series {
    margin-bottom: 18px;
}

/* header block */
.fic-series-header {
    padding: 10px 12px;
    background: rgba(46, 46, 46, 0.85);
    border: 1px solid #3a3a3a;
    border-radius: 6px 6px 0 0;
}


.fic-series-list {
    display: flex;
    flex-direction: column;
}


.fic-series-item {
    display: grid;
    grid-template-columns: 50px 1fr;
    gap: 14px;
    padding: 14px;
    background: rgba(46, 46, 46, 0.85);
    border-left: 1px solid #3a3a3a;
    border-right: 1px solid #3a3a3a;
    border-bottom: 1px solid #3a3a3a;
}

/* first item connects to header */
.fic-series-list .fic-series-item:first-child {
    border-top: none;
}


.fic-series-item + .fic-series-item {
    border-top: 1px solid #2a2a2a;
}


.fic-series-item:last-child {
    border-radius: 0 0 6px 6px;
}

.fic-series-meta {
    margin-top: 2px;
    color: #999;
}



.fic-summary {
    margin: 12px 0;
    line-height: 1.6;
    color: #ddd;
}


.fic-link {
    margin: 0;
}

.fic-link a {
    font-weight: bold;
}

.fic-tag-link {
  display: inline-block;
    background: transparent;
    color: var(--accent);
    padding: 0px;
    border-bottom: 1px dotted var(--accent);
    text-decoration: none;
    transition: all 0.2s ease;
}

.fic-tag-link:hover {
    background: var(--accent);
    color: #111; /* or #fff depending on your theme contrast */
}

.fic-divider {
    width: 100%;
    height: 1px;
    margin: 12px 0;
    background: linear-gradient(to right, transparent, #444, transparent);
}

/* =========================
   TITLES
========================= */

.title {
    font-size: 18px;
    font-family: 'UnifrakturCook', serif;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}

.title2 {
    font-size: 25px;
    font-family: 'UnifrakturCook', serif;
    font-weight: 300;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
    display: inline-flex;
    align-items: center;
}

.title2::after {
    content: "";
    width: 16px;
    height: 16px;
    margin-left: 6px;
    background: url("https://porcelainpills.neocities.org/me/tiny%20red%20rose.png") no-repeat center;
    background-size: contain;
    flex-shrink: 0;
}

body.blue-theme .title2::after {
    background: url("https://porcelainpills.neocities.org/me/tiny%20blue%20rose.png") no-repeat center;
    background-size: contain;
}




/* =========================
   MISC
========================= */

summary {
    cursor: pointer;
}

textarea {
    font: 10px calibri;
    letter-spacing: 1px;
    background: #333;
}



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

@media (max-width: 760px) {

.header-nav {
        margin: 0 0 16px;
        padding: 10px 12px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        border: none;
        border-radius: 16px;
        overflow: hidden;
        background: transparent;
        gap: 6px;
    }

    .header-nav a {
        flex: 0 1 auto;
        max-width: 100%;
        box-sizing: border-box;
    }

    .theme-mascot {
        display: none;
    }

    .content-layout {
        flex-direction: column;
        gap: 16px;
        width: 100%;
        margin: 20px auto 30px;
    }

    .sidebar,
    .main {
        width: 100%;
        flex: 0 0 auto;
    }

    .sidebar {
        order: 2;
    }

    .main {
        order: 1;
    }

    #layout {
        width: 100%;
        padding: 0 10px;
    }

    .grid {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .grid > * {
        flex: 0 0 auto;
        width: 100%;
    }

    .card,
    .card-left,
    .card-pro,
    .card-connect,
    .bubble {
        width: 100%;
        margin-top: 20px;
        box-sizing: border-box;
    }

    .card-pro {
        min-width: 0;
    }

    .card-pro-inside {
        min-width: 0;
    }

    .main-box {
        padding: 20px;
        border-radius: 24px;
        margin-top: 20px;
    }

    .logo {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 100%;
    margin-inline: auto;
    padding-inline: 12px;
    box-sizing: border-box;
    flex-wrap: nowrap;
    overflow: hidden;
}

.logo-pills {
    letter-spacing: 1px;
    white-space: nowrap;
    font-size: clamp(0.8rem, 4vw, 1rem);
}

.logo-pill {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.logo-petals {
    display: none;
}
   

    .theme-widget-wrapper {
        position: static !important;
        display: block;
        width: 100%;
        margin-top: 40px;
    }

    .theme-widget {
        position: static !important;
        width: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 8px 10px;
        border-radius: 10px;
        margin-bottom: 20px;
    }

    .fic-card {
        grid-template-columns: 50px 1fr;
        padding: 12px;
    }

    .fic-thumb {
        width: 50px;
        height: 50px;
    }

    .fic-title {
        font-size: 1.2rem;
    }
}
     


/* =========================
   BLUE THEME OVERRIDES
========================= */

body.blue-theme a {
    color: #4771C5;
}

body.blue-theme a:hover {
    color: #C1D1F4;
    opacity: 0.8;
}

body.blue-theme #header2 {
    background: #111 url(https://porcelainpills.neocities.org/me/blue.gif) no-repeat center;
}

body.blue-theme .theme-mascot {
    content: url("https://porcelainpills.neocities.org/me/bean_4N.png");
}


/* =========================
   CYBER TOGGLE
========================= */

.cyber-toggle {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 28px;
    cursor: pointer;
    margin-bottom: 20px;
}

.cyber-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cyber-toggle span {
    position: absolute;
    inset: 0;
    background: #171717;
    border-radius: 50px;
    border: 2px solid #e44e53;
    box-shadow:
        0 0 8px rgba(228, 78, 83, 0.6),
        inset 0 0 6px rgba(0,0,0,0.8);
    transition: border-color 0.35s ease, box-shadow 0.35s ease;
}

.cyber-toggle span::before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    top: 50%;
    left: 2px;
    transform: translateY(-50%);
    background: #e44e53;
    border-radius: 50%;
    box-shadow:
        0 0 10px rgba(228, 78, 83, 0.8),
        inset 0 0 4px rgba(255,255,255,0.3);
    transition:
        transform 0.35s ease,
        background 0.35s ease,
        box-shadow 0.35s ease;
}

.cyber-toggle input:checked + span {
    border-color: #4771C5;
    box-shadow:
        0 0 10px rgba(71, 113, 197, 0.8),
        inset 0 0 6px rgba(0,0,0,0.8);
}

.cyber-toggle input:checked + span::before {
    transform: translate(28px, -50%);
    background: #4771C5;
    box-shadow:
        0 0 12px rgba(71, 113, 197, 0.9),
        inset 0 0 4px rgba(255,255,255,0.3);
}

.theme-widget-wrapper {
    position: fixed;
    bottom: 16px;
    right: 16px;
    left: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 999;
}

.theme-widget {
    position: fixed;
    bottom: 16px;
    right: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: #111;
    border: 1px dashed #2a2a2a;
    border-radius: 10px;
    z-index: 999;
}

.theme-mascot {
    position: absolute;
    bottom: 81%;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: auto;
    pointer-events: none;
    z-index: 10;
}

/* =========================
   PARAGRAPH NEON TEXT
========================= */

#theme-text {
    font-family: 'Crimson Text', monospace;
    font-size: 0.8rem;
    color: #e44e53;
    text-shadow:
        0 0 4px #e44e53,
        0 0 10px #e44e53,
        0 0 20px #e44e53;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

#theme-text .text-blue {
    display: none;
}

.blue-theme #theme-text .text-red {
    display: none;
}

.blue-theme #theme-text .text-blue {
    display: inline;
}

@keyframes pulseRed {
    0%, 100% {
        text-shadow: 0 0 4px #e44e53, 0 0 10px #e44e53, 0 0 20px #e44e53;
    }
    50% {
        text-shadow: 0 0 6px #e44e53, 0 0 14px #e44e53, 0 0 28px #e44e53;
    }
}

@keyframes pulseBlue {
    0%, 100% {
        text-shadow: 0 0 4px #4771C5, 0 0 10px #4771C5, 0 0 20px #4771C5;
    }
    50% {
        text-shadow: 0 0 6px #4771C5, 0 0 14px #4771C5, 0 0 28px #4771C5;
    }
}

  .vignette {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    box-shadow: 0 0 200px rgba(0,0,0,0.9) inset;
  }
