@font-face {
    font-family: "kingthings_petrock"; /* Name your font */
    src: url("/assets/fonts/kingthings_petrock/Kingthings_Petrock.ttf") format("truetype");
}

body {
    /* UI */
    font-family: "kingthings_petrock", serif; /* Apply the font, with serif fallback */
    cursor: url("/assets/images/UI/cursor/the-guild-2/Cursor.cur"), auto;

    background-image: url("/assets/images/UI/parchment2.jpg");
    background-repeat: repeat;
    background-size: auto;

    margin: 0; /* Remove default margin for full background */
    padding: 1.25rem; /* was 20px */ /* Add some padding for content */
    min-height: 300vh; /* 3x the viewport height — plenty to scroll */

    overflow-x: hidden; /* ignores overflow caused by banner dragons to not expand horizontally the page*/
}
/* --- Custom Cursors --- */
a,
button,
input,
[role="button"] {
    cursor: url("/assets/images/UI/cursor/the-guild-2/link_select.cur"), auto;
}

/* --- Corner GIF --- */
.corner-gif {
    position: absolute;
    top: 0.625rem; /* Distanza dal top */
    right: 0.625rem; /* Distanza dal left per angolo top-left */
    width: 10rem; /* Regola la dimensione */
    height: auto;
}

/* --- Morrowind-inspired reusable frame --- */

/* Outer frame: double gold + black border */
.mw-frame {
    border: 2px solid black;
    outline: 3px solid #8b6a2f;
    box-sizing: border-box;
    width: fit-content;
}
/* Title bar: ornate gold pattern with sun/moon glyphs */
.mw-title-bar {
    color: #5a3e1b;
    font-size: 0.8rem;
    position: absolute;
    
    background: #c8a96e;
    background-image:
        repeating-linear-gradient(48deg, transparent, transparent 4px, rgba(40, 20, 0, 0.477) 4px, rgba(40, 20, 0, 0.11) 5px),
        repeating-linear-gradient(132deg, transparent, transparent 4px, rgba(40, 20, 0, 0.05) 4px, rgba(40, 20, 0, 0.11) 5px),
        repeating-linear-gradient(78deg, transparent, transparent 11px, rgba(40, 20, 0, 0.07) 11px, rgba(40, 20, 0, 0.07) 12px),
        repeating-linear-gradient(102deg, transparent, transparent 11px, rgba(40, 20, 0, 0.05) 11px, rgba(40, 20, 0, 0.07) 12px),
        repeating-linear-gradient(90deg, transparent, transparent 22px, rgba(40, 20, 0, 0.071) 22px, rgba(40, 20, 0, 0.04) 23px);

    box-sizing: border-box; /* include padding in width calculations */

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

    position: relative;
}
.mw-title-bar::before,
.mw-title-bar::after {
    color: #5a3e1b;
    font-size: 0.8rem;
    position: absolute;
}


.mw-title-panel {
    background: #1a1208;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.6);
    padding: 4px 15px;
    min-width: 10%;
    text-align: center;
}
.mw-title-text {
    color: #d4a843;
    font-size: 0.9rem;
    font-weight: 30;
    letter-spacing: 0.12rem;
    text-transform: uppercase;
    line-height: 1.3;
    text-shadow: 0 0 8px rgba(180, 130, 30, 0.4);
}
/* --- Generic body:black border box --- */
.mw-body {
    background-color: #110e08b9;
    
    border: 2px solid #8b6a2f;
    padding: 4px 10px;
    box-sizing: border-box;
    color: #c49a30;
}
.mw-body a {
    color: #c49a30;
}

/* --- Dashboard --- */
/* --- Super Special title bars --- */
/* --- Other symbols I could use:
҉ ֍ ⛧ ᳀ ☠ ۩ ۞
any 'samaritan' unicode character really
any 'lepcha' unicode character really
ߦ
༺ + ༻
꧁ + ꧂

ﷺ ﷻ
*/
.mw-title-bar--nav::before {
    content: "☽";
    left: 3%;
}
.mw-title-bar--nav::after {
    content: "☀";
    right: 3%;
}

/* Nav layout */
.mw-body--nav {
    background-color: #110e08;
    background-image:
        repeating-linear-gradient(48deg, transparent, transparent 4px, rgba(8, 202, 228, 0.114) 4px, rgba(255, 255, 255, 0.142) 5px),
        repeating-linear-gradient(132deg, transparent, transparent 5px, rgba(4, 155, 255, 0.189) 1px, rgba(120, 200, 255, 0.14) 5px),
        repeating-linear-gradient(68deg, transparent, transparent 11px, rgba(80, 159, 255, 0.224) 3px, rgba(138, 255, 80, 0.08) 12px),
        repeating-linear-gradient(112deg, transparent, transparent 5px, rgba(80, 159, 255, 0.043) 11px, rgba(80, 160, 255, 0.08) 12px),
        repeating-linear-gradient(90deg, transparent, transparent 25px, rgba(6, 14, 255, 0.146) 25px, rgba(60, 118, 255, 0.055) 26px);
    animation: slide 6s linear infinite;
}
@keyframes slide {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 40px 0;
    }
}
/* --- Nav links (only used inside .mw-body--nav) --- */
.mw-nav-link {
    color: #c49a30;
    display: inline-block;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
    padding: 3px 10px;
    border: 1px solid #7a5820;
    margin: 2px 3px;
    background: #1a1208;
    transition:
        background 0.12s,
        color 0.12s,
        border-color 0.12s;
    white-space: nowrap;
}
.mw-nav-link:hover,
.mw-nav-link.active {
    background: #2c1f0a;
    color: #f0c040;
    border-color: #c49a30;
}


/* 
px — absolute pixels, always the same size regardless of anything
rem — relative to the root (html) font size. Good for spacing and typography because it respects user font size preferences
em — relative to the current element's font size. Can get confusing when nested
% — relative to the parent element's size. Common for widths
vh — viewport height. 100vh = 100% of the screen height. You already used this
vw — viewport width, same idea horizontally
 */
/* --- Main Frame and Layout --- */
.frame-wrapper {
    position: relative;
    box-sizing: border-box;
    width: 80%;

    border-style: solid;
    border-width: 10.8125rem 2.5rem 1.9375rem 10rem;
    border-image: url("/assets/images/UI/celticsuperframe.svg");
    border-image-slice: calc(173 / 250 * 100%) calc(40 / 355 * 100%) calc(31 / 250 * 100%) calc(160 / 350 * 100%); /* from the top, right, bottom, left */
    border-image-repeat: stretch;

    background-color: #e3cf9dab;
    outline: 5px solid #e3cf9d67;

    min-height: 100vh;
    margin-top: 5rem;
    margin-left: auto;
    margin-right: auto;
}

.pageLayout {
    display: flex;
    align-items: flex-start; /* critical for sticky to work */
    position: relative;
    z-index: 1;

    background-color: #e3cf9d;

    margin-top: -8.125rem; /* was -130px Pulls it up over the border*/
    margin-left: -6.875rem; /* was -110px */
}
.mainContent {
    flex: 1; /* takes up all remaining space */
    margin: 0 auto;
    padding: 0 0.625rem 2.5rem 0.625rem; /* padding: 10px 10px 40px 10px; 0 sopra, 20px a DX, 40px in basso e 10px a SX */
}
/* --- Links Container --- */
.linkContainer {
    width: fit-content;
    background-color: #fde76d76;
    border: 5px solid black;
    padding: 0 6.25rem 0.625rem 0.625rem;
    margin-bottom: 1.25rem;
}
