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

body {
    font-family: 'Rubik', sans-serif;
    background: linear-gradient(135deg, #0a1628 0%, #1a2844 50%, #0a1628 100%);
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 119, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(255, 215, 0, 0.1) 0%, transparent 50%);
    animation: bgMove 20s ease infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes bgMove {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(50px, 30px) scale(1.1); }
}

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

.particle {
    position: fixed;
    pointer-events: none;
    animation: float 20s infinite;
    opacity: 0.3;
}

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); }
    25% { transform: translateY(-100px) translateX(50px); }
    50% { transform: translateY(-50px) translateX(-50px); }
    75% { transform: translateY(-150px) translateX(30px); }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* Header */
header {
    padding: 20px 0;
    background: rgba(10, 22, 40, 0.98);
    position: relative;
    z-index: 100;
    border-bottom: 2px solid #ffd700;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo {
    font-family: 'Bebas Neue', 'Arial Black', sans-serif;
    font-size: clamp(1.5rem, 6vw, 2.5rem);
    color: #ffd700;
    text-shadow: 0 0 20px #ffd700, 0 0 40px #ffd700;
    animation: glow 2s ease-in-out infinite;
    cursor: pointer;
    user-select: none;
    font-weight: 400;
    text-decoration: none;
}

@keyframes glow {
    0%, 100% { text-shadow: 0 0 20px #ffd700, 0 0 40px #ffd700; }
    50% { text-shadow: 0 0 30px #ffd700, 0 0 60px #ffd700, 0 0 80px #ff8800; }
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.back-btn {
    background: linear-gradient(135deg, #ffd700, #ff8800);
    color: #0a1628;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Rubik', sans-serif;
    text-decoration: none;
    display: inline-block;
}

.back-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.5);
}

.coin-balance {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 136, 0, 0.2));
    padding: 12px 24px;
    border-radius: 25px;
    border: 2px solid rgba(255, 215, 0, 0.5);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

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

.coin-amount {
    font-size: 1.3rem;
    font-weight: 900;
    color: #ffd700;
}

/* Main Content */
.main-content {
    padding: 40px 0;
    min-height: calc(100vh - 100px);
}

.page-title {
    font-family: 'Bebas Neue', 'Arial Black', sans-serif;
    font-size: clamp(2rem, 8vw, 3.5rem);
    text-align: center;
    margin-bottom: 10px;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    animation: slideDown 1s ease;
    font-weight: 400;
}

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

.page-subtitle {
    text-align: center;
    font-size: 1.3em;
    color: #00d4ff;
    margin-bottom: 40px;
    font-weight: 700;
    animation: fadeIn 1s ease 0.3s both;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Filters */
.filters-container {
    max-width: 1000px;
    margin: 0 auto 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: fadeIn 1s ease 0.5s both;
}

.search-container {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    font-size: 1.1em;
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 25px;
    background: rgba(26, 40, 68, 0.8);
    color: #fff;
    font-family: 'Rubik', sans-serif;
    transition: all 0.3s;
    outline: none;
}

.search-input:focus {
    border-color: #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.search-input::placeholder {
    color: #aaa;
}

.clear-search-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 215, 0, 0.2);
    border: none;
    color: #ffd700;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.clear-search-btn:hover {
    background: rgba(255, 215, 0, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.filter-controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.price-filter {
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-filter label {
    font-size: 0.95em;
    color: #aaa;
    white-space: nowrap;
}

.price-input {
    width: 120px;
    padding: 10px 15px;
    font-size: 1em;
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 20px;
    background: rgba(26, 40, 68, 0.8);
    color: #fff;
    font-family: 'Rubik', sans-serif;
    transition: all 0.3s;
    outline: none;
}

.price-input:focus {
    border-color: #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

/* Убираем стрелки у input type="number" */
.price-input::-webkit-inner-spin-button,
.price-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.price-input {
    -moz-appearance: textfield;
}

.affordable-filter {
    margin-left: auto;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255, 215, 0, 0.5);
    border-radius: 6px;
    background: rgba(26, 40, 68, 0.8);
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
}

.checkbox-label input[type="checkbox"]:hover {
    border-color: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.checkbox-label input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #ffd700, #ff8800);
    border-color: #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.checkbox-label input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #0a1628;
    font-size: 16px;
    font-weight: 900;
}

.checkbox-label span {
    font-size: 1em;
    font-weight: 600;
    color: #fff;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 60px 20px;
    font-size: 1.2em;
    color: #00d4ff;
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 215, 0, 0.3);
    border-radius: 50%;
    border-top-color: #ffd700;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 20px;
}

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

/* Error State */
.error-message {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1), rgba(185, 28, 28, 0.05));
    border-radius: 25px;
    border: 2px solid rgba(220, 38, 38, 0.3);
    max-width: 600px;
    margin: 0 auto;
}

