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

:root {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #0f0f0f;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-tertiary: rgba(255, 255, 255, 0.5);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-hover: rgba(255, 255, 255, 0.08);
    --accent: #0098EA;
    --positive: #4ade80;
    --negative: #f87171;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

body.light-theme {
    --bg-primary: #f5f5f5;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e0e0e0;
    --text-primary: #1a1a1a;
    --text-secondary: rgba(26, 26, 26, 0.7);
    --text-tertiary: rgba(26, 26, 26, 0.5);
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(0, 0, 0, 0.1);
    --glass-hover: rgba(255, 255, 255, 0.95);
}

body.light-theme .background-gradient {
    background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 50%, #ffffff 100%);
}

.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 50%, #0f0f0f 100%);
    z-index: -2;
}

.background-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.1) 0%, transparent 50%);
    z-index: -1;
}

.header {
    padding: 1.5rem 1rem;
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    background: var(--glass-bg);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
}

.telegram-icon-link {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    z-index: 101;
    color: #0088cc;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.telegram-icon-link:hover {
    background: var(--glass-hover);
    border-color: #0088cc;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 16px rgba(0, 136, 204, 0.3);
    color: #0088cc;
}

.telegram-icon {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.telegram-icon-link:hover .telegram-icon {
    transform: scale(1.1);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

.header-controls {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.header-controls button {
    padding: 0.5rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
}

.header-controls button:hover {
    background: var(--glass-hover);
    border-color: var(--glass-border);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.header-controls button:active {
    transform: translateY(0);
}

.header-controls button.active {
    background: var(--accent);
    border-color: var(--accent);
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, #a0a0a0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}

.main-content {
    padding: 2rem 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

.search-container {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.search-input {
    width: 100%;
    max-width: 500px;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    color: #ffffff;
    font-size: 1rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.sort-controls {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.sort-select {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    color: #ffffff;
    font-size: 0.95rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 3rem;
}

.sort-select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.12);
}

.sort-select option {
    background: #2d2d2d;
    color: #ffffff;
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: rgba(255, 255, 255, 0.7);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.gifts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.gift-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 24px;
    padding: 1.5rem;
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.gift-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.15) 0%, 
        rgba(255, 255, 255, 0.05) 50%,
        transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 0;
}

.gift-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, 
        rgba(255, 255, 255, 0.1) 0%, 
        transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 0;
}

.gift-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4),
                0 0 0 1px rgba(255, 255, 255, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.gift-card:hover::before {
    opacity: 1;
}

.gift-card:hover::after {
    opacity: 1;
}

.gift-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    padding-right: 0;
}

.gift-info {
    flex: 1;
    padding-right: 0;
    min-width: 0;
}

.gift-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    gap: 0.5rem;
    flex-wrap: nowrap;
    padding-right: 0;
}

.gift-info h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    line-height: 1.2;
    flex: 1;
    min-width: 0;
}

.gift-supply {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.25rem;
}

.price-change {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 0;
    flex-shrink: 0;
}

.price-change.positive {
    color: #4ade80;
}

.price-change.negative {
    color: #f87171;
}

.change-arrow {
    font-size: 0.8rem;
}



.price-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0.5rem 0;
    gap: 0.25rem;
}

.price-label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    order: 2;
}

.currency-icon {
    width: 18px;
    height: 18px;
}

.price-value {
    font-weight: 600;
    color: #ffffff;
    font-size: 0.95rem;
    order: 1;
    margin-right: 0.25rem;
}

.footer {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-tertiary);
    font-size: 0.9rem;
    margin-top: 3rem;
}

