/* ==========================================================================
   ОСНОВНЫЕ СТИЛИ И ПЕРЕМЕННЫЕ (ВАШ КОД + УЛУЧШЕНИЯ)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

/* Улучшенная цветовая палитра для более чистого вида */
:root {
    --primary-blue: #0078d4;
    --primary-blue-hover: #005a9e;
    --text-primary: #1e1e1e;
    --text-secondary: #505050;
    --background-light: #f5f5f5;
    --background-white: #ffffff;
    --shadow-light: rgba(0, 0, 0, 0.08);
    --shadow-strong: rgba(0, 0, 0, 0.15);
    --border-color: #e0e0e0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

body {
    background-color: var(--background-light);
    color: var(--text-primary);
    padding-top: 70px; /* Отступ для фиксированной шапки */
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

/* --- Loader --- */
.loader-wrapper {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--background-white); display: flex;
    justify-content: center; align-items: center; z-index: 9999;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}
.loader-wrapper.hidden { opacity: 0; visibility: hidden; }

/* ==========================================================================
   ШАПКА (HEADER) (ВАШ КОД + УЛУЧШЕНИЯ)
   ========================================================================== */
header {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    /* Улучшенный "фрост-эффект" */
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px) saturate(180%);
    transition: box-shadow 0.3s ease;
}

header.scrolled {
    box-shadow: 0 4px 20px var(--shadow-light);
}

.header-cont { display: flex; align-items: center; justify-content: space-between; padding: 15px 5%; height: 70px; }
.left { display: flex; align-items: center; }
.left h3 { font-size: 1.5rem; }
.left h3 span { font-weight: 300; color: var(--text-secondary); }
.main-nav ul { display: flex; list-style: none; margin-left: 30px; }
.main-nav ul li a { padding: 8px 15px; font-weight: 600; position: relative; color: var(--text-secondary); transition: color 0.3s ease; }
.main-nav ul li a:hover { color: var(--primary-blue); }
.main-nav ul li a.active { color: var(--primary-blue); }
.main-nav ul li a::after {
    content: ''; position: absolute; bottom: -5px; left: 50%;
    transform: translateX(-50%); width: 0; height: 3px;
    background-color: var(--primary-blue); border-radius: 2px;
    transition: width 0.3s ease;
}
.main-nav ul li a.active::after { width: 60%; }
.right { display: flex; align-items: center; width: 40%; }
.search-wrapper { position: relative; width: 100%; margin-right: 20px; }

/* Улучшенное поле поиска */
#search-input {
    width: 100%; padding: 10px 15px; border-radius: 8px; font-size: 0.9rem;
    border: 1px solid var(--border-color);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
#search-input:focus {
    outline: none; border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.3);
}

/* Улучшенная кнопка входа с градиентом и тенью */
.login-btn {
    background: linear-gradient(45deg, var(--primary-blue), #00538c);
    color: white; border: none; padding: 10px 22px; border-radius: 8px;
    cursor: pointer; font-weight: 600; transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 120, 212, 0.3);
    width: 100px;
}
.login-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 120, 212, 0.4); }

.login-link-header {
    background-color: var(--primary-blue);
    color: white !important;
    padding: 8px 20px !important;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    width: 130px;
}
.login-link-header:hover {
    background-color: var(--primary-blue-hover);
    transform: translateY(-2px);
}
.login-link-header::after {
    display: none; /* Убираем подчеркивание у кнопки-ссылки */
}


/* Контейнер для центрирования карточки */
.auth-page-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
    min-height: 80vh;
}

/* Основная карточка */
.auth-card {
    background-color: var(--background-white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px var(--shadow-strong);
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.auth-logo {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
}

.auth-card h1 {
    font-size: 2rem;
    margin-bottom: 25px;
    color: var(--text-primary);
}

.auth-description {
    color: var(--text-secondary);
    margin-bottom: 25px;
    line-height: 1.6;
}

/* Формы */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.auth-form input {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.3);
}

.auth-button {
    background: linear-gradient(45deg, var(--primary-blue), #00538c);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 120, 212, 0.3);
}

.auth-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.4);
}

/* Ссылки для переключения форм */
.auth-links {
    color: var(--text-secondary);
}

