:root {
    --primary-color: #2196f3;
    --secondary-color: #4caf50;
    --text-color: #333;
    --border-color: #ddd;
    --background-gray: #f5f5f5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}

/* Header and Navigation */
.top-nav {
    background-color: #fff;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.logo h1 {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.site-title-link {
    text-decoration: none;
    color: var(--primary-color);
}

.site-tagline {
    font-size: 0.9rem;
    font-style: italic;
    font-weight: bold;
    color: #666;
}

.site-disclaimer {
    font-size: 0.9rem;
    font-style: italic;
    font-weight: normal;
    color: #666;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
}

/* Filters */
.filters {
    background-color: var(--background-gray);
    padding: 1rem 2rem;
}

.filter-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.filter-select {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    min-width: 150px;
}

#brand.filter-select,
#brand.filter-select + label {
    display: none !important;
}

.search-btn {
    background-color: var(--primary-color);
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    cursor: pointer;
}

.search-btn img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

.time-filter {
    display: flex;
    align-items: center;
    white-space: nowrap;
    font-size: 0.9rem;
    height: 36px; /* Match button height */
}

.time-link {
    color: var(--primary-color);
    text-decoration: none;
    margin: 0 0.25rem;
}

/* Responsive Filters */
.filters-section {
    background-color: var(--background-gray);
    padding: 0.5rem 2rem;
}

.filters-toggle {
    display: none;
    width: 100%;
    padding: 1rem;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
    cursor: pointer;
    text-align: left;
    align-items: center;
    justify-content: space-between;
}

.filters-toggle .toggle-icon {
    transition: transform 0.3s ease;
}

.filters-toggle[aria-expanded="false"] .toggle-icon {
    transform: rotate(180deg);
}

.filters-content {
    transition: max-height 0.3s ease-in-out;
    overflow: hidden;
}

@media (max-width: 768px) {
    .filters-section {
        padding: 0;
    }

    .filters-toggle {
        display: flex;
        border-bottom: 1px solid var(--border-color);
        margin-bottom: 0;
        padding: 1rem 1.5rem;
    }

    .filters-content {
        max-height: 0;
        padding: 0 1.5rem;
    }

    .filters-content.expanded {
        max-height: 500px;
        padding: 1rem 1.5rem;
    }

    .filter-container {
        flex-direction: column;
        gap: 0.75rem;
    }

    .filter-select {
        width: 100%;
    }

    .search-btn {
        width: 100%;
        padding: 0.75rem;
    }

    .time-filter {
        font-size: 0.8rem;
        text-align: center;
        width: 100%;
        order: 2;
        justify-content: center;
        height: auto;
        padding: 0.5rem 0;
    }

    .view-options {
        order: 1;
        width: 100%;
        justify-content: center;
    }

    .pagination-controls {
        width: 100%;
        justify-content: center;
        order: 3;
    }

    .controls-wrapper {
        gap: 1rem;
        justify-content: center;
        padding: 0.5rem;
        min-height: auto;
    }

    .trending-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .product-card {
        padding: 15px;
    }
    
    .filters-section {
        position: sticky;
        top: 0;
        z-index: 100;
        background: white;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
}

/* View Options */
.view-options {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    height: 100%;
}

.view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.5rem;
    cursor: pointer;
    height: 36px; /* Fixed height for consistency */
    width: 36px; /* Fixed width for consistency */
}

.view-btn.active {
    background-color: var(--primary-color);
}

.view-btn img {
    width: 20px;
    height: 20px;
}

.view-btn.active img {
    filter: brightness(0) invert(1);
}

/* Grid View */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

.product-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
    font-size: 0.7rem;
}

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

.product-image-container {
    width: 100%;
    height: 80px;
    overflow: hidden;
    background: #f8f8f8;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-info {
    padding: 0.5rem;
}

.product-name {
    font-size: 0.65rem;
    font-weight: 500;
    margin-bottom: 0.15rem;
    color: var(--text-color);
}

.product-meta {
    display: flex;
    gap: 0.5rem;
    font-size: 0.6rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.price-info {
    margin: 0.25rem 0;
}

.current-price {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-color);
}

