body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f4f7f9;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    min-height: 100vh;
    margin: 0;
}

.calculator-container {
    width: 100%;
    max-width: 1200px;
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.main-content {
    display: flex;
    gap: 30px;
}

.input-column {
    flex: 1;
    min-width: 400px;
}

.results-column {
    flex: 1.2;
    min-width: 450px;
}

h1, h2, h4 {
    text-align: center;
    color: #1a237e;
}

h1 { margin-bottom: 25px; font-size: 24px; }
h2 { font-size: 18px; margin-top: 0; margin-bottom: 20px; border-bottom: 1px solid #eee; padding-bottom: 10px; }
h4 { font-size: 16px; color: #333; margin-bottom: 5px; }

.card {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
}

.input-group { margin-bottom: 15px; }
.input-group-inline { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.input-group label, .input-group-inline label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 14px; color: #555; }
.input-group-inline label { margin-bottom: 0; flex-basis: 40%; }
.input-group input, .input-group-inline input { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 6px; box-sizing: border-box; font-size: 16px; }
.input-group-inline input { flex-basis: 55%; }
input[type="number"] { -moz-appearance: textfield; }
input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.input-column button {
    width: 100%;
    padding: 15px;
    background-color: #3f51b5;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.input-column button:hover { background-color: #303f9f; }

.results-card {
    margin-top: 0;
    border-top: 3px solid #3f51b5;
    height: 100%;
}

.hidden { display: none !important; }

.profit { color: #d32f2f; }
.loss { color: #388e3c; }

.analysis-section { padding-top: 15px; }
.analysis-subtitle { text-align: center; font-size: 12px; color: #888; margin-top: 0; margin-bottom: 15px; }
.analysis-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.analysis-table th, .analysis-table td { padding: 10px; text-align: center; border-bottom: 1px solid #f0f0f0; }
.analysis-table th { background-color: #f8f9fa; font-weight: 600; color: #555; }
.analysis-table tbody tr { cursor: pointer; } /* 添加指针样式以提示可交互 */
.analysis-table tbody tr:hover { background-color: #f1f3f5; }
.analysis-table .current-row td { background-color: #e8eaf6; font-weight: bold; }

/* --- 新增：悬浮提示框样式 --- */
.trade-tooltip {
    position: absolute;
    width: 280px;
    background-color: #ffffff;
    border: 1px solid #dcdcdc;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 8px;
    padding: 15px;
    z-index: 1000;
    font-size: 13px;
    pointer-events: none; /* 让鼠标可以穿透提示框，防止闪烁 */
    transition: opacity 0.2s ease-in-out;
}
.tooltip-section { margin-bottom: 10px; }
.tooltip-section:last-child { margin-bottom: 0; }
.tooltip-title { font-weight: bold; color: #1a237e; border-bottom: 1px solid #eee; padding-bottom: 5px; margin-bottom: 8px; }
.tooltip-section p { font-weight: bold; margin: 5px 0; }
.tooltip-details { display: flex; flex-direction: column; color: #555; }
.tooltip-details span { display: flex; justify-content: space-between; padding: 2px 0; }

@media (max-width: 992px) {
    .main-content { flex-direction: column; }
    .input-column, .results-column { min-width: 100%; }
    .results-card { margin-top: 25px; }
}