* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 20px;
    min-height: 100vh;
    color: #e0e0e0;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
}

h1 {
    color: #ffffff;
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.storage-section {
    background: #2d2d44;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    border: 1px solid #3d3d5c;
}

.storage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #667eea;
}

.storage-name {
    font-size: 24px;
    font-weight: bold;
    color: #e0e0e0;
}

.item-count {
    background: #667eea;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
}

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

.item-card {
    background: #1e1e2e;
    border-left: 4px solid #555;
    padding: 15px;
    border-radius: 5px;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #333;
}

.item-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
    border-color: #667eea;
}

.item-card.legendary {
    border-left-color: #ffd700;
    background: #2a2a1a;
    border-color: #ffd700;
}

.item-card.epic {
    border-left-color: #9b59b6;
    background: #2a1a2a;
    border-color: #9b59b6;
}

.item-card.rare {
    border-left-color: #3498db;
    background: #1a1a2a;
    border-color: #3498db;
}

.item-card.exceptional {
    border-left-color: #e74c3c;
    background: #2a1a1a;
    border-color: #e74c3c;
}

.item-card.uncommon {
    border-left-color: #2ecc71;
    background: #1a2a1a;
    border-color: #2ecc71;
}

.item-name {
    font-weight: bold;
    font-size: 16px;
    color: #e0e0e0;
    margin-bottom: 8px;
}

.item-details {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 13px;
    color: #b0b0b0;
}

.item-detail {
    display: flex;
    align-items: center;
    gap: 5px;
}

.item-detail strong {
    color: #d0d0d0;
}

.rarity-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.rarity-badge.legendary {
    background: #ffd700;
    color: #1a1a1a;
}

.rarity-badge.epic {
    background: #9b59b6;
    color: white;
}

.rarity-badge.rare {
    background: #3498db;
    color: white;
}

.rarity-badge.exceptional {
    background: #e74c3c;
    color: white;
}

.rarity-badge.uncommon {
    background: #2ecc71;
    color: white;
}

.loading {
    text-align: center;
    color: #e0e0e0;
    font-size: 20px;
    padding: 50px;
}

.hidden {
    display: none;
}

.error {
    background: #c0392b;
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin: 20px 0;
    border: 1px solid #a93226;
}

.stats {
    background: #2d2d44;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    border: 1px solid #3d3d5c;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: #1e1e2e;
    border-radius: 5px;
    border: 1px solid #333;
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: #667eea;
}

.stat-label {
    font-size: 14px;
    color: #b0b0b0;
    margin-top: 5px;
}

.duplicate-section {
    background: #3d2d1a;
    border: 2px solid #ffc107;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.duplicate-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.duplicate-title {
    font-size: 22px;
    font-weight: bold;
    color: #ffc107;
}

.duplicate-badge {
    background: #ffc107;
    color: #1a1a1a;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
}

.duplicate-item {
    background: #2d2d1a;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    border: 1px solid #3d3d2a;
}

.duplicate-item-name {
    font-weight: bold;
    font-size: 16px;
    color: #e0e0e0;
    margin-bottom: 10px;
}

.duplicate-item-info {
    margin-bottom: 8px;
    color: #b0b0b0;
    font-size: 13px;
}

.duplicate-locations {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.location-tag {
    background: #ffc107;
    color: #1a1a1a;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
}

.item-card.duplicate {
    position: relative;
}

.item-card.duplicate::before {
    content: "🔁 DUPLICATE";
    position: absolute;
    top: 5px;
    right: 5px;
    background: #ffc107;
    color: #1a1a1a;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: bold;
}

.toggle-button {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    margin-left: 10px;
    transition: background 0.3s;
}

.toggle-button:hover {
    background: #5568d3;
}

.toggle-button.active {
    background: #2ecc71;
}

.view-controls {
    background: #2d2d44;
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    border: 1px solid #3d3d5c;
}

.file-drop-zone {
    background: #2d2d44;
    border: 3px dashed #667eea;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.file-drop-zone:hover {
    background: #3d3d5c;
    border-color: #5568d3;
}

.file-drop-zone.dragover {
    background: #1a2a3a;
    border-color: #2ecc71;
    border-style: solid;
    transform: scale(1.02);
}

.file-drop-zone-content {
    color: #667eea;
}

.file-drop-zone-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.file-drop-zone-text {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #e0e0e0;
}

.file-drop-zone-hint {
    font-size: 14px;
    color: #b0b0b0;
}

.file-input {
    display: none;
}

.current-file {
    background: #1a2a3a;
    border-left: 4px solid #667eea;
    padding: 10px 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    font-size: 14px;
    color: #e0e0e0;
}

.current-file strong {
    color: #667eea;
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #e0e0e0;
    font-size: 20px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
    color: #ffffff;
}

