/* ApplicationsStore/style.css - Полный стиль для магазина приложений */

/* ===== БАЗОВЫЕ СТИЛИ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6C63FF;
    --secondary: #FF6B6B;
    --dark: #1A1A2E;
    --light: #F1F1F6;
    --gray: #888;
    --success: #2ed573;
    --warning: #ffa502;
    --danger: #ff4757;
}

body {
    background-color: var(--dark);
    color: var(--light);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== ШАПКА МАГАЗИНА ===== */
.store-header {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.store-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--light);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.store-logo:hover {
    opacity: 0.8;
}

.store-logo img {
    height: 40px;
    width: auto;
}

/* ===== ПОИСК ===== */
.search-container {
    display: flex;
    gap: 12px;
    max-width: 500px;
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#searchInput {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: var(--light);
    font-size: 1rem;
    outline: none;
}

#searchInput::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

#searchButton {
    background: var(--primary);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#searchButton:hover {
    background: var(--secondary);
    transform: scale(1.1);
}

/* ===== ОСНОВНОЕ СОДЕРЖИМОЕ ===== */
.store-main {
    min-height: calc(100vh - 80px);
    background: 
        radial-gradient(circle at 20% 50%, rgba(108, 99, 255, 0.1) 0%, transparent 30%),
        radial-gradient(circle at 80% 70%, rgba(255, 107, 107, 0.1) 0%, transparent 30%);
    padding: 40px 0;
}

.store-title {
    text-align: center;
    margin-bottom: 50px;
}

.store-title h1 {
    color: var(--primary);
    font-size: 3rem;
    margin-bottom: 15px;
    font-weight: 800;
}

.store-title p {
    color: var(--gray);
    font-size: 1.3rem;
}

/* ===== СЕТКА ПРИЛОЖЕНИЙ ===== */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 30px;
    width: 100%;
}

