* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    height: 100vh;
    display: flex;
    flex-direction: column;
    transition: all 0.1s;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    color: #414141;
    border-bottom: 1px solid #ddd;
    user-select: none;
}

header h2 {
    background-color: dodgerblue;
    border: none;
    border-radius: 12px;
    box-shadow: 0 0 4px 2px #4141412d;
    color: #fff;
    font-weight: bold;
    margin-left: 8px;
    padding: 8px 12px;
    transition: all 0.1s;
}

main {
    flex: 1;
    display: flex;
    overflow: hidden;
}

footer {
    color: #414141;
    border-top: 1px solid #ddd;
    background-color: #f8f9fa;
    padding: 24px 32px 16px;
    font-size: 14px;
    line-height: 1.5;
}

.footer-container {
    max-width: 1200px;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 24px;
}

.footer-col {
    flex: 1;
    min-width: 200px;
}

.footer-col.brand-col {
    flex: 2;
    min-width: 280px;
}

.footer-col h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #111;
}

.footer-col h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-col p {
    margin: 0 0 8px 0;
    color: #666;
}

.footer-col p.copyright {
    margin-top: 12px;
    font-size: 13px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: #2c30f5;
    transition: opacity 0.2s ease;
}

.footer-links a:hover {
    text-decoration: underline;
    opacity: 0.85;
}

a {
    color: #2c30f5;
    text-decoration: none;
}

code {
    transition: all 0.1s;
}

#editor,
#preview {
    width: 50%;
    padding: 16px;
    overflow-y: auto;
    transition: all 0.1s;
}

#editor {
    border: none;
    resize: none;
    outline: none;
    font-family: monospace;
    font-size: 15px;
    color: #2e2e2e;
    border-right: 1px solid #ddd;
}

#preview {
    color: #2e2e2e;
    background-color: #fafafa;
}

button {
    background-color: dodgerblue;
    border: none;
    border-radius: 12px;
    box-shadow: 0 0 4px 2px #4141412d;
    color: #fff;
    font-weight: bold;
    margin-left: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.1s;
}

button:hover {
    background-color: #4b81b8;
    transform: translateY(-5px) scale(1.1);
    box-shadow: 2px 5px 4px 2px #41414151;
}

button:active {
    background-color: #1c5085;
    transform: translateY(0) scale(0.9);
    box-shadow: 0 0 4px 2px #41414151;
}

body.dark {
    background-color: #2e2e2e;
}

body.dark button {
    box-shadow: 0 0 4px 2px #dddddd2d;
}

body.dark button:hover {
    box-shadow: 2px 5px 4px 2px #dddddd2d;
}

body.dark button:active {
    box-shadow: 0px 0px 4px 2px #dddddd2d;
}

body.dark header {
    border-bottom: 1px solid #808080;
    box-shadow: 0 0 4px 2px #dddddd2d;
}
body.dark #stats {
    color: #ddd;
}

body.dark footer {
    background-color: #242424;
    color: #ddd;
    border-top: 1px solid #444;
}

body.dark .footer-col h3,
body.dark .footer-col h4 {
    color: #fff;
}

body.dark .footer-col p {
    color: #aaa;
}

/* body.dark .footer-links a {
    color: #5c9fe2
} */

body.dark #editor {
    background-color: #2e2e2e;
    color: #ddd;
    border-right: 1px solid #808080;
}

body.dark #preview {
    background-color: #2e2e2e;
    color: #ddd;
}

body.dark a {
    color: #5c9fe2;
}