* {
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    background: #121212;
    color: #fff;
    text-align: center;
    margin: 0;
    padding: 15px;
}

h1 {
    color: #e50914;
    margin: 10px 0 2px 0;
    letter-spacing: 1px;
}

p {
    color: #aaa;
    font-size: 14px;
    margin-bottom: 12px;
}

.title-header {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.info-button {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1px solid #aaa;
    border-radius: 50%;
    background: transparent;
    color: #aaa;
    font-family: Georgia, serif;
    font-size: 15px;
    font-style: italic;
    line-height: 20px;
}

.info-button:hover {
    border-color: #fff;
    color: #fff;
}

.info-modal {
    width: min(420px, calc(100% - 32px));
    padding: 24px;
    border: 1px solid #444;
    border-radius: 10px;
    background: #222;
    color: #fff;
    text-align: left;
}

.info-modal::backdrop {
    background: rgb(0 0 0 / 70%);
}

.info-modal h2 {
    margin: 0 0 12px;
    color: #e50914;
    font-size: 20px;
}

.info-modal p {
    line-height: 1.5;
}

.info-modal form {
    text-align: right;
}

.menu-bar {
    font-size: 13px;
    margin-bottom: 15px;
    color: #777;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.menu-bar a {
    color: #888;
    text-decoration: underline;
    cursor: pointer;
}

.menu-bar a:hover {
    color: #fff;
}

.menu-bar label {
    font-size: 12px;
    color: #aaa;
}

.menu-bar input[type="number"] {
    width: 60px;
    padding: 3px 5px;
    font-size: 12px;
    background: #222;
    border: 1px solid #444;
    color: #fff;
    border-radius: 4px;
    text-align: center;
}

.last-update {
    font-size: 12px;
    color: #777;
    margin-bottom: 15px;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 0 0 20px 0;
    flex-wrap: nowrap;
    white-space: nowrap;
}

input[type="text"] {
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #444;
    background: #222;
    color: #fff;
    font-size: 15px;
    width: 220px;
    text-align: center;
}

.controls input[type="text"] {
    width: auto;
    flex: 1 1 0;
    min-width: 0;
    max-width: 220px;
}

.controls button {
    flex: 0 0 auto;
}

button {
    padding: 10px 15px;
    border-radius: 6px;
    border: none;
    background: #333;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
}

button.active {
    background: #e50914;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(65px, 1fr));
    gap: 8px;
}

.box {
    background: #2a2a2a;
    padding: 8px 4px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    border: 1px solid #333;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 55px;
}

.box .num {
    font-size: 14px;
}

.box .title {
    font-size: 9px;
    font-weight: normal;
    color: #bbb;
    margin-top: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.box.owned {
    background: #2e7d32;
    border-color: #4caf50;
    color: #fff;
}

.box.owned .title {
    color: #e0e0e0;
}

.box.highlight {
    outline: 3px solid #ffeb3b;
    border-color: #ffeb3b;
}
