body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    margin: 0 auto;
    max-width: 1200px;
    padding: 20px;
    background: #f5f5f5;
    color: #333;
}

.top-nav {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.top-nav a {
    flex: 1;
    padding: 12px 20px;
    background: white;
    color: #4a5568;
    text-decoration: none;
    text-align: center;
    font-weight: 500;
    border: none;
    transition: all 0.2s;
}

.top-nav a:hover {
    background: #edf2f7;
}

.top-nav a.active {
    background: #4a5568;
    color: white;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
}

h2 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

h3 {
    margin-top: 0;
}

.toolbar {
    margin-bottom: 20px;
}

.toolbar button {
    padding: 8px 16px;
    background: #4a5568;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.toolbar button:hover {
    background: #2d3748;
}

.comparison-container {
    display: grid;
    grid-template-columns: 1fr 200px 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.item-column {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.item-column h2 {
    color: #2d3748;
}

.diff-column {
    background: #f7fafc;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.diff-column h2 {
    color: #4a5568;
}

.item-dropdown {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
    background: white;
}

.item-preview {
    min-height: 200px;
}

.placeholder {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 40px 20px;
}

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

.item-armor-type {
    font-size: 12px;
    color: #718096;
    margin-bottom: 4px;
}

.item-class-restriction {
    font-size: 12px;
    color: #c53030;
    margin-bottom: 4px;
}

.item-offhand {
    font-size: 12px;
    color: #2b6cb0;
    margin-bottom: 8px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 13px;
}

.stat-effect {
    color: #4a5568;
}

.stat-value {
    font-weight: bold;
    color: #276749;
}

.diff-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 13px;
    margin: 2px 0;
}

.diff-row.winner-a {
    background: #c6f6d5;
}

.diff-row.winner-b {
    background: #bee3f8;
}

.diff-row.tie {
    background: #f7fafc;
}

.diff-stat {
    color: #4a5568;
}

.diff-value {
    font-weight: bold;
}

.diff-value.positive {
    color: #276749;
}

.diff-value.negative {
    color: #c53030;
}

.diff-value.neutral {
    color: #718096;
}

.quick-select-section,
.search-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.quick-select-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.quick-select-item {
    padding: 8px 12px;
    background: #edf2f7;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    text-align: center;
    transition: all 0.2s;
}

.quick-select-item:hover {
    background: #e2e8f0;
    border-color: #cbd5e0;
}

.quick-select-item.slot-a {
    background: #c6f6d5;
    border-color: #9ae6b4;
}

.quick-select-item.slot-b {
    background: #bee3f8;
    border-color: #90cdf4;
}

.search-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-row input {
    flex: 1;
    padding: 10px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.search-row select {
    padding: 10px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
}

.search-row button {
    padding: 10px 20px;
    background: #4a5568;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.search-row button:hover {
    background: #2d3748;
}

@media (max-width: 900px) {
    .comparison-container {
        grid-template-columns: 1fr;
    }

    .diff-column {
        order: -1;
    }
}
