.gifts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.gifts-grid.updating {
    opacity: 0.5;
    transform: scale(0.98);
}

.gift-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    animation: slideInUp 0.4s ease-out;
}

.gift-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(99, 102, 241, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
}

.gift-card.purchased {
    animation: fadeOutScale 0.6s ease-out forwards;
    pointer-events: none;
}

.gift-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.2);
}

.gift-id {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    font-family: monospace;
    transition: color 0.3s ease;
}

.gift-info-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
}

.gift-info-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.info-icon {
    font-size: 12px;
}

.gift-content {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 160px;
}

.gift-image {
    width: 100%;
    height: 120px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
}

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

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

.gift-name {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    line-height: 1.3;
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    transition: color 0.3s ease;
}

.gift-price-btn {
    width: 100%;
    padding: 12px;
    border: none;
    background: #3b82f6;
    color: white;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    position: relative;
    overflow: hidden;
}

.gift-price-btn.affordable {
    background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
}

.gift-price-btn.affordable:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.gift-price-btn.expensive {
    background: #6b7280;
    cursor: not-allowed;
    opacity: 0.7;
}

.gift-price-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.gift-price-btn:not(:disabled):active {
    transform: translateY(0);
    transition: transform 0.1s ease;
}

.gift-price-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.gift-price-btn:active::before {
    width: 300px;
    height: 300px;
}

.price-icon {
    font-size: 12px;
}

.price-amount {
    font-size: 16px;
    font-weight: 700;
    transition: color 0.3s ease;
}

.price-currency {
    font-size: 12px;
    opacity: 0.8;
}

.wallet-status-card {
    margin-bottom: 20px;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.wallet-status-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.2);
}

.wallet-status-card.connected {
    border-color: rgba(16, 185, 129, 0.3);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), transparent);
}

.wallet-status-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.status-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.status-details {
    flex: 1;
}

.status-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.status-subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-family: monospace;
}

.status-balance {
    display: flex;
    align-items: center;
    gap: 10px;
}

.balance-amount {
    font-weight: bold;
    color: #10b981;
    font-size: 16px;
}

