body {
    margin: 0;
    padding: 0;
    position: relative;
    overflow: hidden;
    align-items: center;
}
.background-img {
    z-index: -1;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    overflow: hidden;
}
.content-div {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, 0%);
    width: 100vw;
    height: 100vh;
    overflow-y: scroll;
    justify-content: space-between;
    display: flex;
    flex-direction: column;
}
h1 {
    font-family: 'Ultimatum-Bold', sans-serif;
    font-size: 5rem;
    text-align: center;
    margin: 10px;
    display: block;
    text-shadow: 
        3px 3px 3px #000,
        -3px 3px 3px #000,
        3px -3px 3px #000,
        -3px -3px 3px #000;
    color: white;
}
h2 {
    font-family: 'Ultimatum-Bold', sans-serif;
    font-size: 1.3rem;
    text-align: center;
    margin: 10px;
    display: block;
    text-shadow: 
        3px 3px 3px #000,
        -3px 3px 3px #000,
        3px -3px 3px #000,
        -3px -3px 3px #000;
    color: white;
}
h3 {
    font-family: 'Ultimatum-Bold', sans-serif;
    font-size: 1.2rem;
    text-align: center;
    margin: 10px;
    display: block;
    color: white;
}
p {
    font: 1em 'Roboto', sans-serif;
    margin: 10px;
    color: white;
}
a {
    color: #4fc3ff;
    text-decoration: underline;
    transition: color 0.2s;
}
a:hover, a:focus {
    color: #b3e0ff;
}
a.default-button {
    color: rgb(0, 0, 0);
    text-decoration: none;
}
a.default-button:hover, a.default-button:focus {
    color: rgb(255, 255, 255);
}
.result-div {
    margin: 10px;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    max-width: 500px;
    min-width: 300px;
    max-height: fit-content;
    position: relative; /* allow absolutely positioned drop zones */
}
.divider-div {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
}
@media (max-width: 960px) {
    .divider-div {
        flex-direction: column;
        align-items: center;
        width: inherit;
    }
}
.editor-div {
    margin: 5px;
    padding: 5px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    align-self: center;
    min-width: 300px;
}
/* Drag & drop highlight styles (inlined here to keep script.js logic minimal) */
.editor-div.drop-target {
    outline: 3px dashed #4fc3ff;
    outline-offset: -3px;
    position: relative;
}
.editor-div.drop-target::after {
    content: "Drop .cmscard to import";
    position:absolute;
    top:50%;
    left:50%;
    transform:translate(-50%,-50%);
    background:rgba(0,0,0,0.75);
    padding:8px 14px;
    border:1px solid #4fc3ff;
    border-radius:6px;
    font:600 0.85rem 'Roboto', sans-serif;
    color:#fff;
    text-align:center;
    pointer-events:none;
    box-shadow:0 0 8px #4fc3ff66;
}
.default-input {
    margin: 3px 0px;
    padding: 4px;
    font: 1em 'Roboto', sans-serif;
    border-radius: 5px;
    border: 2px solid #10072b;
    background-color: rgba(255, 255, 255);
    color: rgb(0, 0, 0);
}
.default-slider {
    margin: 3px 0px;
    padding: 2px;
    font: 1em 'Roboto', sans-serif;
    border-radius: 5px;
    border: 2px solid #10072b;
    background-color: rgba(255, 255, 255);
    color: rgb(0, 0, 0);
}
.default-button {
    margin: 3px 0px;
    padding: 4px;
    font: 1em 'Roboto', sans-serif;
    border-radius: 5px;
    border: 2px solid #10072b;
    background-color: rgba(255, 255, 255);
    color: rgb(0, 0, 0);
    cursor: pointer;
}
.default-button:hover {
    background-color: #10072b;
    color: rgb(255, 255, 255);
}
.default-button:active {
    border: 2px solid rgb(255, 255, 255);
    background-color: #10072b;
    color: rgb(255, 255, 255);
}
.default-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.95);
    border-radius: 10px;
    border: 4px solid #10072b;
    padding: 20px;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.1s ease-in-out;
    width: 90vw;
    height: 90vh;
}
.default-popup h1 {
    font-family: 'Ultimatum-Bold', sans-serif;
    font-size: 2rem;
    text-align: left;
    margin: 10px;
    display: block;
    text-shadow: 
        3px 3px 3px #000,
        -3px 3px 3px #000,
        3px -3px 3px #000,
        -3px -3px 3px #000;
    color: white;
}
.default-popup h2 {
    font-family: 'Ultimatum-Bold', sans-serif;
    font-size: 1.5rem;
    text-align: left;
    margin: 10px;
    display: block;
    text-shadow: 
        3px 3px 3px #000,
        -3px 3px 3px #000,
        3px -3px 3px #000,
        -3px -3px 3px #000;
    color: white;
}
.frame-category {
    width: 100%;
}
.frame-image {
    width: 125px;
    height: auto;
    cursor: pointer;
    margin-bottom: 10px;
}
.credits-button {
    background: #10072b;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 8px;
    padding: 6px 10px;
    font-family: 'Roboto', sans-serif;
    font-size: 1em;
    cursor: default;
    box-shadow: 2px 2px 8px #0006;
    user-select: none;
    margin: 10px;
    text-align: center;
    width: fit-content;
    align-self: flex-start;
}
.credits-popup {
    position: fixed;
    bottom: 10px;
    left: 10px;
    background: rgba(16,7,43,1);
    color: #fff;
    border: 2px solid #fff;
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 0.95em;
    width: fit-content;
    min-width: 200px;
    max-width: 300px;
    white-space: pre-line;
    background-clip: padding-box;
    box-shadow: 2px 2px 12px #000a;
    z-index: 1100;
    visibility: hidden;
}
.patreon-logo {
    filter: invert(1);
    transition: filter 0.2s;
}
a.default-button:hover .patreon-logo,
a.default-button:focus .patreon-logo {
    filter: invert(0);
}
/* Preview (canvas) drag & drop zones */
.preview-drop-zone {
    position: absolute;
    left: 10px; /* inside padding */
    right: 10px;
    border: 2px dashed #4fc3ffAA;
    border-radius: 8px;
    color: #ffffffcc;
    font: 600 0.9rem 'Roboto', sans-serif;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none; /* default off so canvas interactions unaffected */
    opacity: 0; /* hidden until drag */
    transition: opacity 0.15s;
    backdrop-filter: blur(2px);
}
.preview-drop-zone.active { opacity: 1; }
/* Frame break at very top, title at bottom, main fills center */
#frameBreakDropZone { top: 10px; height: 120px; }
#titleImageDropZone { height: 120px; bottom: 10px; }
/* Main zone stretches between the two fixed-height zones */
#mainImageDropZone { top: 130px; bottom: 130px; }
/* When user is dragging files, enable pointer so drops register */
.drop-mode .preview-drop-zone { pointer-events: auto; }
.preview-drop-zone.highlight { background: rgba(79,195,255,0.15); border-color:#b3e0ff; color:#fff; }