/* 单位换算器专用样式 - 仅包含工具特定样式 */

/* 转换表单布局 */
.conversion-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
    background-color: #f9f9f9;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.conversion-input {
    flex: 1;
    min-width: 150px;
}

.conversion-select {
    flex: 1;
    min-width: 150px;
}

.conversion-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    color: #4285f4;
    padding: 0 10px;
    margin-bottom: 10px;
}

/* 按钮组 */
.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* 常用转换网格 */
.common-conversions {
    background-color: #f9f9f9;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.conversion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.conversion-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.conversion-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.conversion-card:nth-child(1) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.conversion-card:nth-child(2) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.conversion-card:nth-child(3) {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.conversion-card:nth-child(4) {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.conversion-card:nth-child(5) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.conversion-card:nth-child(6) {
    background: linear-gradient(135deg, #fccb90 0%, #d57eeb 100%);
}

.conversion-card:nth-child(7) {
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

.conversion-card:nth-child(8) {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #333;
}

.conversion-title {
    font-weight: 600;
    font-size: 1.1em;
    margin-bottom: 8px;
}

.conversion-formula {
    font-size: 0.9em;
    opacity: 0.9;
}

/* 单位信息样式 */
.unit-info {
    background-color: #f9f9f9;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.unit-info-content {
    padding: 10px 0;
}

.unit-info-item {
    margin-bottom: 20px;
}

.unit-info-item h4 {
    color: #4285f4;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.unit-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
}

.unit-list li {
    background: #f5f5f5;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9em;
    border-left: 3px solid #4285f4;
}

/* 历史记录样式 */
.conversion-history {
    background-color: #f9f9f9;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.history-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #e0e0e0;
}

.history-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateX(5px);
    border-color: #4285f4;
}

.history-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    align-items: center;
}

.history-type {
    font-weight: 600;
    color: #4285f4;
    font-size: 0.95em;
}

.history-time {
    color: #999;
    font-size: 0.85em;
}

.history-content {
    color: #333;
}

.history-input {
    font-weight: 500;
    margin-bottom: 4px;
    font-size: 1em;
}

.history-details {
    font-size: 0.9em;
    color: #666;
}

.empty-history {
    text-align: center;
    color: #999;
    padding: 40px 20px;
    font-size: 1em;
}

/* FAQ样式 */
.faq-section {
    background-color: #f9f9f9;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.faq-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #4285f4;
}

.faq-item h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.faq-item p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .conversion-grid {
        grid-template-columns: 1fr;
    }

    .conversion-form {
        flex-direction: column;
    }

    .conversion-arrow {
        transform: rotate(90deg);
        margin: 5px 0;
    }

    .conversion-input,
    .conversion-select {
        width: 100%;
        min-width: 100%;
    }

    .button-group {
        flex-direction: column;
    }

    .button-group .btn {
        width: 100%;
    }

    .unit-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .conversion-card {
        padding: 12px;
    }

    .conversion-title {
        font-size: 1em;
    }

    .conversion-formula {
        font-size: 0.85em;
    }
}
