/* 进制转换器样式 */
.base-converter-container {
    margin: 2rem;
}

/* 修复工具表单样式 */
.tool-form {
    padding: 1.5rem;
    background-color: #f8faff;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.tool-form label {
    display: block;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #152858;
}

.tool-form input,
.tool-form select {
    width: 100%;
    padding: 0.75rem;
    margin-top: 0.5rem;
    border: 1px solid #d1d5e0;
    border-radius: 8px;
    font-size: 16px;
    background-color: white;
    box-sizing: border-box;
}

.tool-form button {
    background: linear-gradient(135deg, #4f6df5, #3679ff);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

.tool-form button:hover {
    background: linear-gradient(135deg, #3679ff, #2563eb);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(79, 109, 245, 0.3);
}

/* 结果容器样式 */
.conversion-result-container {
    margin: 1.5rem 0;
}

/* 修复工具结果边距 - 为儿童设计 */
.base-converter-container .tool-result {
    display: block;
    padding: 1.5rem;
    margin: 1.5rem 0;
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f0ff 100%);
    border-radius: 16px;
    border: 2px dashed #4f6df5;
    font-family: monospace;
    font-size: 2.5rem !important;
    font-weight: bold;
    color: #2563eb;
    text-align: center;
    box-shadow: 0 8px 25px rgba(79, 109, 245, 0.15);
    position: relative;
    overflow: hidden;
}

/* 设置下标字体大小 */
.base-converter-container .tool-result sub {
    font-size: 0.5em;
    vertical-align: sub;
}

.base-converter-container .tool-result.error {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-color: #ef4444;
    color: #dc2626;
}

.base-converter-container .tool-result::before {
    content: "\f005";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 1.2rem;
    color: #fbbf24;
    animation: sparkle 2s infinite;
}

.base-converter-container .tool-result::after {
    content: "\f091";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.2rem;
    color: #10b981;
    animation: sparkle 2s infinite 0.5s;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
    50% { transform: scale(1.2) rotate(10deg); opacity: 0.8; }
}

.base-converter-intro {
    margin-bottom: 2rem;
}

.base-converter-info {
    padding: 2rem;
    background-color: #f8faff;
    border-radius: 20px;
    margin-top: 2rem;
}

.base-converter-info h3 {
    font-size: 22px;
    margin: 0 0 1rem;
    color: #152858;
}

.base-converter-info p {
    font-size: 16px;
    line-height: 1.6;
    color: #637397;
    margin: 0 0 1.5rem;
}

.base-examples h4 {
    font-size: 18px;
    margin: 0 0 1rem;
    color: #152858;
}

.base-example-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.base-example {
    padding: 1.5rem;
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.base-example:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.base-example-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f6df5, #3679ff);
    color: white;
    font-size: 20px;
    font-weight: bold;
}

.base-example h5 {
    font-size: 16px;
    margin: 0 0 0.5rem;
    color: #152858;
}

.base-example p {
    font-size: 14px;
    line-height: 1.5;
    color: #637397;
    margin: 0 0 0.5rem;
}

.base-example strong {
    font-size: 16px;
    color: #4f6df5;
}

.conversion-steps {
    padding: 2rem;
    background-color: #f8faff;
    border-radius: 20px;
    margin-top: 2rem;
}

.conversion-steps h3 {
    font-size: 22px;
    margin: 0 0 1.5rem;
    color: #152858;
}

.conversion-steps h4 {
    font-size: 18px;
    margin: 1.5rem 0 0.5rem;
    color: #4f6df5;
}

.conversion-steps p {
    margin: 0 0 0.5rem;
    color: #637397;
}

.conversion-step {
    padding: 0.75rem;
    margin: 0.5rem 0;
    background-color: white;
    border-radius: 8px;
    font-family: monospace;
    border-left: 4px solid #4f6df5;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
    .base-converter-hero {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    
    .base-converter-hero__lead {
        max-width: 100%;
    }
    
    .base-example-grid {
        grid-template-columns: 1fr;
    }
    
    .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .result-label {
        min-width: auto;
    }
    
    .conversion-steps h4 {
        margin-top: 1rem;
    }
    
    .conversion-step {
        margin: 0.25rem 0;
    }
}