/* 基础与容器样式，与计算器保持一致 */
* {
    box-sizing: border-box;
}
body {
    background-color: #f9fafb;
}
.container {
    min-height: 100vh;
    padding: 2rem 1rem;
    max-width: 64rem;
    margin: 0 auto;
}

.header {
    text-align: center;
    margin-bottom: 2rem;
}

.title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #111827;
    display: flex;
    align-items: center;
    justify-content: center;
}

.title .icon { margin-right: 0.5rem; }

.subtitle {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

/* 卡片样式 */
.calculator-card, .result-card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.form-group { margin-bottom: 0.5rem; }

.form-label {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.25rem;
}

.form-label .icon { margin-right: 0.5rem; }

.form-input, .form-select {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #111827;
    background-color: white;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.form-input { padding-right: 3rem; }

.input-wrapper, .select-wrapper { position: relative; }
.input-suffix {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 0.875rem;
    pointer-events: none;
}
.select-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    pointer-events: none;
}

.button-container { margin-top: 1.5rem; display: flex;  gap: 1rem; }

.calculate-button {
    display: flex;
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 0.375rem;
    background-color: #2563eb;
    color: white;
    font-size: 0.875rem;
    align-items: center;
    font-weight: 500;
    gap: 0.5rem;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out, transform 0.1s ease-in-out;
}

.calculate-button:hover { background-color: #1d4ed8; transform: scale(1.02); }
.calculate-button:active { transform: scale(0.98); }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out, transform 0.1s ease-in-out;
    text-decoration: none;
    min-width: 140px;
    justify-content: center;
}

.btn-secondary { background: #f3f4f6; color: #374151; }
.btn-secondary:hover { background: #e5e7eb; }
.btn:active { transform: scale(0.98); }

.result-card { display: block; opacity: 1; transform: translateY(0); transition: opacity 0.3s ease, transform 0.3s ease; }
.result-card.hidden { display: none; opacity: 0; transform: translateY(20px); }

.result-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.result-header .icon { color: #10b981; }
.result-header h3 { margin: 0; color: #111827; font-size: 1.25rem; }

.result-content { gap: 2rem; }
@media (min-width: 768px) {
    .result-content { grid-template-columns: 1fr 1fr; }
}
.result-summary { text-align: center; }
.result-amount { display: flex; align-items: baseline; justify-content: center; gap: 0.5rem; margin-bottom: 1rem; }
.amount-value { font-size: 2.5rem; font-weight: 700; color: #111827; line-height: 1; }
.currency-code { font-size: 1.25rem; font-weight: 600; color: #6b7280; }
.exchange-rate { font-size: 1rem; color: #6b7280; padding: 0.5rem 1rem; background: #f9fafb; border-radius: 6px; display: inline-block; }
.update-time { font-size: 1rem; color: #6b7280; margin-top: 0.5rem; }

.info-section { background: white; border-radius: 12px; padding: 2rem; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); }
.info-section h3 { color: #111827; margin-bottom: 1rem; font-size: 1.125rem; }
.info-section ul { list-style: none; padding: 0; margin: 0; }
.info-section li { padding: 0.5rem 0; padding-left: 1.5rem; position: relative; color: #6b7280; }
.info-section li::before { content: "•"; color: #6366f1; font-weight: bold; position: absolute; left: 0; }

.loading { opacity: 0.6; pointer-events: none; }
.loading .btn-primary { background: #9ca3af; }

.error-message { background: #fef2f2; border: 1px solid #fecaca; color: #dc2626; padding: 1rem; border-radius: 8px; margin-top: 1rem; display: none; }
.error-message.show { display: block; }

@media (max-width: 768px) {
    .calculator-card,
    .result-card,
    .info-section { padding: 1.5rem; }
    .amount-value { font-size: 2rem; }
    .button-container { flex-direction: column; }
    .btn { width: 100%; }
    .result-content { grid-template-columns: 1fr; gap: 1.5rem; }
    .detail-item { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
}
