/* ===== СЕТКА МАГАЗИНА ===== */
.store-main {
    padding: 40px 0;
    min-height: calc(100vh - 80px);
}

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

/* ===== КАРТОЧКА ИГРЫ ===== */
/* Карточки на странице поиска - такие же как на главной */
.game-card {
    position: relative;
    background: var(--dark-card);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.game-card-media {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 соотношение */
    overflow: hidden;
    background: #000;
    flex-shrink: 0;
}

.game-card-media img,
.game-card-media video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.game-card:hover .game-card-media img {
    transform: scale(1.05);
}

.game-card-info {
    padding: 12px 15px;
    background: var(--dark-card);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.game-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-card-meta {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    font-size: 0.8rem;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}

.game-card-category {
    background: rgba(108, 99, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    color: var(--primary);
}

.age-rating {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.7rem;
}

.age-rating.rating-18 { background: var(--danger); color: white; }
.age-rating.rating-12 { background: var(--warning); color: black; }
.age-rating.rating-6 { background: var(--success); color: white; }
.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.game-card-media {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #000;
    overflow: hidden;
}

.game-card-media .default-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    z-index: 1;
}

.game-card-media .hover-media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.game-card-media .hover-screenshot,
.game-card-media .hover-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-card:hover .game-card-media .default-img {
    transform: scale(1.05);
}

/* Бейдж "Новинка" */
.game-card-badge {
    position: absolute;
    top: 12px;
    right: -30px;
    background: linear-gradient(135deg, #ff6b6b, #ff4757);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 4px 30px;
    transform: rotate(45deg);
    z-index: 15;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}

/* Информация под карточкой */
.game-card-info {
    padding: 12px 15px;
    background: var(--dark-card);
}

.game-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-card-meta {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    font-size: 0.8rem;
    flex-wrap: wrap;
    gap: 6px;
}

.game-card-category {
    background: rgba(108, 99, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    color: var(--primary);
}

/* Возрастной рейтинг */
.age-rating {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.7rem;
}

.age-rating.rating-18 {
    background: var(--danger);
    color: white;
}

.age-rating.rating-12 {
    background: var(--warning);
    color: black;
}

.age-rating.rating-6 {
    background: var(--success);
    color: white;
}

/* ===== ТУЛТИП ===== */
.game-tooltip {
    position: fixed;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    max-width: 280px;
    min-width: 250px;
    pointer-events: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.2s ease;
}

.game-tooltip h4 {
    color: var(--primary);
    margin-bottom: 8px;
    font-size: 1rem;
}

.tooltip-description {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
    line-height: 1.4;
}

.tooltip-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
}

.tooltip-tag {
    background: rgba(108, 99, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.65rem;
    color: var(--primary);
}

.tooltip-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0;
    font-size: 0.7rem;
    color: var(--gray);
}

.age-18-badge {
    background: #ff4757;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.65rem;
}

.tooltip-status {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
}

.tooltip-status.status-dev {
    background: var(--primary);
    color: white;
}

.tooltip-status.status-released {
    background: var(--success);
    color: white;
}

.tooltip-status.status-discontinued {
    background: var(--danger);
    color: white;
}

/* ===== ЛОАДЕР ===== */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s linear infinite;
    margin: 40px auto;
}

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

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

/* ===== НЕТ РЕЗУЛЬТАТОВ ===== */
.no-results {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.no-results img {
    max-width: 250px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.no-results h3 {
    color: var(--primary);
    margin-bottom: 10px;
}

.error-message {
    text-align: center;
    padding: 40px;
    grid-column: 1 / -1;
}

/* ===== МОДАЛЬНЫЕ ОКНА ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--dark-card);
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    border: 2px solid var(--primary);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: var(--gray);
    transition: color 0.3s ease;
    line-height: 1;
}

.close-modal:hover {
    color: var(--secondary);
}

/* Предупреждение 18+ */
.age-warning {
    text-align: center;
}

.warning-meme {
    margin-bottom: 20px;
}

.meme-image {
    max-width: 200px;
    border-radius: 15px;
    border: 3px solid var(--danger);
    box-shadow: 0 0 20px rgba(255, 71, 87, 0.4);
}

.age-warning h3 {
    color: var(--danger);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.age-warning p {
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.warning-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

.btn-secondary {
    background: #6c757d;
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--danger);
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background: #ff3742;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 71, 87, 0.3);
}

/* ===== РЕЗУЛЬТАТЫ ПОИСКА (на странице поиска) ===== */
.search-results-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.search-results-header h1 {
    font-size: 1.5rem;
    color: var(--light);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-summary {
    color: var(--gray);
    font-size: 0.9rem;
}

.search-summary .applied-filters {
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--primary);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.applied-filters span {
    background: rgba(108, 99, 255, 0.15);
    padding: 4px 10px;
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.applied-filters i {
    cursor: pointer;
    font-size: 0.7rem;
}

.applied-filters i:hover {
    color: var(--danger);
}

.mt-20 {
    margin-top: 20px;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
    .apps-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }
    
    .warning-buttons {
        flex-direction: column;
    }
    
    .warning-buttons button {
        width: 100%;
    }
    
    .search-results-header h1 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .apps-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        padding: 20px;
    }
    
    .game-card-meta {
        flex-direction: column;
        align-items: flex-start;
    }
}