:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-color: #2563eb;
    
    --accent-hover: #1d4ed8;
    
    --success-color: #22c55e;
    --border-color: rgba(148, 163, 184, 0.1);
    --glass-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    background-image: radial-gradient(ellipse at 50% 0%, rgba(37, 99, 235, 0.08) 0%, transparent 60%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent-color);
}


header {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
    letter-spacing: -0.5px;
}

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

.nav-links a {
    font-weight: 500;
    opacity: 0.8;
}

.nav-links a:hover,
.nav-links a.active {
    opacity: 1;
    color: var(--accent-color);
}


main {
    flex: 1;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    width: 100%;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}


.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.7));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: var(--text-primary);
}

a.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--success-color), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}


a.card:hover {
    color: var(--text-primary);
    transform: translateY(-6px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.4), 0 0 30px -5px rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.15);
}

a.card:hover::before {
    opacity: 1;
}

.store-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    opacity: 0.8;
}

.cashback-hero {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
    margin: 0.75rem 0;
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 50%, #16a34a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 8px rgba(34, 197, 94, 0.25));
    letter-spacing: -2px;
}

.cashback-sub {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--success-color);
    margin-top: -0.25rem;
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
    opacity: 0.7;
}

.platform-badge {
    background: rgba(37, 99, 235, 0.08);
    padding: 0.5rem 1.2rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    border: 1px solid rgba(37, 99, 235, 0.15);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.platform-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--accent-color);
    box-shadow: 0 0 6px rgba(37, 99, 235, 0.5);
}

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
    filter: brightness(1.1);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}


.table-container {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: rgba(15, 23, 42, 0.5);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.platform-card {
    justify-content: center;
    min-height: 180px;
}

.platform-initial {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.platform-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}


.text-sm {
    font-size: 0.875rem;
}

.text-muted {
    color: var(--text-secondary);
}

.mt-4 {
    margin-top: 1rem;
}

.mb-4 {
    margin-bottom: 1rem;
}


.search-container {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    padding-right: 3.5rem;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s;
    backdrop-filter: blur(4px);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(30, 41, 59, 0.8);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.search-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--accent-color);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.search-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-50%) scale(1.05);
}

.filter-box {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.platform-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.filter-chip {
    position: relative;
    cursor: pointer;
    user-select: none;
}

.filter-chip input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.filter-chip span {
    display: block;
    padding: 0.6rem 1.25rem;
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filter-chip input:checked~span {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
    transform: translateY(-1px);
}

.filter-chip:hover span {
    background: rgba(45, 55, 75, 0.6);
    border-color: rgba(148, 163, 184, 0.3);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.filter-chip input:checked:hover~span {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #ffffff;
}

.sort-select {
    background: transparent;
    border: none;
    color: inherit;
    font-size: 0.85rem;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    padding: 0;
}

.sort-select:focus {
    outline: none;
}

.sort-select option {
    background: var(--bg-color);
    color: var(--text-primary);
}


.hero-section {
    text-align: center;
    margin-bottom: 2rem;
}

.hero-subtitle {
    font-size: 1.05rem;
    margin-bottom: 2rem;
}


.filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    height: 38px;
}

.filter-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

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

.filter-toggle.expanded .filter-toggle-icon {
    transform: rotate(180deg);
}

.filters-collapsible {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.25s ease;
    opacity: 0;
    margin-bottom: 0;
}

.filters-collapsible.open {
    max-height: 200px;
    opacity: 1;
    margin-bottom: 1.5rem;
}


.results-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1.5rem;
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    backdrop-filter: blur(8px);
    position: relative;
    z-index: 50;
}

.view-toggle {
    display: flex;
    background: rgba(15, 23, 42, 0.6);
    padding: 4px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.toggle-option {
    position: relative;
    cursor: pointer;
}

.toggle-option input {
    display: none;
}

.toggle-option span {
    display: block;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.2s;
}

.toggle-option input:checked+span {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    font-weight: 600;
}

.store-count {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.count-number {
    font-weight: 700;
    color: var(--text-primary);
}

.sort-box {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    color: var(--text-secondary);
    transition: all 0.25s ease;
    cursor: pointer;
    font-size: 0.85rem;
    font-family: inherit;
    font-weight: 500;
    height: 38px;
}

.sort-box:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}


.custom-sort-wrapper {
    position: relative;
    display: inline-block;
}

.custom-sort-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 220px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(12px);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.5rem;
}

.custom-sort-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-sort-option {
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.custom-sort-option:hover {
    background: rgba(37, 99, 235, 0.1);
    color: var(--text-primary);
}

.custom-sort-option.selected {
    background: rgba(37, 99, 235, 0.15);
    color: var(--accent-color);
}

.sort-box.expanded .sort-toggle-icon {
    transform: rotate(180deg);
}

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


.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}


.empty-state p {
    font-size: 1rem;
}




.toolbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.toolbar-left {
    flex: 1 1 150px;
    display: flex;
    justify-content: flex-start;
}

.toolbar-center {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
}

.toolbar-right {
    flex: 1 1 250px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
}


.chart-toolbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    margin-bottom: 1rem;
    gap: 0.5rem;
    width: 100%;
}

.date-picker-group {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.date-picker-left {
    justify-self: start;
}

.date-picker-right {
    justify-self: end;
}

.chart-toggle-center {
    justify-self: center;
    display: inline-flex;
}

.date-btn {
    padding: 0.45rem 0.75rem;
    min-width: 36px;
    height: 38px;
}

.date-input {
    padding: 0.45rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 0.95rem;
    height: 38px;
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}


@media (max-width: 768px) {

    
    main {
        padding: 0 1rem;
        margin: 1rem auto;
    }

    h1 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    .card {
        padding: 1.5rem 1rem;
    }

    
    nav {
        flex-direction: column;
        gap: 1rem;
    }

    nav>div:first-child {
        flex-direction: column;
        gap: 0.2rem;
        text-align: center;
    }

    .nav-links {
        width: 100%;
        justify-content: center;
        gap: 1.5rem;
    }

    
    .toolbar-container {
        flex-direction: column;
        justify-content: center;
        gap: 1.5rem;
    }

    .toolbar-left,
    .toolbar-center,
    .toolbar-right {
        flex: none;
        width: 100%;
        justify-content: center;
    }

    

    
    .filter-sidebar {
        width: 100%;
        right: -100%;
    }

    
    .chart-toolbar {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .date-picker-left,
    .date-picker-right,
    .chart-toggle-center {
        justify-self: center;
        width: 100%;
        justify-content: center;
    }

    
    .chart-toggle-center .toggle-option {
        flex: 1;
        text-align: center;
    }

    
    .details-grid {
        grid-template-columns: 1fr;
        
    }
}