.price-change {
    font-size: 0.6rem;
    margin-top: 0.15rem;
}

.price-up {
    color: var(--secondary-color);
}

.price-down {
    color: #f44336;
}

.price-unchanged {
    color: #666;
}

.product-details {
    display: flex;
    gap: 0.5rem;
    font-size: 0.6rem;
    color: #666;
    border-top: 1px solid var(--border-color);
    padding-top: 0.375rem;
    margin-top: 0.375rem;
}

.price-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .content-wrapper {
        padding: 1rem;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.75rem;
    }

    .product-image-container {
        height: 60px;
    }
}

/* Mobile Experience Improvements */
@media (max-width: 768px) {
    .trending-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .product-card {
        padding: 15px;
    }
    
    .filters-section {
        position: sticky;
        top: 0;
        z-index: 100;
        background: white;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
}

/* Table View */
.table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 2rem;
    overflow-x: auto;
}

.product-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    table-layout: fixed;
}

.product-table th {
    background: #f8f9fa;
    padding: 1rem;
    text-align: left;
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
    font-weight: 500;
}

.product-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

/* Fixed width for image column */
.product-table th:first-child,
.product-table td:first-child {
    width: 70px;
}

/* Product name column takes more space */
.product-table th:nth-child(2),
.product-table td:nth-child(2) {
    width: 35%;
}

/* Price columns get equal remaining space */
.product-table th:nth-child(n+3),
.product-table td:nth-child(n+3) {
    width: calc((65% - 70px) / 4);
    text-align: right;
}

.product-table .product-icon {
    font-size: 1.5rem;
    text-align: center;
}

.product-table .product-name {
    font-weight: 500;
    color: var(--text-color);
}

.product-table .price {
    font-family: monospace;
    font-size: 1rem;
}

.product-table .change {
    white-space: nowrap;
}

.product-table .change.up {
    color: var(--secondary-color);
}

.product-table .change.down {
    color: #f44336;
}

.product-table .change.same {
    color: #666;
}

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

.product-image-cell {
    width: 60px;
    padding: 8px !important;
    vertical-align: middle;
}

.table-product-image {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 4px;
    background-color: #fff;
}

.product-link {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.product-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.product-image-cell a {
    display: block;
}

/* Chart Icon */
.chart-icon {
    text-align: center;
    width: 40px;
}

/* Chart Icon - now using letter-based styling with .chart-letter class */

/* Responsive table adjustments */
@media (max-width: 1024px) {
    .table-container {
        margin: 1rem;
    }
    
    .product-table {
        font-size: 0.9rem;
    }
    
    .product-table th,
    .product-table td {
        padding: 0.75rem;
    }
}

@media (max-width: 768px) {
    .table-container {
        margin: 0.5rem;
    }
}

/* Chart View */
.chart-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 2rem;
    margin: 2rem auto;
    max-width: 1200px;
    height: calc(100vh - 300px);
    min-height: 400px;
}

.chart-container h2 {
    color: var(--text-color);
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

@media (max-width: 768px) {
    .chart-container {
        margin: 1rem;
        padding: 1rem;
        height: calc(100vh - 250px);
    }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    gap: 0.5rem;
}

.copyright-section {
    align-self: center;
    text-align: center;
    font-size: 0.7rem;
    color: #666;
    padding: 1rem 0;
}

.page-link {
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-color);
}

.page-link.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-size {
    margin-left: 2rem;
}

#pageSize {
    padding: 0.25rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

/* Grid View Specific Styles */
.content-wrapper {
    padding: 2rem;
    background-color: var(--background-gray);
    min-height: calc(100vh - 200px);
}

/* Controls Wrapper */
.controls-wrapper {
    display: flex;
    align-items: center; /* Ensure vertical middle alignment */
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 0.5rem 0;
    min-height: 48px; /* Ensure consistent height */
}

/* Pagination Controls */
.pagination-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    height: 36px; /* Match other elements */
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 0.7rem;
    height: 28px; /* 36px originally..Match other elements */
    min-width: 80px; /* Ensure buttons have consistent width */
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn:hover:not(:disabled) {
    background: #f5f5f5;
}

