/* ==================== 文件名：style-mobile.css ==================== */
/* 全局重置，更适合移动端 */
* {
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0;
    padding: 0;
}

body {
    background: #e9eff7;
    min-height: 100vh;
    padding: 12px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.tool-container {
    max-width: 500px;  /* 移动端舒适宽度 */
    width: 100%;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(5px);
    border-radius: 32px;
    padding: 20px 16px;
    box-shadow: 0 15px 35px -10px rgba(0,20,40,0.25);
    border: 1px solid rgba(255,255,255,0.6);
}

h1 {
    font-size: 1.9rem;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: #0f263b;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

h1 span {
    background: #f39c12;
    font-size: 0.9rem;
    font-weight: 500;
    color: #1e2e41;
    padding: 4px 14px;
    border-radius: 40px;
}

.sub {
    color: #2c405c;
    margin-bottom: 18px;
    border-left: 4px solid #f39c12;
    padding-left: 16px;
    background: rgba(243,156,18,0.06);
    border-radius: 0 20px 20px 0;
    font-size: 1rem;
}

/* 卡片通用 */
.card, .compound-card {
    background: #ffffffdb;
    border-radius: 28px;
    padding: 18px 16px;
    box-shadow: 0 4px 12px -6px #16202e33;
    border: 1px solid rgba(255,255,255,0.7);
    margin-bottom: 18px;
}

.compound-card {
    background: #dee9fc;
}

.section-title {
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #1a2b40;
    border-bottom: 2px dashed #b3c6df;
    padding-bottom: 8px;
}

.flex-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.badge {
    background: #1e3a5f;
    color: white;
    padding: 6px 16px;
    border-radius: 40px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

.action-btn {
    background: #eef3fc;
    border: 2px solid #4d6a94;
    color: #1e3a5f;
    padding: 8px 16px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

textarea {
    width: 100%;
    height: 150px;  /* 移动端稍微降低高度 */
    padding: 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    background: #f4f7fd;
    border: 2px solid #cbd5e1;
    border-radius: 22px;
    resize: vertical;
    outline: none;
}

textarea:focus {
    border-color: #f39c12;
}

/* 复式按钮区 移动优化：更紧凑可滑动 */
.digit-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.digit-label {
    font-weight: 700;
    font-size: 1.3rem;
    min-width: 45px;
    color: #12263b;
}

.digit-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
}

.digit-btn {
    width: 44px;
    height: 44px;
    border-radius: 40px;
    background: white;
    border: 2.5px solid #4d6a94;
    font-size: 1.5rem;
    font-weight: 800;
    color: #0c2038;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    box-shadow: 0 2px 4px #0000001a;
}

.digit-btn.selected {
    background: #f39c12;
    border-color: #b36f0a;
    color: #0f1d2b;
    transform: scale(1.05);
}

.compound-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    font-weight: 700;
    font-size: 1.3rem;
    color: #10243e;
}

.compound-actions {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.btn {
    background: white;
    border: 2px solid #1e3a5f;
    color: #1e3a5f;
    padding: 10px 18px;
    border-radius: 40px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 1 1 auto;
    justify-content: center;
}

.btn-primary {
    background: #1e3a5f;
    color: white;
    border-color: #0f2640;
}

.btn-warning {
    background: #f39c12;
    border-color: #c67d0c;
    color: #1a1e2b;
}

/* 过滤项垂直排列 */
.filter-item {
    background: #edf3fc;
    border-radius: 24px;
    padding: 14px 14px;
    margin-bottom: 16px;
}

.filter-label {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 10px;
    display: flex;
    gap: 6px;
    align-items: center;
}

.filter-label span {
    background: #f39c12;
    color: #0f1f2f;
    border-radius: 30px;
    font-size: 0.75rem;
    padding: 3px 10px;
}

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 10px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.95rem;
}

input[type="radio"] {
    accent-color: #f39c12;
    width: 18px;
    height: 18px;
}

.input-number {
    padding: 8px 8px;
    border-radius: 30px;
    border: 2px solid #b9cbeb;
    background: white;
    font-size: 0.95rem;
    outline: none;
    text-align: center;
}

.range-row {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.range-row input {
    flex: 1;
    min-width: 60px;
}

/* 012路 独立三行样式 */
.chip-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.chip {
    background: white;
    border: 2px solid #b7cbee;
    border-radius: 30px;
    padding: 6px 0;
    width: 42px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
}

.chip.active {
    background: #f39c12;
    border-color: #c67d0c;
    color: white;
}

.action-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 20px;
}

.stats-badge {
    background: #1e3a5f;
    color: white;
    border-radius: 40px;
    padding: 10px 16px;
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
}

.result-area {
    background: #121f31;
    border-radius: 28px;
    padding: 18px;
    color: #e1ebfc;
    border: 2px solid #f39c12;
    margin-top: 10px;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.result-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    background: #1b2a40;
    border-radius: 24px;
    padding: 16px;
}

.number-badge {
    background: #263d5c;
    padding: 8px 14px;
    border-radius: 30px;
    font-weight: 700;
    letter-spacing: 1px;
    border-left: 4px solid #f39c12;
    font-size: 1.15rem;
}

.note {
    font-size: 0.8rem;
    color: #9bb5da;
    margin-top: 8px;
}

.error-tip {
    background: #ffdcc9;
    border-radius: 20px;
    padding: 10px 15px;
    color: #862d00;
    width: 100%;
}