/* unit-converter.css */
/* ad top adaptive start */
.ad-top-banner .mrg-tag {
    width: 970px !important;
    height: 250px !important;
}

@media (max-width: 1199px) {
    .ad-top-banner .mrg-tag {
        width: 728px !important;
        height: 90px !important;
    }
}

@media (max-width: 768px) {
    .ad-top-banner .mrg-tag {
        width: 320px !important;
        height: 50px !important;
    }
}
/* ad top adaptive end */

body {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: #f5f5f5;
}

.breadcrumb {
    margin-bottom: 20px;
    padding: 10px 0;
    color: #666;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: #007bff;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

h1 {
    margin: 16px 0;
    text-align: center;
    color: #333;
}

.converter-container {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.category-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 10px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: #fff;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.category-btn.active {
    border-color: #007bff;
    background: #007bff;
    color: #fff;
}

.category-btn:hover:not(.active) {
    border-color: #007bff;
    color: #007bff;
}

.converter-form {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: end;
    margin-bottom: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
}

label {
    font-size: 14px;
    color: #495057;
    margin-bottom: 8px;
    font-weight: 500;
}

input, select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

input:focus, select:focus {
    outline: none;
    border-color: #007bff;
}

.swap-btn {
    padding: 12px;
    border: 2px solid #007bff;
    background: #007bff;
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 18px;
}

.swap-btn:hover {
    background: #0056b3;
    border-color: #0056b3;
    transform: scale(1.05);
}

.result {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    font-size: 18px;
    color: #495057;
    font-weight: 500;
}

.conversion-history {
    margin-top: 30px;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
}

.history-item:last-child {
    border-bottom: none;
}

.history-text {
    color: #495057;
}

.history-time {
    color: #6c757d;
    font-size: 0.9rem;
}

.clear-history {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 15px;
    transition: background 0.3s ease;
}

.clear-history:hover {
    background: #c82333;
}

@media (max-width: 768px) {
    .converter-form {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .category-selector {
        justify-content: center;
    }
    
    body {
        padding: 12px;
    }
}