body {
    background-color: transparent;
    color: white;
    font-family: 'Minecraft', sans-serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.minecraft-window {
    background-color: rgba(0, 0, 0, 0.7);
    border: 4px solid var(--minecraft-border);
    border-radius: 0;
    padding: 0;
    box-shadow: inset 0 0 0 4px #141414;
    min-height: 100vh;
}

.minecraft-window-title {
    background-color: #3C5E91;
    padding: 5px 10px;
    border-bottom: 4px solid var(--minecraft-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.minecraft-window-title h1 {
    margin: 0;
    color: white;
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 2px 2px #000;
}

.minecraft-content {
    padding: 16px;
    background-color: rgba(50, 50, 50, 0.8);
}

.category-summary {
    background-color: rgba(40, 40, 40, 0.8);
    border: 2px solid #636363;
    box-shadow: inset 0 0 0 2px #141414;
    margin-bottom: 20px;
    padding: 15px;
}

.minecraft-table {
    width: 100%;
    border-collapse: collapse;
}

.minecraft-table th,
.minecraft-table td {
    padding: 12px;
    text-align: left;
    border: 1px solid #636363;
}

.minecraft-table th {
    background-color: rgba(60, 94, 145, 0.8);
    color: var(--minecraft-gold);
    text-shadow: 1px 1px #000;
}

.minecraft-table tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.3);
}

.minecraft-table tr:hover {
    background-color: rgba(221, 187, 53, 0.1);
}

.stat {
    background-color: rgba(0, 0, 0, 0.6);
    border: 2px solid #636363;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: inset 0 0 0 1px #141414;
    transition: all 0.2s;
}

.stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.stat-label {
    color: var(--minecraft-gold);
    font-size: 14px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    text-shadow: 1px 1px #000;
}

.stat-value {
    font-size: 20px;
    color: var(--minecraft-light);
    text-shadow: 1px 1px 0 #000;
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

/* Add more spacing between items and improve responsiveness */
@media (max-width: 768px) {
    .items-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 10px;
    }
    
    .minecraft-tabs {
        flex-direction: column;
    }
    
    .stats-header {
        grid-template-columns: 1fr;
    }
    
    .item-card {
        height: auto;
        min-height: 120px;
    }
}

@media (min-width: 1200px) {
    .items-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 20px;
    }
}

/* Item initials for visual identification */
.item-initial {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    margin-right: 10px;
    background-color: rgba(62, 113, 179, 0.3);
    color: var(--minecraft-gold);
    font-weight: bold;
    font-size: 18px;
    border: 1px solid #555;
    box-shadow: inset 0 0 0 1px #141414;
}

