/* ========================================
   进制转换工具样式
   ======================================== */

/* 主内容 */
.main-content { width: 100%; max-width: 800px; height: calc(100vh - 120px); display: flex; align-items: center; padding: 0 20px; padding-bottom: 50px; z-index: 10; }
.container { width: 100%; }

/* 工具卡片 */
.tool-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-xl); overflow: hidden; display: flex; flex-direction: column; height: 100%; }

/* 卡片头 */
.card-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border-color); background: rgba(255,255,255,0.02); }
.card-header h2 { font-size: 15px; font-weight: 600; color: var(--text-primary); display: flex; align-items: center; gap: 8px; margin: 0; }
.card-header h2 i { color: var(--primary-color); }
.card-header .btn-icon { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 6px; border-radius: 4px; transition: 0.2s; display: flex; align-items: center; gap: 4px; }
.card-header .btn-icon:hover { color: var(--primary-color); background: rgba(255,255,255,0.05); }

/* 下拉菜单 */
.dropdown { position: relative; }
.dropdown-menu { position: absolute; top: 100%; right: 0; width: 200px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); z-index: 50; padding: 6px; margin-top: 6px; }
.dropdown-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer; transition: 0.2s; font-size: 13px; color: var(--text-secondary); }
.dropdown-item:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }
.dropdown-divider { height: 1px; background: var(--border-color); margin: 4px 0; }
.preview { font-size: 11px; color: var(--text-muted); max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-mono); }

/* 卡片体 */
.card-body { padding: 20px; }

/* 输入组 */
.input-group { margin-bottom: 20px; }
.input-group label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }
.input-row { display: flex; gap: 12px; }
.input-row .input { flex: 1; padding: 12px 14px; font-size: 15px; font-family: var(--font-mono); min-width: 0; resize: vertical; max-height: 150px; word-break: break-all; line-height: 1.5; }
.input-row .select { width: 140px; background: rgba(0,0,0,0.3); border: 1px solid var(--border-color); color: var(--text-primary); border-radius: var(--radius-md); padding: 0 10px; outline: none; cursor: pointer; flex-shrink: 0; }

/* 操作栏 */
.action-bar { display: flex; gap: 12px; }
.btn-action { flex: 1; padding: 12px; border-radius: var(--radius-md); border: none; cursor: pointer; font-weight: 500; font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 6px; transition: 0.2s; background: var(--primary-color); color: white; }
.btn-action:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-action.secondary { background: rgba(255,255,255,0.1); color: var(--text-primary); }

/* 结果网格 */
.results-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; padding: 20px; overflow-y: auto; max-height: 40vh; }
.result-item { background: rgba(0,0,0,0.2); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 14px; display: flex; flex-direction: column; gap: 6px; min-height: 70px; }
.result-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; font-weight: 600; }
.result-value { font-size: 16px; font-family: var(--font-mono); color: var(--primary-color); word-break: break-all; line-height: 1.4; user-select: all; }

/* 响应式 */
@media (max-width: 768px) {
    .main-content { height: auto; padding: 80px 10px 60px; overflow-y: auto; }
    .tool-card { height: auto; min-height: 80vh; }
    .results-grid { grid-template-columns: 1fr; }
    .input-row { flex-direction: column; }
    .input-row .select { width: 100%; }
}