.error-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.error-text h3 {
    font-size: 1.5em;
    color: #ffd700;
    margin-bottom: 10px;
}

.error-text p {
    color: #aaa;
    margin-bottom: 30px;
}

/* Items Grid */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.item-card {
    background: linear-gradient(135deg, rgba(26, 40, 68, 0.95), rgba(10, 22, 40, 0.98));
    border-radius: 20px;
    border: 2px solid rgba(0, 212, 255, 0.3);
    transition: all 0.4s;
    position: relative;
    overflow: hidden;
    animation: slideUp 0.6s ease backwards;
    display: flex;
    flex-direction: column;
}

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

.item-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s;
}

.item-card:hover {
    transform: translateY(-10px);
    border-color: #ffd700;
    box-shadow: 0 20px 60px rgba(255, 215, 0, 0.3);
}

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

.item-card.out-of-stock {
    opacity: 0.6;
    border-color: rgba(107, 114, 128, 0.3);
}

.item-card.out-of-stock::after {
    content: 'НЕТ В НАЛИЧИИ';
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #fff;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.75em;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.item-card.not-affordable {
    border-color: rgba(220, 38, 38, 0.3);
}

.item-image {
    width: 100%;
    height: 240px;
    overflow: hidden;
    border-radius: 15px 15px 0 0;
    background: linear-gradient(135deg, rgba(26, 40, 68, 0.6), rgba(10, 22, 40, 0.8));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

.item-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 30%, rgba(255, 215, 0, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(0, 212, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

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

.item-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.item-header {
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.item-name {
    font-size: 1.4em;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.item-description {
    font-size: 0.95em;
    color: #aaa;
    line-height: 1.5;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
    flex: 1;
}

.item-info {
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.item-quantity {
    font-size: 0.9em;
    color: #aaa;
    display: inline-block;
}

.item-quantity.in-stock {
    color: #ff8800;
    font-weight: 700;
}

.item-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
    margin-top: auto;
}

.buy-btn {
    background: linear-gradient(135deg, #ffd700, #ff8800);
    color: #0a1628;
    border: none;
    padding: 14px 32px;
    border-radius: 25px;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Rubik', sans-serif;
    font-size: 1.3em;
    min-height: 52px;
    width: 100%;
}

.buy-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.5);
}

.buy-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: linear-gradient(135deg, #6b7280, #4b5563);
}

/* Empty Results */
.empty-results {
    text-align: center;
    padding: 80px 20px;
}

.empty-icon {
    font-size: 5em;
    margin-bottom: 20px;
}

.empty-results h3 {
    font-size: 1.8em;
    color: #ffd700;
    margin-bottom: 10px;
}

.empty-results p {
    color: #aaa;
    margin-bottom: 30px;
    font-size: 1.1em;
}

/* Buttons */
.btn {
    padding: 14px 32px;
    font-size: 1.1em;
    font-weight: 700;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Rubik', sans-serif;
    min-height: 48px;
    min-width: 48px;
}

.btn-primary {
    background: linear-gradient(135deg, #ffd700, #ff8800);
    color: #0a1628;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(255, 215, 0, 0.8);
}

.btn-secondary {
    background: linear-gradient(135deg, #FF1EAD, #9333ea);
    color: #fff;
    box-shadow: 0 0 30px rgba(255, 30, 173, 0.5);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(255, 30, 173, 0.8);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.92);
}

.modal-content {
    position: relative;
    background: linear-gradient(135deg, rgba(26, 40, 68, 0.98), rgba(10, 22, 40, 0.98));
    border-radius: 25px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    border: 2px solid rgba(255, 215, 0, 0.5);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

.modal-content.success {
    text-align: center;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 215, 0, 0.2);
    border: none;
    color: #ffd700;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.3em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.modal-close:hover {
    background: rgba(255, 215, 0, 0.4);
    transform: scale(1.1);
}

.modal-title {
    font-family: 'Bebas Neue', 'Arial Black', sans-serif;
    font-size: 2rem;
    color: #ffd700;
    margin-bottom: 25px;
    font-weight: 400;
}

.modal-body {
    margin-bottom: 30px;
}

.modal-item-info {
    margin-bottom: 25px;
}

.modal-item-info h3 {
    font-size: 1.4em;
    color: #fff;
    margin-bottom: 10px;
}

.modal-item-info p {
    color: #aaa;
    line-height: 1.5;
}

.quantity-selector {
    margin: 25px 0;
    padding: 20px;
    background: rgba(255, 215, 0, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.quantity-selector label {
    display: block;
    font-size: 1em;
    color: #fff;
    margin-bottom: 10px;
    font-weight: 600;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 215, 0, 0.5);
    background: rgba(255, 215, 0, 0.1);
    color: #ffd700;
    font-size: 1.5em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.quantity-btn:hover {
    background: rgba(255, 215, 0, 0.3);
    border-color: #ffd700;
    transform: scale(1.1);
}

.quantity-btn:active {
    transform: scale(0.95);
}

#purchaseQuantity {
    width: 80px;
    height: 45px;
    text-align: center;
    font-size: 1.3em;
    font-weight: 700;
    border: 2px solid rgba(255, 215, 0, 0.5);
    border-radius: 10px;
    background: rgba(26, 40, 68, 0.8);
    color: #ffd700;
    font-family: 'Rubik', sans-serif;
    outline: none;
}

#purchaseQuantity:focus {
    border-color: #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

/* Remove spinner arrows from number input */
#purchaseQuantity::-webkit-inner-spin-button,
#purchaseQuantity::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#purchaseQuantity {
    -moz-appearance: textfield;
}

.modal-price-info {
    background: rgba(255, 215, 0, 0.05);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 1.1em;
}

.price-row.total {
    border-top: 2px solid rgba(255, 215, 0, 0.3);
    margin-top: 10px;
    padding-top: 15px;
    font-weight: 700;
}

.price-value,
.balance-value,
.remaining-value {
    font-weight: 900;
    color: #ffd700;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #10b981, #047857);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3em;
    color: #fff;
    margin: 0 auto 25px;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

/* Toast Messages */
.toast-message {
    position: fixed;
    top: 100px;
    right: 30px;
    padding: 20px 30px;
    border-radius: 15px;
    font-weight: 700;
    font-size: 1.1em;
    z-index: 3000;
    display: none;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: slideInRight 0.3s ease;
}

.toast-message.active {
    display: flex;
}

.toast-message.success {
    background: linear-gradient(135deg, #10b981, #047857);
    border: 2px solid #059669;
}

.toast-message.error {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    border: 2px solid #991b1b;
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
    /* Отключаем летающие эмодзи на мобильных */
    .particle {
        display: none !important;
    }

    /* Отключаем все свечения текста на мобильных */
    * {
        text-shadow: none !important;
    }

    /* Отключаем анимацию фона на мобильных для предотвращения горизонтального скролла */
    body::before {
        animation: none;
    }

    .container {
        padding: 0 15px;
    }

    .logo {
        text-shadow: none;
        animation: none;
    }

    nav {
        gap: 15px;
    }

    .header-right {
        gap: 15px;
    }

    .coin-balance {
        padding: 10px 18px;
    }

    .coin-icon {
        font-size: 1.2rem;
    }

    .coin-amount {
        font-size: 1.1rem;
    }

    .page-title {
        font-size: 2.5rem;
    }

    .page-subtitle {
        font-size: 1.1em;
    }

    .filters-container {
        gap: 15px;
    }

    .filter-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .price-filter {
        width: 100%;
        justify-content: space-between;
    }

    .price-input {
        width: 150px;
    }

    .affordable-filter {
        margin-left: 0;
    }

    .items-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .modal-content {
        padding: 30px 20px;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 2rem;
    }

    .page-subtitle {
        font-size: 1em;
    }

    .item-card {
        padding: 0;
    }

    .item-content {
        padding: 20px;
    }

    .item-image {
        height: 220px;
        padding: 15px;
    }

    .buy-btn {
        font-size: 1.2em;
        padding: 12px 28px;
    }

    .section-title {
        font-size: 2rem;
    }
}

/* Полноэкранный индикатор загрузки */
.fullscreen-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 22, 40, 0.98);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.loader-content {
    text-align: center;
    padding: 40px;
    background: rgba(26, 40, 68, 0.8);
    border-radius: 20px;
    border: 2px solid #ffd700;
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.3);
}

.loader-spinner {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border: 6px solid rgba(255, 215, 0, 0.2);
    border-top: 6px solid #ffd700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-text {
    font-size: 1.2rem;
    color: #ffd700;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Адаптивность для модальных окон */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-width: none;
        margin: 10px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-title {
        font-size: 1.5rem;
    }

    .modal-item-info h3 {
        font-size: 1.2rem;
    }

    .quantity-controls {
        flex-wrap: wrap;
    }

    .modal-actions {
        flex-direction: column;
        gap: 10px;
    }

    .modal-actions .btn {
        width: 100%;
    }

    .loader-content {
        padding: 30px 20px;
        margin: 20px;
    }

    .loader-spinner {
        width: 60px;
        height: 60px;
    }

    .loader-text {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 100%;
        margin: 0;
        border-radius: 20px 20px 0 0;
        max-height: 95vh;
    }

    .modal-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }

    .price-row {
        font-size: 0.9rem;
    }

    .loader-content {
        padding: 25px 15px;
        margin: 15px;
    }

    .loader-spinner {
        width: 50px;
        height: 50px;
        border-width: 4px;
    }

    .loader-text {
        font-size: 0.9rem;
    }
}

/* Адаптивность для сетки товаров */
@media (max-width: 1200px) {
    .items-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .items-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }

    .filters-container {
        flex-direction: column;
        gap: 15px;
    }

    .filter-controls {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .price-filter,
    .affordable-filter {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .items-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .item-card {
        padding: 0;
    }

    .item-content {
        padding: 15px;
    }

    .item-image {
        height: 200px;
        padding: 12px;
    }

    .page-title {
        font-size: 2rem;
    }

    .page-subtitle {
        font-size: 0.9rem;
    }
}


/* Модальные окна результата покупки */
.result-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 22, 40, 0.98);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.result-modal-content {
    text-align: center;
    padding: 40px;
    background: rgba(26, 40, 68, 0.8);
    border-radius: 20px;
    border: 2px solid;
    box-shadow: 0 0 40px;
    max-width: 320px;
    width: 90%;
}

.result-modal-content.success {
    border-color: #10b981;
    box-shadow: 0 0 40px rgba(16, 185, 129, 0.3);
}

.result-modal-content.error {
    border-color: #dc2626;
    box-shadow: 0 0 40px rgba(220, 38, 38, 0.3);
}

.result-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 900;
    color: #fff;
    margin: 0 auto 20px;
}

.success-icon-modal {
    background: linear-gradient(135deg, #10b981, #047857);
}

.error-icon-modal {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.result-text {
    font-size: 1.1rem;
    color: #fff;
    font-weight: 600;
    margin: 0 0 25px 0;
    line-height: 1.4;
}

.result-btn {
    min-width: 120px;
}

/* Мобильная адаптация модальных окон результата */
@media (max-width: 480px) {
    .result-modal-content {
        padding: 30px 20px;
        margin: 20px;
        max-width: none;
    }

    .result-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }

    .result-text {
        font-size: 1rem;
    }
}