.auth-links p {
    margin-top: 15px;
}

.auth-links .switch-link {
    color: var(--primary-blue);
    font-weight: 600;
    cursor: pointer;
}

.auth-links .switch-link:hover {
    text-decoration: underline;
}

/* Утилитарный класс для скрытия/показа форм */
.hidden {
    display: none !important;
}

/* --- Search Suggestions --- */
.search-suggestions {
    display: none; position: absolute; top: 110%; left: 0; width: 100%;
    background-color: var(--background-white); border-radius: 8px;
    box-shadow: 0 5px 20px var(--shadow-strong); z-index: 1001;
    max-height: 300px; overflow-y: auto; border: 1px solid var(--border-color);
}
.suggestion-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 15px; cursor: pointer; transition: background-color 0.2s ease; }
.suggestion-item:hover { background-color: var(--background-light); }
.suggestion-item small { color: var(--text-secondary); }

/* ==========================================================================
   ОСНОВНОЙ КОНТЕНТ (ВАШ КОД + УЛУЧШЕНИЯ)
   ========================================================================== */
main { transition: opacity 0.5s ease; }
.page-content { padding: 20px 5%; }
.content-section { margin: 50px 5%; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.section-header h1 { font-size: 1.8rem; cursor: pointer; transition: color 0.3s ease; }
.section-header h1:hover { color: var(--primary-blue); }

/* --- Slider --- */
.slider { padding: 40px 5%; }
.slide { position: relative; border-radius: 20px; overflow: hidden; height: 60vh; box-shadow: 0 10px 30px var(--shadow-strong); }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide-info {
    position: absolute; bottom: 0; left: 0; width: 100%;
    padding: 80px 50px 50px; color: white;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 10%, transparent 90%);
}
.slide-info h1 { font-size: 3rem; text-shadow: 2px 2px 8px rgba(0,0,0,0.7); }
.slide-info p { font-weight: 300; margin: 15px 0; max-width: 60%; }
.slide-info button {
    padding: 12px 25px; border: none; background-color: var(--background-white);
    color: var(--text-primary); font-weight: 600; border-radius: 8px;
    cursor: pointer; transition: transform 0.2s ease, background-color 0.3s ease;
}
.slide-info button:hover { transform: scale(1.05); }

/* --- Карточки продуктов (Улучшенный дизайн) --- */
.tall-cards-cont {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 25px;
}
.card-tall {
    background-color: var(--background-white); border-radius: 12px;
    overflow: hidden; box-shadow: 0 4px 15px var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-tall:hover { transform: translateY(-5px); box-shadow: 0 8px 25px var(--shadow-strong); }
.card-tall img { width: 100%; height: 260px; object-fit: cover; }
.card-info { padding: 15px; }
.card-info h4 { font-size: 1rem; margin-bottom: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rating-price { display: flex; justify-content: space-between; align-items: center; color: var(--text-secondary); font-size: 0.9rem; }
.square-cards-cont { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.card-square {
    display: flex; align-items: center; background-color: var(--background-white);
    padding: 15px; border-radius: 10px; box-shadow: 0 4px 12px var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-square:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0,0,0,0.15); }
.card-square img { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; margin-right: 15px; }

/* ==========================================================================
   НОВЫЕ СТИЛИ ДЛЯ КАТАЛОГОВ И ФИЛЬТРОВ
   ========================================================================== */
.catalog-page { padding: 40px 5%; }
.filter-container {
    background-color: var(--background-white);
    padding: 20px; border-radius: 12px;
    margin-bottom: 40px; box-shadow: 0 4px 20px var(--shadow-light);
    display: flex; flex-wrap: wrap; gap: 20px; align-items: center;
}
.filter-group { display: flex; flex-direction: column; }
.filter-group label { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 5px; }
.filter-group select, .filter-group .btn {
    padding: 10px; border-radius: 8px; border: 1px solid var(--border-color);
    background-color: var(--background-light); font-size: 0.9rem;
}
#filter-categories-games button, #filter-categories-apps button {
    padding: 10px 15px; margin-right: 10px; border: 1px solid var(--border-color);
    background-color: var(--background-white); border-radius: 8px; cursor: pointer;
    transition: all 0.2s ease;
}
#filter-categories-games button.active, #filter-categories-apps button.active {
    background-color: var(--primary-blue); color: white; border-color: var(--primary-blue);
}
#reset-filters-games, #reset-filters-apps { margin-left: auto; background-color: #e0e0e0; font-weight: 600; }
#reset-filters-games:hover, #reset-filters-apps:hover { background-color: #c7c7c7; }
.catalog-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 25px;
}

