* {
    box-sizing: border-box;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
body {
    background: #f0f4fc;
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
}
.app {
    max-width: 1100px;
    width: 100%;
    background: white;
    border-radius: 32px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.05);
    padding: 2rem 2rem 2.2rem;
}
.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.8rem;
}
.title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 600;
    color: #0f1a2f;
    letter-spacing: 1px;
}
.lang-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #2b3854;
}
.lang-selector select {
    background: white;
    border: 1px solid #d2dcee;
    border-radius: 40px;
    padding: 6px 14px;
    font-size: 0.85rem;
    color: #162033;
    outline: none;
    height: 34px;
    cursor: pointer;
}
.lang-selector select:focus {
    border-color: #6a7ea0;
    box-shadow: 0 0 0 3px rgba(106, 126, 160, 0.12);
}
.config-panel {
    background: #f9fcff;
    border-radius: 24px;
    border: 1px solid #e4ebf6;
    padding: 1.4rem 1.8rem;
    margin-bottom: 2rem;
}
.config-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.8rem 1.8rem;
}
.field {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex-shrink: 0;
}
.field label {
    font-weight: 500;
    font-size: 0.75rem;
    color: #2b3854;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}
.field select {
    background: white;
    border: 1px solid #d2dcee;
    border-radius: 40px;
    padding: 8px 16px;
    font-size: 0.9rem;
    color: #162033;
    outline: none;
    transition: 0.15s;
    min-width: 130px;
    height: 38px;
}
.field select:focus {
    border-color: #6a7ea0;
    box-shadow: 0 0 0 3px rgba(106, 126, 160, 0.12);
}
.field-positive {
    flex: 1 1 auto;
    min-width: 0;
}
.field-positive .selector-group {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
}
.field-negative {
    flex-shrink: 0;
}
.field-negative .selector-group {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
}
.fixed-damage {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #d4edda;
    border: 1px solid #b7d7b7;
    border-radius: 40px;
    padding: 0 16px;
    font-weight: 500;
    font-size: 0.9rem;
    color: #1d4a2a;
    height: 38px;
    white-space: nowrap;
    flex-shrink: 0;
}
.selector-group select.pos-select {
    background: #d4edda;
    border: 1px solid #b7d7b7;
    border-radius: 40px;
    padding: 0 16px;
    font-size: 0.9rem;
    color: #1d4a2a;
    outline: none;
    transition: 0.15s;
    height: 38px;
    min-width: 110px;
    flex-shrink: 0;
}
.selector-group select.pos-select:focus {
    border-color: #6a7ea0;
    box-shadow: 0 0 0 3px rgba(106, 126, 160, 0.12);
}
.selector-group select.neg-select {
    background: #f8d7da;
    border: 1px solid #e5b9bd;
    border-radius: 40px;
    padding: 0 16px;
    font-size: 0.9rem;
    color: #7a2a2a;
    outline: none;
    transition: 0.15s;
    height: 38px;
    min-width: 110px;
    flex-shrink: 0;
}
.selector-group select.neg-select:focus {
    border-color: #6a7ea0;
    box-shadow: 0 0 0 3px rgba(106, 126, 160, 0.12);
}
.inline-divider {
    color: #c8d4e6;
    font-weight: 300;
    margin: 0 2px;
    flex-shrink: 0;
}
.stat-grid {
    margin-top: 0.75rem;
}
.stat-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f5fe;
    gap: 8px 14px;
}
.stat-row:last-child {
    border-bottom: none;
}
.stat-label {
    font-weight: 500;
    min-width: 110px;
    color: #1a253f;
    font-size: 0.95rem;
}
.stat-input-pos {
    width: 100px;
    padding: 6px 12px;
    border-radius: 30px;
    border: 1px solid #b7d7b7;
    font-size: 0.9rem;
    background: #d4edda;
    color: #1d4a2a;
    text-align: center;
    height: 38px;
}
.stat-input-pos:focus {
    border-color: #6a7ea0;
    outline: none;
    box-shadow: 0 0 0 3px rgba(106, 126, 160, 0.08);
}
.stat-input-neg {
    width: 100px;
    padding: 6px 12px;
    border-radius: 30px;
    border: 1px solid #e5b9bd;
    font-size: 0.9rem;
    background: #f8d7da;
    color: #7a2a2a;
    text-align: center;
    height: 38px;
}
.stat-input-neg:focus {
    border-color: #6a7ea0;
    outline: none;
    box-shadow: 0 0 0 3px rgba(106, 126, 160, 0.08);
}
.stat-range {
    background: #edf3fd;
    padding: 3px 14px;
    border-radius: 30px;
    font-size: 0.85rem;
    color: #2f405f;
    white-space: nowrap;
    height: 32px;
    display: inline-flex;
    align-items: center;
}
.stat-trend {
    font-weight: 500;
    padding: 3px 16px;
    border-radius: 40px;
    font-size: 0.85rem;
    margin-left: auto;
    white-space: nowrap;
    background: #f0f4fd;
    color: #31415e;
    height: 32px;
    display: inline-flex;
    align-items: center;
}
.trend-pos-high { background: #d4edda; color: #1d4a2a; }
.trend-pos-low { background: #f8d7da; color: #7a2a2a; }
.trend-neg-high { background: #f8d7da; color: #7a2a2a; }
.trend-neg-low { background: #d4edda; color: #1d4a2a; }
.trend-neutral { background: #ecf1fa; color: #384b6b; }
.no-negative {
    color: #6f7f9b;
    font-size: 0.85rem;
    height: 38px;
    display: inline-flex;
    align-items: center;
}
.mutex-info {
    font-size: 0.75rem;
    color: #5a6d8a;
    margin-top: 12px;
    border-top: 1px solid #e2eaf5;
    padding-top: 10px;
}
@media (max-width: 820px) {
    .app { padding: 1.2rem; }
    .config-panel { padding: 1rem; }
    .config-row { 
        flex-wrap: wrap; 
        gap: 0.6rem 1rem;
    }
    .field-positive {
        flex: 1 1 100%;
        min-width: 100%;
    }
    .field-positive .selector-group {
        flex-wrap: wrap;
    }
    .field-negative {
        flex: 1 1 auto;
    }
    .field-negative .selector-group {
        flex-wrap: wrap;
    }
    .stat-row { flex-wrap: wrap; }
    .stat-trend { margin-left: 0; }
    .header-row {
        flex-direction: column;
        align-items: stretch;
    }
    .lang-selector {
        justify-content: flex-end;
    }
}
@media (max-width: 600px) {
    .selector-group select {
        min-width: 90px;
        padding: 0 10px;
        font-size: 0.8rem;
    }
    .fixed-damage {
        font-size: 0.8rem;
        padding: 0 12px;
    }
    .title {
        font-size: 1.4rem;
    }
}