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

/* BODY */
body {
    background:#111 url("https://media1.giphy.com/media/v1.Y2lkPTc5MGI3NjExazhtMmw4cWlrY29ndjZucnZrdWtpcmtvNG1meW0zcGpmOTd5ZDVsZyZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/Qgfz2N36MgUBG/giphy.gif");
    background-size: cover;
    background-position: center;

    color: #A48C72;
    font-family: georgia, serif;
    font-size: 11px;
    line-height: 14px;
    text-align: justify;
    padding: 20px;
}

/* LINKS */
a {
    color: #EBD2B4;
    text-decoration: none;
}

a:hover {
    color: #CB9C67;
}

/* LAYOUT */
.container {
    width: 95%;
    max-width: 650px;
    margin: 40px auto;
    background: linear-gradient(to bottom, #3a2f25, #2e241c);
    border: 1px solid #000;
    box-shadow: 0 0 25px rgba(235, 217, 195, 0.4);
    border-radius: 10px;
    overflow: hidden;
}

.top {
    display: flex;
}

/* MAIN */
.main-column {
    flex: 1;
    background: linear-gradient(to bottom, #444, #1d1d1d);
}

.divider {
    text-align: center;
    margin: 10px 0;
}

/* HEADER */
header {
    position: relative;
    overflow: hidden;
    border-bottom: 1px dotted #BB8959;
}

header img {
    width: 100%;
    display: block;
}

.site-name {
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 18px;
    color: #CB9C67;
    font-style: italic;
}

/* NAV */
nav {
    background:#29211D;
    border-bottom: 1px dotted #BB8959;
}

nav ul {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 6px 0;
    list-style: none;
}

nav a {
    font-size: 10px;
    font-style: italic;
}

/* ASIDE */
aside {
    width: 160px;
    background: linear-gradient(to bottom, #111, #29211D);
    border-left: 1px dotted #BB8959;
    padding: 10px;
}

aside ul {
    list-style: none;
}

aside li {
    margin: 6px 0;
    padding: 4px;
    background: rgba(255,191,105,0.05);
}

/* TITLES */
.title {
    font: bold 20px 'doto', georgia;
    color: #CB9C67;
    border-bottom: 1px dotted #856F57;
    margin-bottom: 6px;
}

.icon {
  width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 4px;
}

/* MUSIC */
.music-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.music-btn {
    background: none;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.record {
    width: 60px;
    height: 60px;
    border-radius: 50%;

    background:
        repeating-radial-gradient(circle,
        #4a1d3f 0px,
        #4a1d3f 2px,
        #2a0f24 3px,
        #2a0f24 4px);

    display: flex;
    align-items: center;
    justify-content: center;

    position: relative;

    box-shadow:
        inset 0 0 12px rgba(0,0,0,0.6),
        0 0 20px rgba(147,51,234,0.3);
}

.record img {
    width: 42%;
    height: 42%;
    border-radius: 50%;
}

.record::after {
    content: "";
    position: absolute;
    width: 6px;
    height: 6px;
    background: #000;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.record.spinning {
    animation: spin 3s linear infinite;
}

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

.song-info {
    font-size: 10px;
    font-weight: 600;
    color: #EBD2B4;
    border-bottom: 1px dotted rgba(235, 210, 180, 0.4);
    padding-bottom: 2px;
}

.music-credit {
    font-size: 10px;
    margin-top: 5px;
}

/* FOOTER */
footer {
    text-align: center;
    padding: 8px;
    font-size: 10px;
    border-top: 1px dotted #BB8959;
}

/* MOBILE */
@media (max-width: 700px) {
    .top {
        flex-direction: column;
    }

    aside {
        width: 100%;
        border-left: none;
    }
}
/* CHARACTER PAGE */

.character-container {
    max-width: 760px;
}

.character-header img {
    max-height: 260px;
    object-fit: cover;
    object-position: center;
}

.character-main {
    padding: 12px;
}

.character-box {
    background: rgba(17, 17, 17, 0.55);
    border: 1px dotted #856F57;
    padding: 10px;
    margin: 12px 0;
    border-radius: 8px;
}

.character-box h2 {
    font: bold 18px 'Doto', georgia;
    color: #CB9C67;
    border-bottom: 1px dotted #856F57;
    margin-bottom: 8px;
}

.character-box p {
    margin-bottom: 8px;
}

.character-box strong {
    color: #EBD2B4;
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 10px 0;
}

.image-gallery img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border: 1px solid #000;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(203, 156, 103, 0.25);
}

.caption {
    font-size: 10px;
    color: #A48C72;
    text-align: center;
    font-style: italic;
}

.spellbook {
    background:
        linear-gradient(rgba(20, 13, 20, 0.75), rgba(17, 17, 17, 0.75)),
        url("https://www.transparenttextures.com/patterns/black-paper.png");
}

.spell-level {
    font: bold 16px 'Doto', georgia;
    color: #EBD2B4;
    background: rgba(203, 156, 103, 0.12);
    border: 1px dotted #856F57;
    padding: 5px 8px;
    margin: 14px 0 8px;
    border-radius: 6px;
}

.spell-card {
    background: rgba(0, 0, 0, 0.35);
    border: 1px dotted rgba(235, 210, 180, 0.35);
    padding: 8px;
    margin: 8px 0;
    border-radius: 8px;
}

.spell-card summary {
    cursor: pointer;
    color: #EBD2B4;
    font-weight: bold;
    font-size: 12px;
}

.spell-card summary:hover {
    color: #CB9C67;
}

.spell-card p {
    margin-top: 8px;
}

.spell-note {
    color: #CB9C67;
    font-style: italic;
    border-left: 2px solid #856F57;
    padding-left: 8px;
}

.character-notes {
    margin-left: 18px;
}

.character-notes li {
    margin: 6px 0;
}

.stat-list p {
    background: rgba(255,191,105,0.05);
    padding: 4px;
    margin: 4px 0;
    border-radius: 4px;
}
/* MORDRED PAGE BACKGROUND OVERRIDE */

.character-container .main-column {
    background: linear-gradient(to bottom, #2b171f, #130b10);
}
/* MORDRED PAGE BODY BACKGROUND */

body.mordred-page {
    background: #111 url("https://media.licdn.com/dms/image/v2/D4E22AQErkW4HzrK6oQ/feedshare-shrink_800/feedshare-shrink_800/0/1712764511634?e=2147483647&v=beta&t=CKkvuNAqe4_0vlEMDZN_R_K3wp4w44d54IMJMUZeaNI");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}
.ritual-tag {
    font-size: 9px;
    color: #130b10;
    background: #CB9C67;
    padding: 1px 5px;
    border-radius: 8px;
    margin-left: 4px;
}
/* DICE ROLLER */

.dice-roller {
    background: rgba(17, 17, 17, 0.55);
    border: 1px dotted #856F57;
    padding: 8px;
    margin: 10px 0;
    border-radius: 8px;
    text-align: center;
}

.dice-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    margin-bottom: 8px;
}

.dice-buttons button {
    background: #2b171f;
    color: #EBD2B4;
    border: 1px dotted #CB9C67;
    border-radius: 6px;
    padding: 4px 6px;
    font-family: georgia, serif;
    font-size: 10px;
    cursor: pointer;
}

.dice-buttons button:hover {
    background: #CB9C67;
    color: #130b10;
}

#dice-result {
    color: #EBD2B4;
    font-size: 13px;
    font-weight: bold;
    padding: 5px;
}
/* FULL CHARACTER STAT BLOCK */

.stat-block {
    background:
        linear-gradient(rgba(19, 11, 16, 0.88), rgba(19, 11, 16, 0.88)),
        url("https://www.transparenttextures.com/patterns/black-paper.png");
}

.stat-top {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px 12px;
    margin-bottom: 12px;
    border-bottom: 1px dotted #856F57;
    padding-bottom: 8px;
}

.stat-top p {
    margin: 0;
}

.combat-stats {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
    margin: 12px 0;
}

.combat-stats div {
    background: rgba(0, 0, 0, 0.35);
    border: 1px dotted #856F57;
    border-radius: 8px;
    padding: 6px 4px;
    text-align: center;
}

.stat-label {
    display: block;
    color: #CB9C67;
    font-size: 9px;
    text-transform: uppercase;
}

.stat-number {
    display: block;
    color: #EBD2B4;
    font-size: 16px;
    font-weight: bold;
    margin-top: 3px;
}

.ability-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
    margin: 12px 0;
}

.ability-score {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid #000;
    outline: 1px dotted #856F57;
    border-radius: 10px;
    padding: 6px 2px;
    text-align: center;
}

.ability-name {
    display: block;
    color: #CB9C67;
    font-size: 10px;
    font-weight: bold;
}

.ability-number {
    display: block;
    color: #EBD2B4;
    font-size: 20px;
    font-weight: bold;
    line-height: 22px;
}

.ability-mod {
    display: inline-block;
    color: #130b10;
    background: #CB9C67;
    border-radius: 10px;
    padding: 1px 7px;
    margin-top: 3px;
    font-size: 10px;
}

.sheet-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 10px;
}

.sheet-column {
    background: rgba(0, 0, 0, 0.28);
    border: 1px dotted rgba(235, 210, 180, 0.35);
    border-radius: 8px;
    padding: 8px;
}

.sheet-column h3 {
    font: bold 15px 'Doto', georgia;
    color: #CB9C67;
    border-bottom: 1px dotted #856F57;
    margin-bottom: 6px;
}

.sheet-column p {
    margin-bottom: 0;
}
.features-row {
    grid-template-columns: 1fr 2fr;
}

.features-wide {
    min-height: 120px;
}

@media (max-width: 700px) {
    .features-row {
        grid-template-columns: 1fr;
    }
}

/* MOBILE STAT BLOCK */

@media (max-width: 700px) {
    .stat-top {
        grid-template-columns: 1fr;
    }

    .combat-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .ability-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .sheet-columns {
        grid-template-columns: 1fr;
    }
}

/* CHARACTER PAGE MOBILE */

@media (max-width: 700px) {
    .image-gallery {
        grid-template-columns: 1fr;
    }

    .image-gallery img {
        height: auto;
    }
}