/* Mobile and Desktop Pagination */
.mobile-pagination {
    display: none;
    padding: 0.5rem 1rem;
    background: #fff;
    border-bottom: 1px solid var(--border-color);
}

.desktop-pagination {
    display: block;
}

@media (max-width: 768px) {
    .mobile-pagination {
        display: block;
        position: sticky;
        top: 0;
        z-index: 100;
    }

    .desktop-pagination {
        display: none;
    }

    .mobile-pagination .pagination-controls {
        justify-content: space-between;
        width: 100%;
    }

    .mobile-pagination .pagination-btn {
        flex: 1;
        max-width: 160px;
    }
}

/* Trending Products Section */
.trending-section {
    padding: 1rem 2rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid var(--border-color);
}

.trending-header {
    text-align: center;
    margin-bottom: 2rem;
}

.trending-header h2 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 2rem;
    font-weight: 600;
}

.trending-header p {
    margin: 0;
    color: #666;
    font-size: 1.1rem;
}

.trending-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.trending-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.trending-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.trending-image-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.trending-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.trending-image:hover {
    transform: scale(1.05);
}

.trending-info {
    padding: 1.5rem;
}

.trending-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 1rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.trending-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.trending-retailer {
    font-weight: 500;
    color: #007bff;
}

.trending-category {
    color: #28a745;
}

.trending-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.trending-price .price-section {
    flex: 1;
}

.trending-price .current-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: #333;
}

.trending-icons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-start;
}

.trending-chart-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    font-size: 12px;
    font-weight: bold;
    color: #666;
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.trending-chart-icon:hover {
    color: #fff;
    background: #4caf50;
    border-color: #4caf50;
    transform: scale(1.1);
}

