@font-face { font-family: FiraCode; src: url('../res/FiraCode.ttf'); }

* {
    margin: 0;
    padding: 0;
    color: white;
}

html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    background-color: #262626;
    font-family: FiraCode;
}

.main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.help {
    margin: 20px 0;
}

.head {
    width: 96%;
    margin: 20px 2%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    max-width: 1024px;
}

input[type="text"] {
    font-family: inherit;
    background: none;
    border: none;
    border-style: solid;
    border-width: 1px;
    border-color: #777777;
    text-align: center;
    font-size: 1.25rem;
    margin-bottom: 10px;
    padding: 5px 0;
}

button {
    font-family: inherit;
    background-color: rgb(119, 119, 119);
    border-radius: 8px;
    border-width: 0;
    color: white;
    cursor: pointer;
    display: inline-block;
    margin: 0;
    padding: 10px 12px;
    text-align: center;
    vertical-align: baseline;
}

.menu {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 10px 0;
}

.submenu {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    margin: 5px 0;
}
.submenu > * {
    margin: 5px 5px;
}

.submenu--bordered {
    border: 1px dashed #444;
    border-radius: 8px;
    width: calc(100% - 32px);
    padding: 8px 0;
    position: relative;
}

.submenu__title {
    position: absolute;
    top: -14px;
    left: 8px;
    background-color: #262626;
    font-size: 12px;
    color: #aaa;
    padding: 0 4px;
}

.helpbox {
    max-width: 800px;
}

#preview p {
    margin: 4px;
    color: #999999;
}

#preview-text {
    font-size: 1.25rem;
    white-space: pre-wrap;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #262626;
    margin: 5% auto;
    padding: 0;
    border: 1px solid #777;
    border-radius: 8px;
    width: 80%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #444;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: white;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: white;
}

.modal-body {
    padding: 20px;
}

.color-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    max-width: 800px;
    margin: 0 auto;
}

.color-square {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 2px;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 5px;
    background-color: #333;
}

.color-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #444;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.color-btn:hover {
    border-color: #fff;
    transform: scale(1.1);
}