.phone-comparison-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.comparison-header {
    text-align: center;
    margin-bottom: 30px;
}

.comparison-header h2 {
    font-size: 32px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
}

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

.device-search {
    display: flex;
    flex-direction: column;
}

.device-search label {
    font-size: 14px;
    font-weight: 500;
    color: #555;
    margin-bottom: 8px;
    display: block;
}

.device-select {
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.device-select:focus {
    outline: none;
    border-color: #007bff;
}

.vs-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 8px;
}

.vs-separator span {
    background: #007bff;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.comparison-message {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    color: #6c757d;
    font-size: 18px;
}

.comparison-result {
    margin-top: 40px;
}

.comparison-table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    min-width: 600px;
}

.comparison-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.comparison-table th {
    padding: 20px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 16px;
}

.comparison-table th.spec-label {
    width: 30%;
    background: #5a67d8;
}

.comparison-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.comparison-table tbody tr:hover {
    background-color: #f8f9fa;
}

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

.comparison-table td {
    padding: 16px 15px;
    font-size: 15px;
    color: #495057;
}

.comparison-table td.spec-label {
    font-weight: 600;
    color: #333;
    background-color: #f8f9fa;
}

.device-image {
    max-width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
}

.device-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    text-align: center;
    padding: 10px;
}

.spec-value {
    word-wrap: break-word;
}

.price-usd {
    color: #28a745;
    font-weight: 600;
}

.price-pkr {
    color: #17a2b8;
    font-weight: 600;
}

@media screen and (max-width: 768px) {
    .search-section {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .vs-separator {
        order: 2;
        padding: 10px 0;
    }
    
    .device-1-search {
        order: 1;
    }
    
    .device-2-search {
        order: 3;
    }
    
    .comparison-header h2 {
        font-size: 24px;
    }
    
    .comparison-table {
        font-size: 14px;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 12px 10px;
    }
    
    .device-image {
        max-height: 150px;
    }
}

@media screen and (max-width: 480px) {
    .phone-comparison-container {
        padding: 15px;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 10px 8px;
        font-size: 13px;
    }
    
    .comparison-table th.spec-label {
        font-size: 13px;
    }
    
    .device-title {
        font-size: 16px;
    }
}

.select2-container--default .select2-selection--single {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    height: 45px;
    padding: 5px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 35px;
    color: #333;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 43px;
}

.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #007bff;
}

.select2-dropdown {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
}

.select2-search--dropdown .select2-search__field {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 8px;
}

.select2-results__option {
    padding: 10px;
}

.select2-results__option--highlighted {
    background-color: #007bff !important;
}

.latest-comparisons-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 16px;
}

.latest-comparisons-title {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    color: #333;
    letter-spacing: 2px;
}

.latest-comparisons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.comparison-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.comparison-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.comparison-link {
    text-decoration: none;
    display: block;
}

.comparison-images {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 30px 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
}

.device-image-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
}

.comparison-device-img {
    max-width: 100%;
    max-height: 140px;
    object-fit: contain;
    border-radius: 8px;
}

.vs-icon {
    position: relative;
    z-index: 2;
    margin: 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.vs-icon svg {
    width: 50px;
    height: 50px;
}

.comparison-title {
    padding: 20px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
    border-top: 1px solid #e0e0e0;
}

.no-image {
    color: #999;
    font-size: 14px;
    text-align: center;
}

@media screen and (max-width: 768px) {
    .latest-comparisons-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .latest-comparisons-title {
        font-size: 24px;
        margin-bottom: 30px;
    }
    
    .comparison-images {
        padding: 20px 15px;
    }
    
    .device-image-wrapper {
        min-height: 120px;
    }
    
    .comparison-device-img {
        max-height: 100px;
    }
    
    .vs-icon svg {
        width: 40px;
        height: 40px;
    }
    
    .comparison-title {
        font-size: 14px;
        padding: 15px;
    }
}

@media screen and (max-width: 480px) {
    .latest-comparisons-container {
        padding: 30px 15px;
    }
    
    .comparison-images {
        padding: 15px 10px;
    }
    
    .device-image-wrapper {
        min-height: 100px;
    }
    
    .comparison-device-img {
        max-height: 80px;
    }
    
    .vs-icon {
        margin: 0 5px;
    }
    
    .vs-icon svg {
        width: 35px;
        height: 35px;
    }
}