.trending-changes {
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

.trending-changes .price-change {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.trending-changes .change-label {
    color: #666;
}

.trending-changes .change-value {
    font-weight: 600;
}

.trending-changes .price-up .change-value {
    color: #dc3545;
}

.trending-changes .price-down .change-value {
    color: #28a745;
}

.trending-changes .price-unchanged .change-label {
    color: #6c757d;
    font-style: italic;
}

/* Responsive design for trending cards */
@media (max-width: 768px) {
    .trending-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .trending-card {
        margin-bottom: 1rem;
    }
    
    .trending-image-container {
        height: 180px;
    }
    
    .trending-info {
        padding: 1rem;
    }
    
    .trending-name {
        font-size: 1rem;
    }
    
    .trending-price .current-price {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .trending-grid {
        grid-template-columns: 1fr;
    }
    
    .trending-section {
        margin: 1rem 0;
    }
    
    .trending-header h2 {
        font-size: 1.5rem;
    }
}

/* Flag Product Styles - now using letter-based styling with .flag-letter class */

/* Flag Popup */
.flag-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flag-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.flag-popup-content {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 450px;
    width: 90%;
    max-height: 80vh;
    overflow: auto;
    animation: flagPopupSlideIn 0.3s ease-out;
}

@keyframes flagPopupSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.flag-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
}

.flag-popup-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.2rem;
}

.flag-popup-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.flag-popup-close:hover {
    background-color: #f5f5f5;
}

.flag-popup-body {
    padding: 1.5rem;
}

.flag-popup-body p {
    margin: 0 0 1rem 0;
    color: #666;
    font-size: 1rem;
}

.flag-reasons {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.flag-reasons label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.flag-reasons label:hover {
    background-color: #f8f9fa;
}

.flag-reasons input[type="radio"] {
    margin: 0;
}

.flag-comment {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    font-size: 0.9rem;
}

.flag-comment:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

.flag-popup-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.5rem;
    border-top: 1px solid #eee;
    background-color: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

.flag-popup-footer button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-cancel {
    background: #6c757d;
    color: white;
}

.btn-cancel:hover {
    background: #5a6268;
}

.btn-confirm {
    background: var(--primary-color);
    color: white;
}

.btn-confirm:hover {
    background: #1976d2;
}

.btn-confirm:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Flag Message */
.flag-message {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1100;
    max-width: 400px;
    animation: flagMessageSlideIn 0.3s ease-out;
}

@keyframes flagMessageSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.flag-message-content {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.flag-message-success .flag-message-content {
    border-color: #28a745;
    background: #f8fff9;
}

.flag-message-error .flag-message-content {
    border-color: #dc3545;
    background: #fff8f8;
}

.flag-message p {
    margin: 0 0 0.75rem 0;
    color: #333;
}

.flag-message button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.flag-message button:hover {
    background: #1976d2;
}

/* Mobile responsiveness for flag popup */
@media (max-width: 480px) {
    .flag-popup-content {
        width: 95%;
        margin: 0.5rem;
    }
    
    .flag-popup-header,
    .flag-popup-body,
    .flag-popup-footer {
        padding: 1rem;
    }
    
    .flag-popup-footer {
        flex-direction: column;
    }
    
    .flag-popup-footer button {
        width: 100%;
    }
    
    .flag-message {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Icons container styling */
.icons-container {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    justify-content: flex-start;
}

.product-icons {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    justify-content: flex-start;
    margin-top: 0.5rem;
}

.trending-icons {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    justify-content: flex-start;
}

/* Share icon styling */
.share-icon-img {
    width: 80%;
    height: 80%;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.2s ease;
    filter: brightness(0) saturate(100%) invert(41%) sepia(10%) saturate(1239%) hue-rotate(202deg) brightness(95%) contrast(93%);
}

.share-icon-img:hover {
    opacity: 1;
    transform: scale(1.1);
    filter: brightness(0) saturate(100%) invert(25%) sepia(85%) saturate(2270%) hue-rotate(218deg) brightness(102%) contrast(98%);
}

/* Icons container share icon specific styling */
.icons-container .share-icon-img {
    width: 12px;
    height: 12px;
}

.product-icons .share-icon-img {
    width: 12px;
    height: 12px;
}

.trending-icons .share-icon-img {
    width: 12px;
    height: 12px;
}

/* Core Web Vitals optimizations */
.product-image {
    aspect-ratio: 1;
    object-fit: cover;
    width: 100%;
    height: auto;
}

.lazy {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazy.loaded {
    opacity: 1;
}

/* Share letter styling */
.share-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    font-size: 12px;
    font-weight: bold;
    color: #666;
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.share-letter:hover {
    color: #fff;
    background: #2196f3;
    border-color: #2196f3;
    transform: scale(1.1);
}

/* Flag letter styling */
.flag-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    font-size: 12px;
    font-weight: bold;
    color: #666;
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.flag-letter:hover {
    color: #fff;
    background: #ff6b35;
    border-color: #ff6b35;
    transform: scale(1.1);
}

/* Favorite letter styling */
.favorite-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    font-size: 12px;
    font-weight: bold;
    color: #666;
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.favorite-letter:hover {
    color: #fff;
    background: #e91e63;
    border-color: #e91e63;
    transform: scale(1.1);
}

/* Chart letter styling */
.chart-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    font-size: 12px;
    font-weight: bold;
    color: #666;
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.chart-letter:hover {
    color: #fff;
    background: #4caf50;
    border-color: #4caf50;
    transform: scale(1.1);
}

/* Icon image styles */
.favorite-icon-img,
.share-icon-img,
.chart-icon-img,
.flag-icon-img {
    width: 16px;
    height: 16px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease, transform 0.2s ease;
}

.favorite-icon-img:hover,
.share-icon-img:hover,
.chart-icon-img:hover,
.flag-icon-img:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Specific hover colors for different icons */
.share-icon-img:hover {
    filter: brightness(0) saturate(100%) invert(27%) sepia(96%) saturate(1458%) hue-rotate(204deg) brightness(91%) contrast(101%);
}

.flag-icon-img:hover {
    filter: brightness(0) saturate(100%) invert(55%) sepia(63%) saturate(4454%) hue-rotate(18deg) brightness(99%) contrast(96%);
}