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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

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

header {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
    text-align: center;
}

h1 {
    color: #667eea;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    font-size: 1.1em;
    margin-bottom: 5px;
}

.creator {
    color: #888;
    font-size: 0.9em;
}

.contributor {
    color: #888;
    font-size: 0.8em;
    font-style: italic;
}

.controls {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.search-box {
    flex: 1;
    min-width: 250px;
}

.search-box input {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
}

.refresh-btn {
    padding: 12px 25px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.refresh-btn:hover {
    background: #5568d3;
}

.refresh-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.loading {
    text-align: center;
    padding: 50px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(0deg); }
}

.error {
    background: #ff4444;
    color: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 20px;
}

.stats {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat-label {
    color: #666;
    font-weight: 600;
}

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

.table-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow-x: auto;
    overflow-y: visible;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1200px;
}

thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 0.95em;
    position: sticky;
    top: 0;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.header-text {
    margin-right: 4px;
}

.help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border: 1.5px solid white;
    border-radius: 50%;
    font-size: 11px;
    font-weight: bold;
    opacity: 0.9;
    cursor: help;
    margin-left: 6px;
    margin-top: 3px;
    float: right;
}

th:hover {
    background: rgba(86, 104, 211, 0.9);
}

th.sortable::after {
    content: ' ⇅';
    opacity: 0.5;
}

th.sorted-asc::after {
    content: ' ↑';
    opacity: 1;
}

th.sorted-desc::after {
    content: ' ↓';
    opacity: 1;
}

tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background 0.2s;
}

tbody tr:hover {
    background: #f5f5f5;
}

td {
    padding: 12px 15px;
    font-size: 0.9em;
    white-space: nowrap;
}

.name-cell {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.name-text {
    font-weight: bold;
    -webkit-text-stroke-width: 2px;
    paint-order: stroke fill;
    cursor: help;
}

.badges {
    display: flex;
    gap: 6px;
    align-items: center;
}

.badge {
    font-weight: bold;
    font-size: 1em;
    cursor: help;
    position: relative;
}

.spawn-badge {
    color: white;
    text-shadow: 
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000,
        -2px 0 0 #000,
        2px 0 0 #000,
        0 -2px 0 #000,
        0 2px 0 #000;
}

.limited-badge {
    color: #00ff00;
    text-shadow: 
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000,
        -2px 0 0 #000,
        2px 0 0 #000,
        0 -2px 0 #000,
        0 2px 0 #000;
}

.plant-badge {
    float: right;
    cursor: help;
    font-size: 1em;
}

.priority-cell {
    position: relative;
}

.custom-tooltip {
    position: fixed;
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85em;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 10000;
    white-space: pre-line;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.custom-tooltip.show {
    opacity: 1;
}

.no-results {
    text-align: center;
    padding: 50px;
    color: #666;
    font-size: 1.1em;
}

@media (max-width: 768px) {
    h1 {
        font-size: 1.8em;
    }

    .controls {
        flex-direction: column;
    }

    .search-box {
        width: 100%;
    }

    table {
        font-size: 0.85em;
    }

    th, td {
        padding: 8px 10px;
    }
}