.auto-refresh-info {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.toggle-auto-refresh {
    padding: 0.5rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.toggle-auto-refresh:hover {
    background: var(--glass-hover);
}

.gift-prices {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    position: relative;
    z-index: 1;
}

.gift-image {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
}

.gift-card:hover .gift-image {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.prices-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* Stats Container */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--glass-border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Advanced Filters */
.filters-container {
    margin-bottom: 2rem;
}

.advanced-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.filter-input {
    padding: 0.75rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.filter-input:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--glass-hover);
}

.clear-filters-btn {
    padding: 0.75rem 1.5rem;
    background: var(--negative);
    border: none;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    align-self: end;
    grid-column: 1 / -1;
}

.clear-filters-btn:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

.controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0;
}

.sort-controls label {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    padding: 0.75rem 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.view-btn:hover {
    background: var(--glass-hover);
}

.view-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.results-count {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.results-count span {
    color: var(--text-primary);
    font-weight: 600;
}

/* Favorite Button */
.favorite-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    font-size: 1.2rem;
}

.favorite-btn:hover {
    background: var(--glass-hover);
    transform: scale(1.1);
}

.favorite-btn.active {
    background: #fbbf24;
    border-color: #fbbf24;
    color: white;
}

.favorite-btn.active:hover {
    background: #f59e0b;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--glass-border);
}

.modal-detail-row:last-child {
    border-bottom: none;
}

.modal-detail-label {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.modal-detail-value {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
}

/* Notifications */
.notification-container {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 400px;
    width: 90%;
}

.notification {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    animation: notificationSlideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.notification.success {
    border-left: 4px solid var(--positive);
}

.notification.error {
    border-left: 4px solid var(--negative);
}

.notification.info {
    border-left: 4px solid var(--accent);
}

.notification-icon {
    font-size: 1.5rem;
}

.notification-message {
    flex: 1;
    color: var(--text-primary);
    font-size: 0.95rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 0.75rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--glass-hover);
    transform: translateY(-2px);
}

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

.pagination-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.pagination-ellipsis {
    padding: 0.75rem 0.5rem;
    color: var(--text-secondary);
}

/* Gift Card Clickable */
.gift-card {
    cursor: pointer;
}

.gift-card:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Refresh Icon Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.refresh-icon {
    display: inline-block;
}

/* Compare Feature */
.compare-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
}

.compare-btn {
    position: relative;
}

.compare-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--glass-bg);
    border-top: 1px solid var(--glass-border);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    padding: 1rem 2rem;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.compare-bar-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.compare-bar-actions {
    display: flex;
    gap: 0.75rem;
}

.view-compare-btn, .clear-compare-bar-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.view-compare-btn {
    background: var(--accent);
    color: white;
}

.view-compare-btn:hover {
    background: #0080c0;
    transform: translateY(-2px);
}

.clear-compare-bar-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.clear-compare-bar-btn:hover {
    background: var(--glass-hover);
}

.gift-card.compare-selected {
    border: 2px solid var(--accent);
    box-shadow: 0 0 20px rgba(0, 152, 234, 0.3);
}

.gift-card .compare-checkbox {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    width: 24px;
    height: 24px;
    cursor: pointer;
    z-index: 3;
    accent-color: var(--accent);
    opacity: 0.3;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.gift-card .compare-checkbox:hover {
    opacity: 0.7;
}

.gift-card .compare-checkbox:checked {
    opacity: 1;
    background: var(--accent);
    border-color: var(--accent);
}

.modal-large {
    max-width: 90%;
    width: 100%;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    overflow-x: auto;
}

.compare-table th,
.compare-table td {
    padding: 1rem;
    text-align: right;
    border-bottom: 1px solid var(--glass-border);
}

.compare-table th {
    background: var(--glass-bg);
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.compare-table tr:hover {
    background: var(--glass-bg);
}

.compare-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.export-image-btn, .clear-compare-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.export-image-btn {
    background: var(--accent);
    color: white;
}

.export-image-btn:hover {
    background: #0080c0;
    transform: translateY(-2px);
}

.clear-compare-btn {
    background: var(--negative);
    color: white;
}

.clear-compare-btn:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

/* Price Alerts */
.alert-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.alert-info {
    flex: 1;
    min-width: 200px;
}

.alert-gift-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.alert-condition {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.alert-actions {
    display: flex;
    gap: 0.5rem;
}

.delete-alert-btn {
    padding: 0.5rem 1rem;
    background: var(--negative);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
}

.delete-alert-btn:hover {
    background: #dc2626;
}

.add-alert-btn {
    width: 100%;
    padding: 1rem;
    background: var(--glass-bg);
    border: 2px dashed var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1rem;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.add-alert-btn:hover {
    background: var(--glass-hover);
    border-color: var(--accent);
}

.alert-form {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.alert-form-group {
    margin-bottom: 1rem;
}

.alert-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.alert-form-group select,
.alert-form-group input {
    width: 100%;
    padding: 0.75rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.alert-form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.save-alert-btn, .cancel-alert-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    flex: 1;
}

.save-alert-btn {
    background: var(--accent);
    color: white;
}

.save-alert-btn:hover {
    background: #0080c0;
}

.cancel-alert-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.cancel-alert-btn:hover {
    background: var(--glass-hover);
}

/* Performance Indicators */
.performance-indicators {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.perf-item {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.perf-item span {
    color: var(--text-primary);
    font-weight: 600;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 50px;
    height: 50px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    z-index: 999;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.back-to-top.visible {
    display: flex;
}

.back-to-top:hover {
    background: var(--glass-hover);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .gifts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .gift-card {
        padding: 1rem;
    }
    
    .favorite-btn {
        top: 0.75rem;
        right: 0.75rem;
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .gift-info h3 {
        font-size: 1.1rem;
        margin-bottom: 0.25rem;
    }
    
    .gift-title-row {
        gap: 0.25rem;
    }
    
    .gift-supply {
        font-size: 0.75rem;
    }
    
    .price-change {
        font-size: 0.8rem;
    }
    
    .gift-prices {
        gap: 0.75rem;
        margin-top: 0.75rem;
    }
    
    .gift-image {
        width: 70px;
        height: 70px;
    }
    
    .price-row {
        padding: 0.25rem 0;
    }
    
    .price-value {
        font-size: 0.85rem;
    }
    
    .search-input {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }
    
    .sort-select {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
        padding-right: 2.5rem;
    }
    
    .main-content {
        padding: 1.5rem 1rem;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }

    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-value {
        font-size: 1.25rem;
    }

    .advanced-filters {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .controls-row {
        flex-direction: column;
        align-items: stretch;
    }

    .sort-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .view-toggle {
        width: 100%;
    }

    .view-btn {
        flex: 1;
    }

    .header-controls {
        gap: 0.5rem;
    }

    .header-controls button {
        font-size: 1rem;
        padding: 0.5rem;
        min-width: 40px;
        min-height: 40px;
    }

    .telegram-icon-link {
        top: 0.75rem;
        left: 0.75rem;
        width: 40px;
        height: 40px;
    }

    .telegram-icon {
        width: 20px;
        height: 20px;
    }

    .back-to-top {
        bottom: 1rem;
        left: 1rem;
        width: 45px;
        height: 45px;
        font-size: 1.25rem;
    }

    .modal-content {
        max-width: 95%;
        margin: 1rem;
    }

    .notification-container {
        width: 95%;
        left: 50%;
    }

    .compare-bar {
        padding: 0.75rem 1rem;
    }

    .compare-bar-content {
        flex-direction: column;
        align-items: stretch;
    }

    .compare-bar-actions {
        width: 100%;
        justify-content: stretch;
    }

    .view-compare-btn, .clear-compare-bar-btn {
        flex: 1;
    }

    .performance-indicators {
        width: 100%;
        justify-content: center;
        margin-top: 1rem;
    }

    .modal-large {
        max-width: 98%;
    }

    .compare-table {
        font-size: 0.85rem;
    }

    .compare-table th,
    .compare-table td {
        padding: 0.5rem;
    }

    .alert-item {
        flex-direction: column;
        align-items: stretch;
    }

    .alert-actions {
        width: 100%;
        justify-content: flex-end;
    }
}