/* 计算器公共样式 - 移动端优化 */
:root {
    --primary: #2c80ff;
    --primary-dark: #1a5fcc;
    --secondary: #f8f9fa;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --dark: #343a40;
    --light: #f8f9fa;
    --border: #dee2e6;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --radius: 12px;
}

.calculator-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.input-section, .result-section {
    background: white;
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
    border: 1px solid #eaeaea;
}

.section-title {
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-group {
    margin-bottom: 22px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 1rem;
}

input, select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s;
    background-color: white;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(44, 128, 255, 0.2);
}

.btn-group {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

button {
    padding: 15px 25px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    min-width: 44px;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    flex: 2;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(44, 128, 255, 0.3);
}

.btn-secondary {
    background-color: var(--secondary);
    color: var(--dark);
    border: 2px solid var(--border);
    flex: 1;
}

.btn-secondary:hover {
    background-color: #e9ecef;
}

/* 结果表格响应式处理 */
.responsive-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    margin: 15px 0;
}

.responsive-table th {
    background: #dbe5f2;
    font-weight: 600;
    padding: 12px 16px;
    border: 1px solid #c0cee5;
    text-align: left;
}

.responsive-table td {
    padding: 12px 16px;
    border: 1px solid #c0cee5;
}

@media (max-width: 768px) {
    .calculator-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .input-section, .result-section {
        padding: 15px;
    }

    .responsive-table,
    .responsive-table thead,
    .responsive-table tbody,
    .responsive-table tr,
    .responsive-table th,
    .responsive-table td {
        display: block;
    }

    .responsive-table thead tr {
        display: none;
    }

    .responsive-table tr {
        margin-bottom: 15px;
        border: 1px solid #c0cee5;
        border-radius: 8px;
        overflow: hidden;
        background: white;
    }

    .responsive-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px;
        border: none;
        border-bottom: 1px solid #eaeef5;
    }

    .responsive-table td:last-child {
        border-bottom: none;
    }

    .responsive-table td:before {
        content: attr(data-label);
        font-weight: 600;
        color: #1f3a5f;
        width: 45%;
        flex-shrink: 0;
        font-size: 0.9rem;
    }
}

/* 结果卡片 */
.result-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

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

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

.result-item .value {
    font-weight: 700;
}

.pass { color: var(--success); }
.fail { color: var(--danger); }
.warning { color: var(--warning); }

/* 导出模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}
.modal-content {
    background-color: white;
    margin: auto;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}
.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 20px;
}
.close:hover {
    color: black;
}
.export-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: center;
}
.export-actions button {
    flex: 1;
}
#reportContent {
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    max-height: 60vh;
    overflow-y: auto;
}