/* Enhance item details display */
.item-details {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.item-name {
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
    color: var(--minecraft-gold);
    font-weight: bold;
    line-height: 1.2;
    text-shadow: 1px 1px #000;
}

/* Color code for category types */
.category-color {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
}

.stat-prefix {
    font-weight: normal;
    opacity: 0.8;
    margin-right: 5px;
}

.item-card {
    background-color: rgba(40, 40, 40, 0.8);
    border: 2px solid #636363;
    padding: 15px;
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 120px; /* Fixed height for consistency */
    box-shadow: inset 0 0 0 1px #141414;
}

.item-card:hover {
    border-color: var(--minecraft-gold);
    background-color: rgba(50, 50, 50, 0.9);
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

.item-category-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    border-radius: 4px 0 0 4px;
}

.item-category {
    font-size: 12px;
    color: #aaa;
    margin-top: 5px;
}

.item-sold {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #444;
    padding-top: 8px;
    margin-top: auto;
}

.item-sold .stat-label {
    display: flex;
    align-items: center;
    color: #ffd700;
    font-size: 14px;
}

.item-sold .stat-value {
    font-size: 18px;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Category color indicators */
.category-CROPS .item-category-indicator { background-color: #8BC34A; }
.category-ORES .item-category-indicator { background-color: #607D8B; }
.category-MOBS_DROPS .item-category-indicator { background-color: #FF5722; }
.category-FISH .item-category-indicator { background-color: #03A9F4; }
.category-BLOCKS .item-category-indicator { background-color: #795548; }
.category-NATURAL_ITEMS .item-category-indicator { background-color: #4CAF50; }
.category-ARMOR_AND_TOOLS .item-category-indicator { background-color: #673AB7; }
.category-ENCHANTED_BOOKS .item-category-indicator { background-color: #9C27B0; }
.category-POTIONS .item-category-indicator { background-color: #E91E63; }

.minecraft-tabs {
    display: flex;
    background-color: #2C2C2C;
    padding: 0 10px;
    border-bottom: none;
    margin-bottom: 20px;
}

.minecraft-tab {
    background-color: #555;
    color: #DDD;
    border: 2px solid #636363;
    border-bottom: none;
    padding: 10px 15px;
    margin-right: 4px;
    cursor: pointer;
    position: relative;
    top: 2px;
    font-family: 'Minecraft', monospace;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 14px;
    text-shadow: 1px 1px #000;
}

.minecraft-tab:hover {
    background-color: #666;
}

.minecraft-tab.active {
    background-color: rgba(50, 50, 50, 0.9);
    border-bottom-color: transparent;
    z-index: 2;
    color: var(--minecraft-gold);
}

.tab-content {
    background-color: #2A2A2A;
    padding: 20px;
    border-top: none;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.minecraft-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 4px;
}

.page-info {
    background-color: rgba(0, 0, 0, 0.4);
    padding: 8px 12px;
    border: 2px solid var(--minecraft-border);
    color: var(--minecraft-light);
    font-family: 'Minecraft', monospace;
    text-shadow: 1px 1px #000;
}

.minecraft-button {
    background-color: rgba(0, 0, 0, 0.6);
    border: 1px solid #3a3a3a;
    color: #ffd700;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.minecraft-button:hover {
    background-color: rgba(255, 215, 0, 0.2);
    border-color: #ffd700;
}

.stats-header {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: rgba(0, 0, 0, 0.6);
    border: 1px solid #3a3a3a;
    padding: 15px;
    border-radius: 4px;
}

.stat-card .stat-label {
    font-size: 14px;
    color: #ffd700;
    margin-bottom: 10px;
}

.stat-card .stat-value {
    font-size: 24px;
    color: white;
}

h2 {
    color: #ffd700;
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #3a3a3a;
}

.page-title {
    color: #ffd700;
    font-size: 24px;
    text-align: center;
    margin: 20px 0;
    text-transform: uppercase;
}

.categories-content {
    margin-top: 30px;
}

.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 20px;
}

.category-tabs .tab {
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid #3a3a3a;
    color: #CCCCCC;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.category-tabs .tab:hover {
    background-color: rgba(255, 215, 0, 0.1);
    border-color: #ffd700;
    color: #ffd700;
}

.category-tabs .tab.active {
    background-color: rgba(255, 215, 0, 0.2);
    border-color: #ffd700;
    color: #ffd700;
}

.search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    padding: 15px;
    border-radius: 4px;
}

.search-input {
    flex: 1;
    background-color: rgba(0, 0, 0, 0.6);
    border: 1px solid #3a3a3a;
    color: white;
    padding: 8px 16px;
    font-family: 'Minecraft', sans-serif;
    border-radius: 0;
}

.search-input:focus {
    border-color: #ffd700;
    outline: none;
}

.search-button {
    white-space: nowrap;
}

.reset-button {
    background-color: rgba(153, 0, 0, 0.6);
    white-space: nowrap;
}

.reset-button:hover {
    background-color: rgba(204, 0, 0, 0.6);
}

.no-results {
    background-color: rgba(0, 0, 0, 0.6);
    padding: 20px;
    text-align: center;
    margin-top: 20px;
    border: 1px solid #3a3a3a;
    color: #ffd700;
}

/* Styles pour le modal */
.item-stats-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    background-color: #2a2a2a;
    margin: 5% auto;
    padding: 0;
    border: 1px solid #3a3a3a;
    width: 80%;
    max-width: 1000px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: rgba(0, 0, 0, 0.6);
    border-bottom: 1px solid #3a3a3a;
}

.modal-header h2 {
    margin: 0;
    color: #ffd700;
    font-size: 20px;
    border-bottom: none;
    display: flex;
    align-items: center;
}

.modal-item-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-right: 10px;
    background-color: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    font-weight: bold;
    font-size: 16px;
}

.modal-category-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-left: 10px;
    margin-right: 5px;
}

.modal-item-category {
    font-size: 14px;
    color: #aaa;
    font-weight: normal;
}

.close-modal {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: #ffd700;
}

.modal-body {
    padding: 20px;
}

.period-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

.period-btn {
    padding: 8px 15px;
    background-color: rgba(0, 0, 0, 0.6);
    border: 1px solid #3a3a3a;
    color: #ccc;
    transition: all 0.2s ease;
}

.period-btn:hover {
    background-color: rgba(255, 215, 0, 0.1);
    border-color: #ffd700;
    color: #ffd700;
}

.period-btn.active {
    background-color: rgba(255, 215, 0, 0.2);
    border-color: #ffd700;
    color: #ffd700;
}

.custom-dates {
    margin-bottom: 20px;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 4px;
}

.date-inputs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.date-input {
    background-color: rgba(0, 0, 0, 0.6);
    border: 1px solid #3a3a3a;
    color: white;
    padding: 8px;
    font-family: 'Minecraft', sans-serif;
}

.date-input:focus {
    border-color: #ffd700;
    outline: none;
}

.chart-container {
    height: 400px;
    margin-top: 20px;
    background-color: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 4px;
    position: relative;
}

.chart-title {
    color: #ffd700;
    font-size: 16px;
    margin-bottom: 10px;
    text-align: center;
}

.chart-summary {
    background-color: rgba(0, 0, 0, 0.5);
    margin-top: 15px;
    padding: 10px 15px;
    border-radius: 4px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
}

.chart-stat {
    padding: 5px 15px;
    text-align: center;
}

.chart-stat-label {
    color: #aaa;
    font-size: 12px;
}

.chart-stat-value {
    color: #fff;
    font-size: 16px;
    font-weight: bold;
}

.chart-stat-value.positive {
    color: #4CAF50;
}

.chart-stat-value.negative {
    color: #F44336;
}

.chart-loading, .no-data-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    padding: 15px 30px;
    border-radius: 4px;
    color: #ffd700;
    text-align: center;
}

.item-card {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.item-card:hover {
    transform: translateY(-3px);
}