/* ==========================================================================
   СТИЛИ СТРАНИЦЫ ПРОДУКТА (ВАШ КОД + УЛУЧШЕНИЯ)
   ========================================================================== */
.product-hero { height: 50vh; background-size: cover; background-position: center; position: relative; }
.hero-overlay { position: absolute; bottom: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to top, #121212 5%, transparent 60%); }
.product-main-content { padding: 0 8%; margin-top: -180px; position: relative; z-index: 2; }
.product-header { display: flex; align-items: flex-end; gap: 20px; margin-bottom: 40px; }
.product-icon { width: 150px; height: 150px; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.product-title-group h1 { font-size: 3rem; margin-bottom: 5px; color: white; text-shadow: 1px 1px 3px rgba(0,0,0,0.5); }
.developer { font-size: 1.2rem; font-weight: 300; color: #f0f0f0; }
.product-actions { margin-left: auto; }
.buy-button {
    background: linear-gradient(45deg, var(--primary-blue), #00538c);
    color: white; border: none; padding: 15px 30px; border-radius: 8px;
    cursor: pointer; font-size: 1.1rem; font-weight: 600;
    transition: all 0.3s ease; box-shadow: 0 2px 8px rgba(0, 120, 212, 0.3);
}
.buy-button:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 120, 212, 0.4); }
.product-details { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; background-color: var(--background-white); padding: 30px; border-radius: 10px; box-shadow: 0 4px 20px var(--shadow-light); }
.product-info-sidebar ul { list-style: none; }
.product-info-sidebar li { margin-bottom: 10px; }


/* ==========================================================================
   НОВЫЕ СТИЛИ ДЛЯ СТРАНИЦЫ "О НАС"
   ========================================================================== */
.about-page .hero {
    padding: 80px 5%; text-align: center; background-color: var(--background-white);
}
.about-page .hero h1 { font-size: 3.5rem; color: var(--text-primary); }
.about-page .hero h1 span { color: var(--primary-blue); }
.about-page .hero p { font-size: 1.2rem; max-width: 700px; margin: 20px auto 0; color: var(--text-secondary); }
.team-section { padding: 60px 5%; }
.team-section h2 { text-align: center; font-size: 2.5rem; margin-bottom: 40px; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.team-member {
    background-color: var(--background-white); text-align: center;
    padding: 30px; border-radius: 12px; box-shadow: 0 4px 20px var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.team-member:hover { transform: translateY(-5px); box-shadow: 0 8px 25px var(--shadow-strong); }
.team-member img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; margin-bottom: 20px; box-shadow: 0 0 0 5px var(--primary-blue); }
.team-member h3 { font-size: 1.4rem; margin-bottom: 5px; }
.team-member p { color: var(--text-secondary); }

/* ==========================================================================
   ФУТЕР И АДАПТИВНОСТЬ (ВАШ КОД)
   ========================================================================== */
.site-footer { background-color: #e3e3e3; color: var(--text-secondary); padding: 40px 5%; font-size: 0.9rem; }
.footer-content { max-width: 1400px; margin: auto; }
.footer-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; margin-bottom: 40px; }
.links-column h4 { color: var(--text-primary); margin-bottom: 15px; font-weight: 600; }
.links-column a { display: block; margin-bottom: 10px; }
.links-column a:hover { color: var(--primary-blue); text-decoration: underline; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; padding-top: 20px; border-top: 1px solid #ccc; font-size: 0.8rem; }
.footer-legal { display: flex; flex-wrap: wrap; }
.footer-legal a, .footer-legal span { margin-left: 15px; margin-top: 10px; }
.footer-legal a:hover { text-decoration: underline; }
.bottom-menu { display: none; }

@media (max-width: 992px) {
    .main-nav { display: none; }
    .right { width: 60%; }
    .slide-info p { max-width: 80%; }
}

@media (max-width: 768px) {
    body { padding-bottom: 70px; }
    .header-cont { padding: 15px 3%; }
    .right { width: auto; }
    .login-btn { display: none; }
    #search-input { width: 150px; }
    .slide-info { padding: 40px 25px 25px; }
    .slide-info h1 { font-size: 1.8rem; }
    .slide-info p { display: none; }
    .content-section, .news-cont { margin: 30px 3%; }
    .bottom-menu {
        position: fixed; bottom: 0; left: 0; width: 100%;
        height: 65px; background-color: rgba(255, 255, 255, 0.85);
        backdrop-filter: blur(10px); display: flex; justify-content: space-around;
        align-items: center; box-shadow: 0 -2px 10px var(--shadow-light); z-index: 1000;
    }
    .bottom-menu-item { display: flex; flex-direction: column; align-items: center; color: var(--text-secondary); }
    .bottom-menu-item.active { color: var(--primary-blue); }
    .bottom-menu-item .fa-solid { font-size: 22px; margin-bottom: 4px; } /* Используем FontAwesome вместо img */
    .bottom-menu-item span { font-size: 0.7rem; }
    .footer-bottom { flex-direction: column; align-items: flex-start; }
    
    /* Адаптивность для фильтров */
    .filter-container { flex-direction: column; align-items: stretch; }
    #reset-filters-games, #reset-filters-apps { margin-left: 0; margin-top: 10px; }
}
/* --- News Section --- */
.news-cont {
    padding: 50px 5%;
    background-color: var(--background-white);
}

.news-cont h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2rem;
}

.news-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.news-card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px var(--shadow-light);
    transition: transform 0.3s ease;
}
.news-card:hover {
    transform: translateY(-5px);
}
.news-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}
.news-card-info {
    padding: 20px;
}
.news-card-info h3 {
    margin-bottom: 10px;
}
.news-card-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ==========================================================================
   НОВЫЕ СТИЛИ ДЛЯ УЛУЧШЕННОЙ СТРАНИЦЫ ПРОДУКТА
   ========================================================================== */

/* Улучшения для шапки продукта */
.product-header {
    align-items: center; /* Лучшее выравнивание по центру */
}

.developer span {
    display: inline-block;
    padding: 3px 8px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    margin-left: 10px;
    font-size: 0.9rem;
}

.short-description {
    color: #c7c7c7;
    font-size: 1rem;
    margin-top: 5px;
}

.product-actions {
    text-align: right;
}

.price-display {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 10px;
}

/* Стили для системы вкладок */
.product-content-tabs {
    margin-top: 90px;
    margin-bottom: 70px;
    background-color: var(--background-white);
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--shadow-light);
    overflow: hidden; /* Чтобы скруглить углы */
}

