* {
    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: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
    position: relative;
}

.language-selector {
    position: absolute;
    top: 15px;
    right: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.language-selector label {
    color: white;
    font-weight: 600;
    font-size: 0.9em;
    margin: 0;
}

.language-select {
    padding: 6px 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    font-size: 0.9em;
    background: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    color: #333;
    transition: all 0.3s;
}

.language-select:hover {
    background: white;
    border-color: white;
}

.language-select:focus {
    outline: none;
    border-color: white;
    background: white;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

header p {
    font-size: 1.1em;
    opacity: 0.9;
}

main {
    padding: 30px;
}

.section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

.section h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.5em;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

#module-count {
    font-size: 0.8em;
    color: #666;
    font-weight: normal;
}

label {
    display: inline-block;
    margin-right: 10px;
    font-weight: 600;
    color: #495057;
}

select {
    padding: 8px 12px;
    border: 2px solid #ced4da;
    border-radius: 4px;
    font-size: 1em;
    min-width: 200px;
    background: white;
    cursor: pointer;
}

select:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    cursor: pointer;
    margin-left: 10px;
    transition: background 0.3s;
}

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

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

.btn-primary {
    background: #28a745;
    padding: 12px 30px;
    font-size: 1.1em;
    font-weight: 600;
}

.btn-primary:hover {
    background: #218838;
}

.btn-secondary {
    background: #6c757d;
    padding: 12px 30px;
    font-size: 1.1em;
    font-weight: 600;
}

.btn-secondary:hover {
    background: #5a6268;
}

.action-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.module-controls {
    margin-bottom: 20px;
}

.selected-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    min-height: 50px;
}

.module-item {
    background: white;
    border: 2px solid #667eea;
    border-radius: 6px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 200px;
}

.module-item .name {
    font-weight: 600;
    color: #333;
    margin-right: 10px;
}

.module-item .stats {
    font-size: 0.9em;
    color: #666;
}

.module-item .remove-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 5px 10px;
    margin-left: 10px;
    cursor: pointer;
    font-size: 0.9em;
}

.module-item .remove-btn:hover {
    background: #c82333;
}

.info-box, .stats-box, .result-box {
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
    margin-top: 15px;
}

.info-box h3, .stats-box h3 {
    color: #495057;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.stat-item, .info-item {
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
}

.stat-item:last-child, .info-item:last-child {
    border-bottom: none;
}

.stat-item .label, .info-item .label {
    font-weight: 600;
    color: #495057;
}

.stat-item .value, .info-item .value {
    color: #667eea;
    font-weight: 600;
}

.result-box {
    border-color: #667eea;
}

.result-item {
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    font-size: 1.1em;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item .label {
    font-weight: 600;
    color: #495057;
}

.result-item .value {
    color: #667eea;
    font-weight: 700;
    font-size: 1.2em;
}

.result-item .value.highlight {
    color: #28a745;
    font-size: 1.5em;
}

.hidden {
    display: none;
}

.descendant-selector, .sets-selector, .reactor-selector, .enemy-selector {
    margin-bottom: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    main {
        padding: 15px;
    }

    header {
        font-size: 1.8em;
        padding: 50px 15px 20px;
    }

    header h1 {
        font-size: 1.8em;
    }

    .language-selector {
        top: 10px;
        right: 10px;
        left: 10px;
        justify-content: flex-end;
    }

    .language-selector label {
        font-size: 0.8em;
    }

    .language-select {
        font-size: 0.8em;
        padding: 5px 8px;
    }

    .section {
        padding: 15px;
    }

    select {
        min-width: 150px;
    }

    .module-item {
        min-width: 100%;
    }
}
