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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #1a1a1a;
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.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: 2rem 1rem;
    text-align: center;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.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.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 1.5rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.gift-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

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

.gift-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.gift-info {
    flex: 1;
}

.gift-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

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

.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.5rem;
}

.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: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

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

.gift-image {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

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

@media (max-width: 768px) {
    .gifts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .gift-card {
        padding: 1rem;
    }
    
    .gift-info h3 {
        font-size: 1.1rem;
        margin-bottom: 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;
    }
}