@font-face {
  font-family: 'OpenDyslexic';
  src: url('/OpenDyslexic-Bold.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

body {
    font-family: 'OpenDyslexic', sans-serif;
    background-color: #282c34;
    color: #e0e0e0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    gap: 20px;
    margin: 0;
    min-height: 100vh;
    box-sizing: border-box;
}

h1 {
    color: #4CAF50;
    margin-bottom: 10px;
}

.instructions {
    font-size: 1.1em;
    text-align: center;
    max-width: 600px;
}

.inline-element-icon {
    height: 1.2em; /* Adjust size relative to font-size */
    vertical-align: middle; /* Align with text baseline */
    margin-left: 5px; /* Space between text and icon */
    margin-right: 5px;
}

/* New styles for categories */
.element-categories-container {
    display: flex;
    flex-direction: column; /* Stack categories vertically on smaller screens */
    gap: 30px;
    margin-top: 20px;
    width: 100%;
    max-width: 800px;
    align-items: center; /* Center categories horizontally */
}

.element-category {
    background-color: #3a3f47;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
    width: 100%; /* Take full width of container */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.element-category-title {
    color: #FFC107;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.5em;
    text-align: center;
}

.element-selection {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    /* margin-top: 20px; */ /* Removed as categories now handle spacing */
    max-width: 800px; /* Still useful for individual rows */
}

.element-selection img {
    width: 100px;
    height: 100px;
    border: 3px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    padding: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Specific background colors for each element */
.element-air {
    background-color: #FFFFAA; /* Light Yellow */
}

.element-earth {
    background-color: #808080; /* Grey */
}

.element-water {
    background-color: #4682B4; /* Steel Blue */
}

.element-plant {
    background-color: #6B8E23; /* Olive Drab */
}

.element-cold {
    background-color: #ADD8E6; /* Light Blue */
}

.element-fire {
    background-color: #E65A20; /* Burnt Orange */
}

.element-faerie {
    background-color: #9370DB; /* Medium Purple */
}

.element-psychic {
    background-color: #FF69B4; /* Hot Pink */
}

.element-bone {
    background-color: #D2B48C; /* Tan */
}

.element-light {
    background-color: #FFD700; /* Gold */
}

/* Ethereal Elements */
.element-shadow {
    background-color: #555555; /* Dark Grey */
}

.element-plasma {
    background-color: #8A2BE2; /* Blue Violet */
}

.element-poison {
    background-color: #7CFC00; /* Lawn Green */
}

.element-crystal {
    background-color: #00CED1; /* Dark Turquoise */
}

.element-mech {
    background-color: #A9A9A9; /* Dark Grey */
}

/* Primordial Elements */
.element-primordial-plant {
    background-color: #507C3F; /* Darker Olive */
}

.element-primordial-cold {
    background-color: #87CEEB; /* Sky Blue */
}

.element-primordial-air {
    background-color: #DAA520; /* Goldenrod */
}

.element-primordial-water {
    background-color: #6A5ACD; /* Slate Blue */
}

.element-primordial-earth {
    background-color: #A0522D; /* Sienna */
}

/* Pairanormals Elements */
.element-control {
    background-color: #DAA520; /* Goldenrod */
}

.element-hoax {
    background-color: #87CEEB; /* Sky Blue */
}

/* Supernatural Elements */
.element-electricity {
    background-color: #00BFFF; /* Deep Sky Blue */
}

/* New Special Elements */
.element-dipster {
    background-color: #F0E68C; /* Khaki */
}

.element-dream {
    background-color: #483D8B; /* Dark Slate Blue */
}

.element-celestial {
    background-color: #87CEEB; /* Sky Blue */
}

.element-legendary {
    background-color: #FFD700; /* Gold */
}

.element-mythical {
    background-color: #DA70D6; /* Orchid */
}

.element-tiransoul {
    background-color: #EE82EE; /* Violet */
}

.element-candy {
    background-color: #FF1493; /* DeepPink */
}

.element-organ {
    background-color: #8B0000; /* DarkRed */
}

/* The Lost Landscapes Elements */
.element-undead {
    background-color: #008080; /* Teal */
}

.element-supercelestial {
    background-color: #6495ED; /* CornflowerBlue */
}

.element-nightmare {
    background-color: #8B008B; /* DarkMagenta */
}

.element-knottshurr {
    background-color: #191970; /* MidnightBlue */
}

/* Seasonal Elements */
.element-feast-ember {
    background-color: #A0522D; /* Sienna */
}

.element-festival-of-yay {
    background-color: #B22222; /* Firebrick */
}

.element-season-of-love {
    background-color: #FF69B4; /* Hot Pink */
}

.element-beat-hereafter {
    background-color: #D2B48C; /* Tan */
}

.element-summer-song {
    background-color: #FFD700; /* Gold */
}

.element-mindboggle {
    background-color: #8B4513; /* SaddleBrown */
}

.element-eggs-travaganza {
    background-color: #FF8C00; /* DarkOrange */
}

.element-echoes-of-eco {
    background-color: #6B8E23; /* Olive Drab */
}

.element-anniversary-month {
    background-color: #800080; /* Purple */
}

.element-spooktacle {
    background-color: #FF8C00; /* DarkOrange */
}

.element-skypainting {
    background-color: #6A5ACD; /* Slate Blue */
}

.element-life-formula {
    background-color: #00CED1; /* Dark Turquoise */
}

.element-perplexplore {
    background-color: #F0E68C; /* Khaki */
}

/* The Wanderverse Elements */
.element-exotic {
    background-color: #FFA500; /* Orange */
}

.element-floral {
    background-color: #B22222; /* Firebrick */
}

.element-chrono {
    background-color: #C0C0C0; /* Silver */
}

.element-fossil {
    background-color: #A0522D; /* Sienna */
}

.element-mutation {
    background-color: #008000; /* Green */
}

.element-explosive {
    background-color: #FF4500; /* OrangeRed */
}

.element-starstruck {
    background-color: #8A2BE2; /* BlueViolet */
}

.element-selection img:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5);
}

.element-selection img.selected {
    border-color: #4CAF50;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.8);
    transform: scale(1.05);
}

.selected-elements-display {
    background-color: #3a3f47;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 1.1em;
    min-width: 300px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

button {
    background-color: #4CAF50;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1.2em;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, transform 0.1s ease-in-out;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

button:hover:not(:disabled) {
    background-color: #45a049;
    transform: translateY(-2px);
}

button:disabled {
    background-color: #666;
    cursor: not-allowed;
    box-shadow: none;
}

.monster-output {
    background-color: #3a3f47;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    min-width: 300px;
    max-width: 600px;
    text-align: center;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
    line-height: 1.6;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.monster-output h2 {
    color: #FFC107;
    margin-top: 0;
    margin-bottom: 10px;
}

.monster-output p {
    margin-bottom: 8px;
}

.monster-output strong {
    color: #FFEB3B;
}

.monster-output .monster-image {
    max-width: 150px; /* Adjust size as needed */
    height: auto;
    margin-bottom: 15px;
    border-radius: 10px; /* Optional: slight border-radius for the image */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* Optional: shadow for the image */
}

.monster-output .monster-egg-image {
    max-width: 80px; /* Smaller than monster */
    height: auto;
    margin-bottom: 10px; /* Space between egg and monster */
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Settings Button */
.settings-button {
    background-color: #555;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, transform 0.1s ease-in-out;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    margin-top: 20px; /* Space from other elements */
}

.settings-button:hover {
    background-color: #666;
    transform: translateY(-2px);
}

/* Modal styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 100; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.7); /* Black w/ opacity */
    display: flex; /* Use flexbox for centering */
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #3a3f47;
    margin: auto;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
    width: 80%; /* Could be responsive */
    max-width: 400px;
    position: relative;
    color: #e0e0e0;
}

.modal-content h2 {
    color: #FFC107;
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
    transition: color 0.2s;
}

.close-button:hover,
.close-button:focus {
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 1.1em;
}

/* Basic toggle switch styling */
.setting-item input[type="checkbox"] {
    position: relative;
    width: 40px;
    height: 20px;
    -webkit-appearance: none;
    appearance: none;
    background: #ccc;
    outline: none;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.setting-item input[type="checkbox"]::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    top: 2px;
    left: 2px;
    transition: left 0.2s;
}

.setting-item input[type="checkbox"]:checked {
    background: #4CAF50;
}

.setting-item input[type="checkbox"]:checked::before {
    left: 22px;
}

@media (max-width: 768px) {
    .element-selection {
        gap: 10px;
    }
    .element-selection img {
        width: 80px;
        height: 80px;
    }
    h1 {
        font-size: 1.8em;
    }
    .instructions {
        font-size: 1em;
    }
    button {
        padding: 10px 20px;
        font-size: 1em;
    }
    .monster-output {
        padding: 15px;
        min-width: unset;
        width: 90%;
    }
    .element-categories-container {
        gap: 20px; /* Reduce gap between categories on smaller screens */
    }
    .element-category-title {
        font-size: 1.3em;
    }
}