.app-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 25px;
    transition: all 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    text-align: center;
}
.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(108, 99, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.app-card:hover::before {
    left: 100%;
}

.app-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

/* Заголовок карточки */
.app-card-header {
    display: flex;
    align-items: flex-start;
    gap: 25px;
    margin-bottom: 20px;
}

.app-icon {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    object-fit: cover;
    border: 4px solid var(--primary);
    background: rgba(108, 99, 255, 0.1);
    padding: 8px;
    box-shadow: 0 8px 25px rgba(108, 99, 255, 0.3);
    transition: all 0.3s ease;
}

.app-card:hover .app-icon {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 12px 35px rgba(108, 99, 255, 0.5);
}

.app-basic-info {
    flex: 1;
    min-width: 0;
}

.app-basic-info h3 {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
    color: var(--light);
    font-weight: 700;
    line-height: 1.2;
    word-wrap: break-word;
    
}

.app-version {
    color: var(--gray);
    font-size: 1rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 12px;
    border-radius: 12px;
    display: inline-block;
}

/* Описание */
.app-description {
    margin-bottom: 20px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Теги */
.app-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.tag {
    background: rgba(108, 99, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--primary);
    border: 1px solid rgba(108, 99, 255, 0.3);
    font-weight: 500;
    transition: all 0.3s ease;
}

.tag:hover {
    background: rgba(108, 99, 255, 0.3);
    transform: scale(1.05);
}

/* Мета-информация */
.app-meta {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 20px;
}

.app-meta p {
    margin: 6px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-meta strong {
    color: var(--light);
    min-width: 110px;
}

/* Прогресс разработки */
.app-progress {
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
    transition: width 1s ease-in-out;
    box-shadow: 0 0 10px rgba(108, 99, 255, 0.5);
}

.progress-text {
    font-size: 0.8rem;
    color: var(--gray);
    text-align: center;
    font-weight: 500;
}

.progress-complete {
    color: var(--success);
    font-weight: 600;
    font-size: 1rem;
    margin: 15px 0;
    text-align: center;
}

/* Возрастной рейтинг */
.age-rating {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 0.8rem;
    margin-left: 10px;
}

.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;
}

/* Кнопка открытия */
.app-card-footer {
    display: flex;
    justify-content: center;
}

.btn-open {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 14px 35px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-open::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-open:hover::before {
    left: 100%;
}

.btn-open:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(108, 99, 255, 0.4);
}

.btn-open:disabled {
    background: var(--gray);
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

/* ===== МОДАЛЬНЫЕ ОКНА ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background: var(--dark);
    border-radius: 20px;
    padding: 30px;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    border: 2px solid var(--primary);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    animation: modalAppear 0.3s ease;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.close-modal {
    float: right;
    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;
    max-width: 450px;
}

.warning-meme {
    margin-bottom: 25px;
}

.meme-image {
    width: 100%;
    max-width: 280px;
    height: auto;
    border-radius: 15px;
    border: 4px solid var(--danger);
    box-shadow: 0 0 30px rgba(255, 71, 87, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.age-warning h3 {
    color: var(--danger);
    margin-bottom: 15px;
    font-size: 1.6rem;
}

.age-warning p {
    margin-bottom: 10px;
    line-height: 1.5;
    font-size: 1.1rem;
}

.age-warning strong {
    color: var(--danger);
    font-size: 1.2rem;
}

.warning-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.btn-secondary {
    background: #6c757d;
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--danger);
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background: #ff3742;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 71, 87, 0.3);
}

/* ===== УТИЛИТЫ ===== */
.no-results-meme {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

.no-results-meme img {
    max-width: 300px;
    width: 100%;
    border-radius: 15px;
    margin-bottom: 20px;
}

.no-results-meme h3 {
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.no-results-meme p {
    color: var(--gray);
    font-size: 1.1rem;
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
    grid-column: 1 / -1;
    justify-self: center;
    margin: 40px 0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--danger);
}

.error-message h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.btn-retry {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 15px;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-retry:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 1024px) {
    .apps-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .store-title h1 {
        font-size: 2.5rem;
    }
    
    .header-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .search-container {
        max-width: 100%;
    }
    
    .apps-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .app-card {
        padding: 20px;
    }
    
    .app-card-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .app-icon {
        width: 80px;
        height: 80px;
        align-self: center;
    }
    
    .app-basic-info h3 {
        font-size: 1.3rem;
    }
    
    .warning-buttons {
        flex-direction: column;
    }
    
    .warning-buttons button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .store-title h1 {
        font-size: 2rem;
    }
    
    .store-title p {
        font-size: 1.1rem;
    }
    
    .app-card {
        padding: 15px;
    }
    
    .app-icon {
        width: 70px;
        height: 70px;
    }
    
    .modal-content {
        padding: 20px;
        margin: 10px;
    }
    
    .container {
        padding: 0 15px;
    }
}

/* ===== АНИМАЦИИ ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.app-card {
    animation: fadeInUp 0.6s ease;
}

.app-card:nth-child(odd) {
    animation-delay: 0.1s;
}

.app-card:nth-child(even) {
    animation-delay: 0.2s;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

/* ===== SELECTION ===== */
::selection {
    background: var(--primary);
    color: white;
}

::-moz-selection {
    background: var(--primary);
    color: white;
}

/* ===== FOCUS STYLES ===== */
button:focus,
input:focus,
a:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ===== PRINT STYLES ===== */
@media print {
    .store-header,
    .search-container,
    .btn-open {
        display: none;
    }
    
    .app-card {
        break-inside: avoid;
        border: 1px solid #000;
        box-shadow: none;
    }
}
/* ===== КНОПКА НАЗАД ===== */
.btn-back {
    background: rgba(255, 255, 255, 0.1);
    color: var(--light);
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-5px);
    color: var(--light);
}
/* Дополнительные стили для статус-баджей */
.app-status-dev {
    /* Стили для метки "В разработке" */
    background-color: #ffc107; /* Желтый фон */
    color: #212529; /* Темный текст */
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.status-soon {
    background: var(--warning);
    color: black;
}

.status-dev {
    background: var(--primary);
    color: white;
}

.status-badge {
    background-color: var(--primary); /* Желтый фон */
    color: #f1f1f1; /* Темный текст */
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.app-status-badge {
    background-color: var(--primary); /* Желтый фон */
    color: #f1f1f1; /* Темный текст */
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
/* Адаптация карточек для статус-баджей */
.app-card {
    position: relative;
}

/* Улучшенные стили для заблокированных кнопок */
.btn-download-main.disabled {
    background: var(--gray) !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
    transform: none !important;
    box-shadow: none !important;
}

.btn-download-main.disabled::before {
    display: none !important;
}
/* Стили для кастомных статусов из general_info */
.status-default {
    background: var(--primary);
    color: white;
}

.status-dev {
    background: var(--primary);
    color: white;
}

.status-soon {
    background: var(--warning);
    color: black;
}

.status-update {
    background: #8a2be2;
    color: white;
}

.status-beta {
    background: #ff69b4;
    color: white;
}

.status-released {
    background: var(--success);
    color: white;
}

.status-discontinued {
    background: var(--danger);
    color: white;
}

.status-planned {
    background: #20b2aa;
    color: white;
}

.status-paused {
    background: #ffa500;
    color: black;
}