* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: #f8f9fa;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    padding: 80px 1.5rem 2rem;
    margin: 0;
}
.navbar {
    height: 80px !important;
}
.container-main {
    max-width: 1100px;
    width: 100%;
    background: #ffffff;
    border-radius: 2rem;
    padding: 2rem;
    box-shadow: 0 5px 15px 2px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.05);
	margin-top: 20px;
}


h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    background-clip: text;
    color: #333;
    text-align: center;
}


.tool-intro {
    margin-bottom: 1.5rem;
    padding: 0.8rem 1.2rem;
    background: #f0f7ff;
    border-radius: 10px;
    border-left: 4px solid #0D6EFD;
}

.tool-intro p {
    margin: 0;
    color: #475569;
    font-size: 0.95rem;
}

.tool-intro strong {
    color: #0b1a33;
}

/* ===== 换算器主体 ===== */
.converter-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1rem;
}

.converter-section {
    background: #f8f9fa;
    border-radius: 1.5rem;
    padding: 1.5rem;
    border: 1px solid #e9edf4;
}

.section-title {
    font-weight: 600;
    color: #0b1a33;
    font-size: 1rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #0D6EFD;
    padding-bottom: 0.3rem;
    display: inline-block;
}

.input-group {
    margin-bottom: 1rem;
	gap:10px !important;
	align-items:center;
}

.input-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: #475569;
    margin-bottom: 0.2rem;
	width:30px !important;
}

.form-control {
    width: 90%;
    padding: 0.5rem 0.8rem;
    border: 1px solid #dce2ec;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    outline: none;
    background: #ffffff;
    color: #0b1a33;
    transition: 0.15s;
	margin-left:10px !important;
}

.form-control:focus {
    border-color: #0D6EFD;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.form-control[type="number"] {
    font-size: 1.1rem;
    font-weight: 500;
}

select.form-control {
    cursor: pointer;
    appearance: auto;
}

.btn-swap {
    width: 100%;
    padding: 0.4rem;
    background: #e9edf4;
    border: 1px solid #dce2ec;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    color: #475569;
    cursor: pointer;
    transition: 0.15s;
}

.btn-swap:hover {
    background: #dce2ec;
    border-color: #0D6EFD;
    color: #0D6EFD;
}

/* ===== 结果区域 ===== */
.result-section {
    display: flex;
    flex-direction: column;
}

.result-display {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.5rem 0;
    background: #ffffff;
    border-radius: 1rem;
    border: 2px solid #e9edf4;
    min-height: 100px;
    margin-bottom: 1rem;
}

.result-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #0D6EFD;
    font-family: 'Courier New', monospace;
}

.result-unit {
    font-size: 1.5rem;
    font-weight: 600;
    color: #0b1a33;
}

.result-detail {
    margin-top:10px;
    gap: 0.3rem 1.5rem;
    padding: 0.6rem 0.8rem;
    background: #ffffff;
    border-radius: 0.6rem;
    border: 1px solid #e2e8f0;
    font-size: 0.85rem;
    color: #475569;
    margin-bottom: 0.8rem;
    max-height: 520px;
    overflow-y: auto;
}

.result-detail .detail-item {
    display: flex;
    justify-content: space-between;
    padding: 0.1rem 0;
    border-bottom: 1px solid #f1f4f9;
	
}

.result-detail .detail-item:last-child {
    border-bottom: none;
}

.result-detail .detail-label {
    color: #94a3b8;
	
}

.result-detail .detail-value {
    font-weight: 500;
    color: #0b1a33;
    font-family: 'Courier New', monospace;
}

.result-actions {
    display: flex;
    gap: 0.6rem;
}

.btn-copy {
    padding: 0.4rem 1rem;
    background: #0D6EFD;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.15s;
	margin-bottom:10px;
}

.btn-copy:hover {
    background: #0b5ed7;
}
.fenlan
{
	display: grid;
    grid-template-columns: 1fr 1fr;
	 gap: 0.3rem 1.8rem;
}
/* ===== 参考表 ===== */
.reference-section {
    margin-top: 2rem;
    border-top: 1px solid #e9edf4;
    padding-top: 1.2rem;
}

.ref-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: #0b1a33;
}

.ref-hint {
    font-weight: 400;
    font-size: 0.75rem;
    color: #94a3b8;
}

.ref-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.3rem;
}

.ref-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.2rem 0.6rem;
    background: #f8f9fa;
    border-radius: 0.3rem;
    border: 1px solid #e9edf4;
    font-size: 0.75rem;
    cursor: pointer;
    transition: 0.15s;
	height:36px;
	
}

.ref-item:hover {
    border-color: #0D6EFD;
    background: #f0f7ff;
}

.ref-item .ref-symbol {
    font-weight: 600;
    color: #0b1a33;
	position:flex;
	gap:5px;
}

.ref-item .ref-name {
    color: #94a3b8;
	margin-left:5px;
}

.ref-item .ref-value {
    font-family: 'Courier New', monospace;
    color: #475569;
    font-size: 0.7rem;
}


/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .converter-main {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .container-main {
        padding: 1rem;
    }
    .header h1 {
        font-size: 1.4rem;
    }
    .header .subtitle {
        display: none;
    }
    .converter-section {
        padding: 1rem;
    }
    .result-number {
        font-size: 2rem;
    }
    .result-unit {
        font-size: 1.2rem;
    }
    .ref-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }
}

@media (max-width: 500px) {
    .result-detail {
        grid-template-columns: 1fr;
    }
    .ref-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    .ref-item {
        font-size: 0.65rem;
        padding: 0.15rem 0.4rem;
    }
}