/* 单位转换器工具样式 */

/* 工具头部 */
.tool-header {
    background-color: #16213e;
    padding: 40px 0;
    text-align: center;
}

.tool-header h1 {
    font-size: 2.2rem;
    color: #4cc9f0;
    margin-bottom: 10px;
}

.tool-header p {
    font-size: 1.1rem;
    color: #b0b0c0;
}

/* 工具内容区域 */
.tool-content {
    padding: 50px 0;
}

.converter-container {
    display: flex;
    gap: 30px;
}

.converter-sidebar {
    width: 250px;
    flex-shrink: 0;
}

.converter-sidebar h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #4cc9f0;
}

.unit-category {
    background-color: #16213e;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.unit-category h4 {
    padding: 15px 20px;
    background-color: #240046;
    color: #4cc9f0;
    font-size: 1rem;
}

.unit-types {
    list-style: none;
}

.unit-types li {
    padding: 12px 20px;
    border-bottom: 1px solid #2a2a42;
    cursor: pointer;
    transition: all 0.3s;
}

.unit-types li:last-child {
    border-bottom: none;
}

.unit-types li:hover {
    background-color: #240046;
}

.unit-types li.active {
    background-color: #4361ee;
    color: white;
}

.converter-main {
    flex: 1;
    background-color: #16213e;
    border-radius: 8px;
    padding: 30px;
}

.converter-header {
    margin-bottom: 30px;
}

.converter-header h3 {
    font-size: 1.5rem;
    color: #e2e2e2;
    margin-bottom: 10px;
}

.converter-header p {
    color: #b0b0c0;
}

.conversion-box {
    display: flex;
    gap: 20px;
    align-items: center;
}

.input-group, .output-group {
    flex: 1;
}

.input-group label, .output-group label {
    display: block;
    margin-bottom: 8px;
    color: #e2e2e2;
}

.input-group input, .output-group input {
    width: 100%;
    padding: 12px 15px;
    background-color: #1a1a2e;
    border: 1px solid #2a2a42;
    border-radius: 5px;
    color: #e2e2e2;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.input-group select, .output-group select {
    width: 100%;
    padding: 12px 15px;
    background-color: #1a1a2e;
    border: 1px solid #2a2a42;
    border-radius: 5px;
    color: #e2e2e2;
    font-size: 1rem;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23e2e2e2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
}

.swap-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #4361ee;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.swap-button:hover {
    background-color: #3a0ca3;
    transform: rotate(180deg);
}

.conversion-info {
    margin-top: 30px;
    background-color: #1a1a2e;
    border-radius: 8px;
    padding: 20px;
}

.conversion-info h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #4cc9f0;
}

.conversion-info p {
    color: #b0b0c0;
    margin-bottom: 10px;
}

.conversion-factors {
    margin-top: 15px;
}

.conversion-factor {
    padding: 8px 0;
    border-bottom: 1px solid #2a2a42;
    color: #e2e2e2;
}

.conversion-factor:last-child {
    border-bottom: none;
}


/* 响应式设计 */
@media (max-width: 768px) {
    .usage-step {
        flex-direction: column;
    }
    
    .step-number {
        align-self: flex-start;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .converter-container {
        flex-direction: column;
    }
    
    .converter-sidebar {
        width: 100%;
    }
    
    .conversion-box {
        flex-direction: column;
    }
    
    .swap-button {
        transform: rotate(90deg);
    }
    
    .swap-button:hover {
        transform: rotate(270deg);
    }
}
