html, body {
    height: 100% !important;
    background: #121212 !important;
    color: #e0e0e0 !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

h3, h4, h5 {
    font-weight: bold !important;
    margin-bottom: 0.5rem;
    color: #f5f5f5 !important;
}

.container {
    max-width: 1400px;
    margin: 20px auto;
    background: #181818;
    padding: 2.5% !important;
    border-radius: 12px;
    border: 1px solid #333333;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

textarea#pgn, input#link {
    background-color: #121212;
    border: 1px solid #444444;
    color: #e0e0e0;
    font-size: 1.05rem;
    border-radius: 6px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    resize: vertical;
}

textarea#pgn:focus, input#link:focus {
    border-color: #888888;
    outline: none;
    background-color: #1a1a1a;
    box-shadow: 0 0 0 2px rgba(136, 136, 136, 0.2);
}

.btn-primary {
    background-color: #e0e0e0;
    border-color: #e0e0e0;
    color: #121212;
    font-weight: 600;
    padding: 0.5rem 1.4rem;
    border-radius: 8px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #b0b0b0;
    border-color: #b0b0b0;
    color: #121212;
    box-shadow: 0 0 8px rgba(224, 224, 224, 0.3);
}

#status.alert {
    font-weight: 600;
    font-size: 1.1rem;
    margin-top: 1rem;
    border-radius: 8px;
    background-color: #181818;
    color: #e0e0e0;
    border: 1px solid #444444;
}

#box {
    background: #181818;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid #333333;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0;
    width: 100%;
    height: auto;
}

#board-container {
    width: 50%;
    padding: 0 1.5% 0 0;
}

#charts canvas {
    max-width: 100%;
    background: #181818;
    border-radius: 10px;
    padding: 15px;
    border: 1px solid #333333;
}

#move-counter {
    background-color: #121212;
    color: #e0e0e0;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid #444444;
    padding: 0.6rem 1.2rem;
    font-size: 1.1rem;
    width: auto;
    white-space: nowrap;
}

.board-btn {
    width: auto;
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    font-size: 1.2rem;
    background-color: #e0e0e0;
    color: #121212;
    border: 1px solid #e0e0e0;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.board-btn:hover {
    background-color: #b0b0b0;
    color: #121212;
}

.text-muted {
    color: #888888 !important;
    font-weight: 600;
}

p.ms-2, ul, ol {
    font-size: 0.95rem;
    color: #cccccc;
    margin-left: 1rem;
}

a.btn {
    margin-right: 10px;
    font-weight: 600;
}

a.btn-dark, .btn-dark {
    background-color: #e0e0e0 !important;
    border-color: #e0e0e0 !important;
    color: #121212 !important;
    font-weight: 600;
    padding: 0.5rem 1.4rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
}

a.btn-dark:hover,
a.btn-dark:focus,
.btn-dark:hover {
    background-color: #b0b0b0 !important;
    border-color: #b0b0b0 !important;
    color: #121212 !important;
}

a.btn-primary {
    background-color: #e0e0e0;
    border-color: #e0e0e0;
    color: #121212;
}

a.btn-primary:hover {
    background-color: #b0b0b0;
    border-color: #b0b0b0;
    color: #121212;
}

h5 {
    margin-bottom: 0;
    margin-top: 40px;
    color: #f5f5f5;
}

textarea {
    resize: vertical;
}

.form-control {
    border-radius: 0.375rem 0 0 0.375rem !important;
    border: 1px solid #444444;
}

#board {
    width: 100%;
    aspect-ratio: 1 / 1;
}

#collapse-container {
    width: 100%;
    padding: 0;
    margin: 0;
}

#charts {
    width: 50%;
    padding: 0;
}

p {
    font-size: 20px !important;
}

li {
    font-size: 20px !important;
}
