body {
    background-color: #0f0f0f;
    background-image: radial-gradient(circle at 2px 2px, #222 1px, transparent 0);
    background-size: 24px 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    color: #e0e0e0;
    font-family: 'Cinzel', serif;
}


.manuscript-container {
    width: 90vw;
    max-width: 900px;
    padding: 20px;
    animation: fadeIn 1.5s ease-in;
}

.manuscript {
    background: #1a1a1a;
    border: 10px solid #333;
    box-shadow: 0 0 0 4px #555, 0 0 40px rgba(0, 0, 0, 0.9);
    padding: 40px;
    position: relative;
    border-radius: 2px;
    z-index: 1;
}

.manuscript::before {
    content: "";
    position: absolute;
    top: -5px;
    left: -5px;
    width: calc(100% + 10px);
    height: calc(100% + 10px);

    background-image:
        radial-gradient(circle, #777 3px, #222 5px, transparent 6px),
        radial-gradient(circle, #777 3px, #222 5px, transparent 6px),
        radial-gradient(circle, #777 3px, #222 5px, transparent 6px),
        radial-gradient(circle, #777 3px, #222 5px, transparent 6px);


    background-position:
        0 0,
        100% 0,
        0 100%,
        100% 100%;

    background-repeat: no-repeat;
    background-size: 12px 12px;
    pointer-events: none;
    z-index: 2;
}

.lore-header,
.lore-content,
.class-selection,
.modal-body {
    position: relative;
    z-index: 3;
}


.game-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 3rem;
    text-align: center;
    color: #fff;
    text-shadow: 4px 4px 0px #444;
    margin-bottom: 10px;
}

.subtitle {
    text-align: center;
    color: #972f15;
    font-weight: bold;
    letter-spacing: 2px;
}

.lore-content {
    margin: 30px 0;
    line-height: 1.6;
    border-bottom: 1px solid #333;
    padding-bottom: 20px;
}

.options-container {
    display: flex;
    gap: 20px;
    margin: 30px 0;
}

.class-card {
    flex: 1;
    cursor: pointer;
}

.class-card input {
    display: none;
}

.card-content {
    background: #222;
    border: 2px solid #444;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.class-card input:checked+.card-content {
    border-color: #ffcc00;
    background: #2a2a2a;
    box-shadow: 0 0 15px rgba(255, 204, 0, 0.2);
    transform: translateY(-5px);
}

.class-card h4 {
    margin: 10px 0;
    color: #ffcc00;
}

.class-card p {
    font-size: 0.8rem;
    margin: 5px 0;
}

.sign-button {
    display: block;
    width: 100%;
    background: linear-gradient(to bottom, #444, #222);
    color: white;
    padding: 20px;
    border: 2px solid #666;
    font-family: 'Press Start 2P', cursive;
    cursor: pointer;
    transition: 0.2s;
}

.sign-button:hover {
    background: #713e31;
    border-color: #ffcc00;
    transform: scale(1.02);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/***************************/
/***** MODAL AND BUTTON ****/
/***************************/


.help-button {
    background: transparent;
    color: #972f15;
    border: 1px solid #972f15;
    font-family: 'Cinzel', serif;
    font-weight: bold;
    cursor: pointer;
    padding: 5px 15px;
    transition: 0.3s;
    letter-spacing: 1px;
}

.help-button:hover {
    background: #972f15;
    color: #fff;
    box-shadow: 0 0 10px rgba(151, 47, 21, 0.5);
}


.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
}


.modal-content {
    margin: 5% auto;
    width: 80%;
    max-width: 600px;
    animation: fadeIn 0.4s ease-out;
}

.modal-title {
    color: #ffcc00;
    font-family: 'Cinzel', serif;
    text-align: center;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
}

.modal-body h3 {
    color: #972f15;
    font-size: 1.1rem;
    margin-top: 20px;
}

.controls-list li {
    margin-bottom: 15px;
    list-style: none;
}

.controls-list strong {
    color: #ffcc00;
    background: #333;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid #555;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    margin-right: 5px;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 10px;
    color: #666;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close-modal:hover {
    color: #ffcc00;
}