/* Main Wrapper */
.mathunit-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Header */
.mathunit-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    border-radius: 15px;
}

.mathunit-header h1 {
    font-size: 2.5em;
    margin-bottom: 15px;
    color: white;
}

/* Category Tabs */
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
}

.tab-btn {
    padding: 12px 24px;
    border: 2px solid #2575fc;
    background: white;
    color: #2575fc;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover,
.tab-btn.active {
    background: #2575fc;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 117, 252, 0.3);
}

/* Converter Form */
.converter-form {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.input-group {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.input-field {
    flex: 1;
    min-width: 200px;
}

.input-field input,
.input-field select {
    width: 100%;
    padding: 5px !important;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 10px;
    transition: border-color 0.3s ease;
    color:#141414;
}

.input-field input:focus,
.input-field select:focus {
    border-color: #2575fc;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 117, 252, 0.1);
}

.convert-btn {
    padding: 15px 40px;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.convert-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37, 117, 252, 0.3);
}

/* Results Display */
.results-container {
    background: #f8f9ff;
    padding: 25px;
    border-radius: 15px;
    border-left: 5px solid #2575fc;
    margin-top: 30px;
}

.result-value {
    font-size: 2.5em;
    font-weight: bold;
    color: #2575fc;
    margin: 10px 0;
}

.result-unit {
    font-size: 1.2em;
    color: #666;
}

.conversion-formula {
    margin-top: 20px;
    padding: 15px;
    background: #e8f4ff;
    border-radius: 10px;
    font-family: monospace;
    color: #2c3e50;
}

/* Category Cards */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin: 40px 0;
}

.category-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.category-card h4 {
    color: #2575fc;
    margin-bottom: 15px;
    font-size: 1.3em;
}

/* Tables */
.popular-table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.popular-table th {
    background: #2575fc;
    color: white;
    padding: 15px;
    text-align: left;
}

.popular-table td {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.popular-table tr:hover {
    background: #f8f9ff;
}

/* FAQ Section */
.faq-section {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.faq-item {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9ff;
    border-radius: 10px;
}

.faq-item h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.2em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .category-tabs {
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 10px;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .input-field {
        width: 100%;
    }
    
    .mathunit-header h1 {
        font-size: 2em;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading Animation */
.converter-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.converter-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2575fc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Conversion History */
.conversion-history {
    margin-top: 30px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.history-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
}

.history-item:last-child {
    border-bottom: none;
}