/* DPI to CPI Converter Enhanced UI Styles */

.converter-container {
    max-width: 1000px;
    margin: 0 auto 3rem;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
}

.converter-header {
    background: linear-gradient(135deg, #4a6cf7 0%, #2945c5 100%);
    color: white;
    padding: 2rem;
    text-align: center;
    position: relative;
}

.converter-header h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.converter-header p {
    margin: 0.5rem 0 0;
    opacity: 0.9;
    font-size: 1rem;
}

.converter-body {
    padding: 2.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
}

@media (max-width: 768px) {
    .converter-body {
        grid-template-columns: 1fr;
        padding: 1.5rem;
        gap: 1.5rem;
    }
}

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

.input-section h3 {
    margin: 0 0 1.5rem;
    color: #333;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.input-section h3 svg {
    margin-right: 0.5rem;
    width: 24px;
    height: 24px;
    color: #4a6cf7;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.input-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #e1e5ee;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
    background: #f8f9fc;
}

.input-group input:focus {
    border-color: #4a6cf7;
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.15);
    outline: none;
}

.input-group select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #e1e5ee;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
    background: #f8f9fc;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%234a6cf7' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 1rem) center;
}

.input-group select:focus {
    border-color: #4a6cf7;
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.15);
    outline: none;
}

.common-values {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.common-value-btn {
    background: #f0f3ff;
    border: 1px solid #d8e0fd;
    color: #4a6cf7;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.common-value-btn:hover {
    background: #e0e7ff;
    border-color: #b1c4fc;
}

.convert-btn {
    background: linear-gradient(135deg, #4a6cf7 0%, #2945c5 100%);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    margin-top: 1rem;
    box-shadow: 0 4px 12px rgba(74, 108, 247, 0.25);
}

.convert-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(74, 108, 247, 0.35);
}

.convert-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(74, 108, 247, 0.2);
}

.result-section {
    background: #f8f9fc;
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 2px solid #e1e5ee;
    transition: all 0.3s;
}

.result-section.has-result {
    border-color: #4a6cf7;
    background: #f0f3ff;
}

.result-header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.result-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.3rem;
    font-weight: 600;
}

.result-header p {
    margin: 0.5rem 0 0;
    color: #666;
    font-size: 0.9rem;
}

.result-display {
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.3s;
}

.result-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #4a6cf7;
    margin: 0;
    line-height: 1.2;
}

.result-label {
    font-size: 1rem;
    color: #666;
    margin: 0.5rem 0 0;
}

.result-explanation {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.result-explanation h4 {
    margin: 0 0 1rem;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}

.result-explanation p {
    margin: 0;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
}

.manufacturer-info {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e1e5ee;
}

.manufacturer-info h4 {
    margin: 0 0 1rem;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}

.manufacturer-info p {
    margin: 0;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.pulse {
    animation: pulse 0.5s ease;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .converter-header {
        padding: 1.5rem;
    }
    
    .converter-header h2 {
        font-size: 1.5rem;
    }
    
    .converter-body {
        padding: 1.2rem;
        gap: 1.2rem;
    }
    
    .result-value {
        font-size: 2rem;
    }
}

/* Comparison section styles */
.comparison-section {
    margin-top: 2rem;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.comparison-section h3 {
    margin: 0 0 1.5rem;
    color: #333;
    font-size: 1.3rem;
    font-weight: 600;
    text-align: center;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.comparison-table th,
.comparison-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e1e5ee;
}

.comparison-table th {
    background: #f0f3ff;
    color: #333;
    font-weight: 600;
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.comparison-table tr:hover td {
    background: #f8f9fc;
}

.term-highlight {
    color: #4a6cf7;
    font-weight: 600;
}