.product-tabs-nav {
    display: flex;
    background-color: #e9e9e9;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    padding: 15px 25px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    border: none;
    background-color: transparent;
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
}

.tab-btn:hover {
    color: var(--primary-blue);
}

.tab-btn.active {
    color: var(--text-primary);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-blue);
}

.tab-panel {
    display: none; /* Все панели по умолчанию скрыты */
    padding: 30px;
}

.tab-panel.active {
    display: grid; /* Используем grid для раскладки */
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.panel-sidebar h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.details-list {
    list-style: none;
}
.details-list li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}
.details-list li:last-child {
    border-bottom: none;
}
.details-list li strong {
    color: var(--text-primary);
}

/* Стили для системных требований */
#requirements-panel {
    grid-template-columns: 1fr 1fr; /* Переопределяем на 2 равные колонки */
}
.req-column h4 {
    font-size: 1.2rem;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 10px;
}

/* Стили для отзывов */
#reviews-panel {
    grid-template-columns: 1fr; /* Отзывы в одну колонку */
}
.reviews-summary {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}
.overall-rating {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
}
.reviews-summary span {
    font-size: 1rem;
    color: var(--text-secondary);
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.review-card {
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 8px;
}
.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.review-author {
    font-weight: 600;
}
.review-rating {
    font-weight: 700;
}
.review-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
}
.review-body {
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 15px;
}
.review-date {
    font-size: 0.8rem;
    color: #909090;
}

