body {
    background-color: #333;
    color: #eee;
    font-family: 'Roboto Condensed', sans-serif;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
}

.container {
    background-color: #222;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #444;
    width: 100%;
    max-width: 1100px;
    box-sizing: border-box;
}

h1 {
    text-align: center;
    color: #ff9800;
    margin-bottom: 5px;
}

.total-rolls {
    text-align: center;
    font-size: 1.1em;
    color: #ccc;
    margin-top: 0;
    margin-bottom: 20px;
}

.total-rolls span {
    color: #ff9800;
    font-weight: bold;
}

.controls {
    text-align: center;
    margin-bottom: 10px;
}

.controls label {
    margin-right: 10px;
    vertical-align: middle;
}

.controls input {
    width: 60px;
    padding: 5px;
    background-color: #444;
    border: 1px solid #666;
    color: #eee;
    border-radius: 4px;
}

.controls input[type="checkbox"] {
    margin-left: 10px;
    vertical-align: middle;
}

.main-content {
    display: flex;
    gap: 20px;
    align-items: center;
}

.hover-info-panel {
    width: 250px;
}

.equipment-grid {
    display: grid;
    grid-template-columns: repeat(3, 80px);
    grid-template-rows: repeat(5, 80px);
    gap: 10px;
    justify-content: center;
}

.slot {
    background-color: #444;
    border: 2px solid #555;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.2s, border-color 0.2s;
}

.slot:hover {
    background-color: #5a5a5a;
    border-color: #777;
}

.slot img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    image-rendering: pixelated;
}

.roll-counter {
    position: absolute;
    top: 2px;
    right: 5px;
    font-size: 14px;
    color: #ff9800;
    font-weight: bold;
}

.item-display, #total-stats {
    background-color: rgba(20, 20, 20, 0.9);
    border: 1px solid #666;
    padding: 15px;
    border-radius: 6px;
}

.item-display {
    flex-grow: 1;
}

.item-display h3, #total-stats h3 {
    text-align: center;
    margin-top: 0;
    color: #ff9800;
    font-size: 1.2em;
    margin-bottom: 10px;
}

#item-name {
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
    color: #ffcc00;
    min-height: 22px;
    font-size: 1.1em;
}

#loading-message {
    text-align: center;
    color: #ff9800;
}

.hidden {
    display: none;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 20px;
}

.stat-category {
    grid-column: span 2;
    font-weight: bold;
    color: #ff9800;
    margin-top: 10px;
    border-bottom: 1px solid #444;
    padding-bottom: 5px;
}

.stat {
    color: #ddd;
}

#total-stats {
    margin-top: 20px;
}

.tooltip {
    background-color: rgba(20, 20, 20, 0.9);
    border: 1px solid #666;
    border-radius: 5px;
    padding: 10px;
    width: 100%;
    color: #eee;
    font-size: 14px;
    visibility: hidden;
    box-sizing: border-box;
}

.tooltip-name {
    color: #ffcc00;
    font-weight: bold;
    font-size: 16px;
    margin: 0 0 10px 0;
    padding-bottom: 5px;
    border-bottom: 1px solid #444;
}

.tooltip-stat {
    margin: 4px 0;
}

/* 2h warning over shield catg */
.warning-indicator {
    position: absolute;
    top: 2px;
    left: 5px;
    font-size: 30px;
    color: red;
    font-weight: bold;
    z-index: 10;
}


@media (max-width: 1120px) {
    .main-content {
        flex-direction: column;
        align-items: stretch;
    }

    .hover-info-panel {
        width: 100%;
        display: none;
    }
}

/* mobile */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 10px;
    }

    h1 {
        font-size: 1.5em;
    }

    .equipment-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: auto;
        gap: 10px;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .slot {
        aspect-ratio: 1 / 1;
        height: auto;
    }

    .slot img {
        width: 80%;
        height: 80%;
    }

    .stats-grid {
        grid-template-columns: 1fr; /* stacks stats in single column */
        gap: 5px 10px;
    }

    .stat-category {
        grid-column: span 1;
    }
}