* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: transparent;
    min-height: 100vh;
    padding: 20px;
    background-color: #fdfdfd; /* 米白色背景 */
    color: #333333; /* 主要文字颜色 - 深灰色 */
}

.container {
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
}

h1 {
    display: none;
}

.input-section {
    margin-bottom: 30px;
}

.input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

label {
    font-size: 1.2em;
    color: #555;
}

input[type="text"] {
    width: 200px;
    height: 40px;
    padding: 10px;
    font-size: 1.2em;
    text-align: center;
    border: 2px solid #ddd;
    border-radius: 5px;
    outline: none;
}

input[type="text"]:focus {
    border-color: #4CAF50;
}

button {
    height: 40px;
    padding: 10px 30px;
    font-size: 1.1em;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #45a049;
}

button:active {
    transform: scale(0.98);
}

.result-container {
    width: 100%;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 40px);
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    width: 100%;
}

.result-item {
    border: none;
    border-radius: 0;
    padding: 30px;
    background-color: transparent;
    box-shadow: none;
    font-size: 1.3em;
    min-height: 200px; /* 确保最小高度 */
}

.result-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px dashed #aaa; /* 浅灰色虚线，类似淡墨 */
}

.result-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.row-label {
    font-weight: bold;
    color: #555555; /* 深灰色，类似浓墨 */
    width: 130px;
    font-size: 1.2em;
}

#editableNumber {
    flex: 1;
    text-align: right;
    color: #d4af37; /* 金色 - 代表手机尾号 */
    border: 1px solid transparent;
    padding: 5px 8px;
    border-radius: 3px;
    min-width: 70px;
    font-size: 1.2em;
}

#editableValue {
    flex: 1;
    text-align: right;
    color: #8B4513; /* 棕色 - 代表预估价值 */
    border: 1px solid transparent;
    padding: 5px 8px;
    border-radius: 3px;
    min-width: 70px;
    font-size: 1.2em;
}

#editableMatch {
    flex: 1;
    text-align: right;
    color: #228B22; /* 绿色 - 代表匹配度 */
    border: 1px solid transparent;
    padding: 5px 8px;
    border-radius: 3px;
    min-width: 70px;
    font-size: 1.2em;
}

#editableFortune {
    flex: 1;
    /* text-align: right; */
    color: #4169E1;
    /* border: 1px solid transparent; */
    padding: 5px 0px;
    border-radius: 3px;
}

.row-value:focus {
    outline: none;
    border: 1px solid #d4af37; /* 金色边框 */
    background-color: #f9f5e9; /* 浅金色背景 */
}

.editable {
    cursor: text;
}

.result-row {
    border-bottom: 1px dashed #aaa; /* 浅灰色虚线，类似淡墨 */
}

/* 适配手机端 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    h1 {
        font-size: 1.5em;
        margin-bottom: 20px;
    }
    
    input[type="text"] {
        width: 150px;
        height: 35px;
        font-size: 1.1em;
    }
    
    button {
        height: 35px;
        padding: 8px 20px;
        font-size: 1em;
    }
    
    .result-grid {
        grid-template-columns: 1fr; /* 在小屏幕上每行显示一个卡片 */
        gap: 10px;
    }
    
    .result-item {
        padding: 12px;
    }
    
    .result-row {
        justify-content: space-between; /* 保持水平排列 */
        margin-bottom: 6px;
        padding-bottom: 6px;
    }
    
    .row-label, .row-value {
        text-align: left;
        width: auto;
        margin-bottom: 0;
    }
    
    /* 情感财运行特殊样式：垂直排列，左对齐 */
    .fortune-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .fortune-row .row-label {
        text-align: left;
        width: 100%;
        margin-bottom: 5px;
        font-weight: bold;
        color: #555555;
    }
    
    .fortune-row .row-value {
        text-align: left;
        width: 100%;
        margin-bottom: 0;
        word-wrap: break-word; /* 确保长文本能换行 */
        white-space: normal; /* 允许文本换行 */
        color: #4169E1; /* 蓝色 - 代表情感财运 */
    }
    
    /* 在非常小的屏幕上才使用垂直排列 */
    @media (max-width: 480px) {
        .result-row {
            flex-direction: column;
        }
        
        .row-label, .row-value {
            text-align: left;
            width: 100%;
            margin-bottom: 2px;
        }
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.3em;
    }
    
    input[type="text"] {
        width: 120px;
        height: 30px;
        font-size: 1em;
    }
    
    button {
        height: 30px;
        padding: 6px 15px;
        font-size: 0.9em;
    }
    
    .result-item {
        padding: 10px;
    }
    
    .row-label, .row-value {
        font-size: 0.9em;
    }
}

/* 匹配度进度条样式 */
.match-percentage {
    display: inline-block;
    position: relative;
    width: 60px;
    height: 20px;
    background-color: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    vertical-align: middle;
    margin-right: 5px;
}

.match-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    border-radius: 10px;
}