body {
    background-color: #f5f5f5;
}

#main {
    padding: 20px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin: 20px auto;
    max-width: 1200px;
}

h1 {
    color: #343a40;
    margin-bottom: 10px;
    font-weight: bold;
}

#main > p {
    color: #6c757d;
    margin-bottom: 30px;
}

/* Textarea Styling */
#inventory-input {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 12px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    transition: border-color 0.3s;
}

#inventory-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

/* Filter Section */
.filter-section {
    margin: 30px 0;
    text-align: left;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.1);
}

.filter-section h4 {
    margin-bottom: 20px;
    color: #343a40;
    font-weight: bold;
}

.filter-group {
    margin-bottom: 15px;
}

.filter-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 20px;
    cursor: pointer;
    border-radius: 8px;
    margin-bottom: 5px;
    user-select: none;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-header:after {
    content: '▼';
    font-size: 12px;
    transition: transform 0.3s;
}

.filter-header.active:after {
    transform: rotate(180deg);
}

.filter-header:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.filter-options {
    display: none;
    padding: 15px 20px;
    background-color: white;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #dee2e6;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

.filter-options.active {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-option {
    margin: 8px 0;
    padding: 5px 0;
}

.filter-option label {
    cursor: pointer;
    user-select: none;
    padding-left: 5px;
    color: #495057;
    transition: color 0.2s;
}

.filter-option label:hover {
    color: #007bff;
}

.filter-option input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
    margin-right: 8px;
    vertical-align: middle;
}

/* Filter Control Buttons */
.filter-controls {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    gap: 10px;
}

.filter-control-btn {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 5px;
    border: 1px solid #6c757d;
    background-color: white;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-control-btn:hover {
    background-color: #6c757d;
    color: white;
}

/* Button Styling */
#check-button {
    font-size: 18px;
    padding: 12px 40px;
    font-weight: bold;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,123,255,0.3);
    transition: all 0.3s ease;
    border: none;
}

#check-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,123,255,0.4);
}

#check-button:active {
    transform: translateY(0);
}

/* Progress Section */
.progress-section {
    margin: 30px 0;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    background-color: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.progress-section h4 {
    margin-bottom: 15px;
    color: #343a40;
    font-weight: bold;
}

.progress {
    height: 35px;
    border-radius: 10px;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.1);
    background-color: #e9ecef;
}

.progress-bar {
    font-size: 16px;
    font-weight: bold;
    line-height: 35px;
    border-radius: 10px;
    transition: width 0.6s ease;
}

#progress-text {
    font-size: 18px;
    color: #495057;
    font-weight: 500;
    text-align: center;
}

/* Output Section */
.output-section {
    margin: 30px 0;
    text-align: left;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.output-section > h3 {
    color: #343a40;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    border-bottom: 3px solid #007bff;
    padding-bottom: 15px;
}

.faction-group {
    margin-bottom: 25px;
    background: linear-gradient(to right, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-left: 5px solid #007bff;
}

.faction-header {
    color: #343a40;
    padding: 15px 20px;
    margin: 0;
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    border-radius: 12px 12px 0 0;
    transition: background-color 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faction-header:hover {
    background-color: rgba(0,123,255,0.05);
}

.faction-header:after {
    content: '▼';
    font-size: 14px;
    transition: transform 0.3s;
}

.faction-header.collapsed:after {
    transform: rotate(-90deg);
}

.faction-content {
    padding: 20px;
    display: block;
}

.faction-content.collapsed {
    display: none;
}

.character-item {
    padding: 12px 15px;
    margin: 8px 0;
    background-color: white;
    border-radius: 8px;
    border-left: 5px solid #007bff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.character-item:hover {
    transform: translateX(5px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

.character-item strong {
    font-size: 16px;
    color: #212529;
}

.character-item small {
    color: #6c757d;
    font-size: 13px;
}

/* Rarity Colors - Updated */
.rarity-legendär {
    border-left-color: #ffc107;
    background: linear-gradient(to right, rgba(255,193,7,0.1) 0%, white 100%);
}

.rarity-selten {
    border-left-color: #e91e63;
    background: linear-gradient(to right, rgba(233,30,99,0.1) 0%, white 100%);
}

.rarity-ungewöhnlich {
    border-left-color: #28a745;
    background: linear-gradient(to right, rgba(40,167,69,0.1) 0%, white 100%);
}

.rarity-gewöhnlich {
    border-left-color: #17a2b8;
    background: linear-gradient(to right, rgba(23,162,184,0.1) 0%, white 100%);
}

/* Rarity Badge Styling */
.rarity-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    margin-left: 10px;
}

.rarity-badge-legendär {
    background-color: #ffc107;
    color: #000;
}

.rarity-badge-selten {
    background-color: #e91e63;
    color: #fff;
}

.rarity-badge-ungewöhnlich {
    background-color: #28a745;
    color: #fff;
}

.rarity-badge-gewöhnlich {
    background-color: #17a2b8;
    color: #fff;
}

/* Alert Styling */
.alert {
    border-radius: 10px;
    padding: 20px;
    font-size: 16px;
}