.btn-refresh {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-refresh:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.btn-refresh.loading {
    animation: rotate 1s linear infinite;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
}

.pagination-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-btn:hover:not([disabled]) {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

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

.pagination-info {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.loading-state,
.empty-state,
.error-state {
    text-align: center;
    padding: 40px 20px;
}

.loading-state {
    animation: pulse 1.5s ease-in-out infinite;
}

.empty-state {
    animation: fadeInUp 0.6s ease-out;
}

.loading-state .icon,
.empty-state .icon,
.error-state .icon {
    font-size: 48px;
    margin-bottom: 16px;
}

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

.gifts-info {
    animation: bounceIn 0.5s ease-out;
    text-align: center;
    margin-bottom: 20px;
}

.gifts-info p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.gifts-info strong {
    color: #10b981;
    font-weight: 700;
}

.gift-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(0px);
}

.gift-modal-overlay.visible {
    opacity: 1;
    backdrop-filter: blur(10px);
}

.gift-modal {
    background: #2d3748;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.7) translateY(50px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.gift-modal.visible {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #3b82f6;
    color: white;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #ef4444;
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.modal-content {
    padding: 0;
}

.gift-showcase {
    padding: 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.gift-showcase::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255, 255, 255, 0.1) 10px,
        rgba(255, 255, 255, 0.1) 20px
    );
    opacity: 0.3;
    pointer-events: none;
}

.gift-showcase-image {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.gift-showcase-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gift-showcase-image img:hover {
    transform: scale(1.05);
}

.gift-showcase-image img.enlarged {
    transform: scale(1.5) !important;
    z-index: 1000;
    position: relative;
}

.gift-details {
    padding: 24px;
    background: #1a202c;
}

.gift-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.gift-title h2 {
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin: 0;
    line-height: 1.3;
}

.gift-price {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 80px;
    justify-content: center;
}

.price-value {
    font-size: 16px;
    font-weight: 700;
    color: white;
}

.price-unit {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.gift-attributes {
    margin-bottom: 16px;
}

.attribute-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.attribute-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.attribute-value {
    font-size: 14px;
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.attribute-percent {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.gift-rarity {
    margin-bottom: 16px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.rarity-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.rarity-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.rarity-value {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rarity-score {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
}

.gift-id-section {
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gift-id-section:hover {
    background: rgba(255, 255, 255, 0.1);
}

.gift-id-label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.copy-icon {
    font-size: 12px;
}

.id-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.gift-id-value {
    font-family: monospace;
    font-size: 14px;
    color: white;
    font-weight: 600;
    word-break: break-all;
}

.modal-open {
    overflow: hidden;
}

.gift-card[data-rarity="legendary"] {
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(245, 158, 11, 0.3);
}

.gift-card[data-rarity="epic"] {
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        0 0 15px rgba(139, 92, 246, 0.3);
}

.gift-card[data-rarity="rare"] {
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        0 0 10px rgba(59, 130, 246, 0.3);
}

.gift-card:nth-child(1) { animation-delay: 0s; }
.gift-card:nth-child(2) { animation-delay: 0.1s; }
.gift-card:nth-child(3) { animation-delay: 0.2s; }
.gift-card:nth-child(4) { animation-delay: 0.3s; }
.gift-card:nth-child(5) { animation-delay: 0.4s; }
.gift-card:nth-child(6) { animation-delay: 0.5s; }

@keyframes fadeOutScale {
    0% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05) rotate(2deg);
    }
    100% {
        opacity: 0;
        transform: scale(0.8) rotate(-2deg);
        height: 0;
        margin: 0;
        padding: 0;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.02);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

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

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@media (max-width: 768px) {
    .gifts-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .gift-card {
        border-radius: 12px;
    }

    .gift-card:hover {
        transform: translateY(-4px) scale(1.01);
    }

    .gift-content {
        height: 140px;
    }

    .gift-image {
        height: 100px;
    }

    .gift-name {
        font-size: 13px;
        padding: 10px 12px;
    }

    .gift-price-btn {
        padding: 10px;
        font-size: 13px;
    }

    .gift-price-btn:not(:disabled):hover {
        transform: translateY(-1px);
    }

    .price-amount {
        font-size: 14px;
    }

    .wallet-status-info {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .status-balance {
        justify-content: center;
    }

    .gift-modal {
        width: 95%;
        max-width: none;
        margin: 20px;
    }

    .modal-header {
        padding: 12px 16px;
    }

    .gift-showcase {
        padding: 32px 20px;
    }

    .gift-showcase-image {
        width: 100px;
        height: 100px;
    }

    .gift-showcase-image img.enlarged {
        transform: scale(1.3) !important;
    }

    .gift-details {
        padding: 20px;
    }

    .gift-title {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .gift-title h2 {
        font-size: 18px;
    }

    .gift-rarity {
        padding: 8px;
        margin-bottom: 12px;
    }

    .rarity-value {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .gifts-grid {
        gap: 8px;
    }

    .gift-card {
        border-radius: 10px;
    }

    .gift-content {
        height: 120px;
    }

    .gift-image {
        height: 80px;
    }

    .gift-name {
        font-size: 12px;
        padding: 8px 10px;
    }

    .gift-price-btn {
        padding: 8px;
        font-size: 12px;
    }

    .price-amount {
        font-size: 13px;
    }

    .gift-modal {
        width: 98%;
        margin: 10px;
    }

    .gift-showcase {
        padding: 20px 15px;
    }

    .gift-showcase-image {
        width: 80px;
        height: 80px;
    }

    .gift-details {
        padding: 15px;
    }
}

.notification {
    animation: slideInRight 0.3s ease-out;
}

.text-center { text-align: center; }
.text-success { color: #10b981; }
.text-warning { color: #f59e0b; }
.text-error { color: #ef4444; }

.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }

.p-4 { padding: 16px; }
.p-6 { padding: 24px; }

.rounded { border-radius: 8px; }
.rounded-lg { border-radius: 12px; }
.rounded-xl { border-radius: 16px; }