:root {
    --primary-color: #005FF9;
    --primary-hover: #004EDB;
    --bg-color: #FFFFFF;
    --bg-secondary: #F4F5F7;
    --text-primary: #191C21;
    --text-secondary: #70757D;
    --border-color: #E2E5EB;
    --card-bg: #FFFFFF;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Typography */
h2 {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.header-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.header-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.header-subtitle p {
    margin: 0;
}

.logo img {
    height: 32px;
}

.header-center {
    flex: 1;
    max-width: 500px;
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    transition: background-color 0.2s, box-shadow 0.2s;
}

.search-bar:focus-within {
    background-color: var(--bg-color);
    box-shadow: 0 0 0 2px var(--primary-color);
}

.search-icon {
    color: var(--text-secondary);
    margin-right: 12px;
}

.search-bar input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 15px;
    color: var(--text-primary);
}

.search-bar input::placeholder {
    color: var(--text-secondary);
}

.header-right {
    display: flex;
    gap: 12px;
}

.btn {
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: var(--border-color);
}

/* Nav Menu */
.nav-menu {
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    gap: 32px;
    overflow-x: auto;
}

.nav-container::-webkit-scrollbar {
    display: none;
}

.nav-item {
    padding: 16px 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    position: relative;
    transition: color 0.2s;
}

.nav-item:hover {
    color: var(--text-primary);
}

.nav-item.active {
    color: var(--text-primary);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px 3px 0 0;
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
}

.main-wrapper {
    position: relative;
    min-height: 100vh;
}

.marquee-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 350px;
    overflow: hidden;
    z-index: 1;
}

.marquee-fade-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to bottom, rgba(244, 245, 247, 0), rgba(244, 245, 247, 1));
    z-index: 2;
    pointer-events: none;
}

.content-card {
    background: var(--bg-color);
    padding: 24px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.search-section {
    margin-bottom: 24px;
}

.main-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.search-bar-large {
    display: flex;
    gap: 8px;
    align-items: center;
}

.search-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 12px 16px;
}

.search-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    stroke: var(--text-secondary);
}

.search-input-wrapper input {
    border: none;
    background: transparent;
    width: 100%;
    font-size: 15px;
    outline: none;
    color: var(--text-primary);
}

.search-input-wrapper input::placeholder {
    color: var(--text-secondary);
}

.search-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0 20px;
    height: 44px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-btn:hover {
    background: var(--primary-hover);
}

.apps-list-view {
    display: grid;
    grid-template-rows: repeat(3, auto);
    grid-auto-flow: column;
    grid-auto-columns: 85%;
    gap: 16px;
    margin-bottom: 32px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px; /* space for scrollbar if visible */
}

.apps-list-view::-webkit-scrollbar {
    display: none; /* hide scrollbar for clean look */
}

.app-list-item {
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    background: var(--bg-color);
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
    color: inherit;
}

.app-list-item:hover {
    background: var(--bg-secondary);
}

.app-list-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    object-fit: cover;
    margin-right: 16px;
    border: 1px solid var(--border-color);
}

.app-list-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.app-list-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
    color: var(--text-primary);
}

.app-list-category {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.app-list-rating {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.star-icon {
    color: #6c757d;
    font-size: 14px;
}

.banners-section {
    overflow: hidden;
    padding-bottom: 16px;
    margin-left: -24px;
    margin-right: -24px;
    position: relative;
    width: 100vw;
}

.banners-track {
    display: flex;
    gap: 12px;
    width: max-content;
    animation: scrollBanners 25s linear infinite;
    padding-left: 24px;
}

@keyframes scrollBanners {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-50% - 6px)); }
}

.banner-card {
    flex: 0 0 auto;
    width: 280px;
    height: 160px;
    border-radius: 20px;
    padding: 24px;
    color: white;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.banner-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 16px 32px rgba(0,0,0,0.12);
}

.banner-badge {
    position: absolute;
    top: 20px;
    left: 24px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(255,255,255,0.2);
    padding: 4px 8px;
    border-radius: 8px;
    backdrop-filter: blur(4px);
}

.banner-img {
    position: absolute;
    bottom: -20px;
    right: -10px;
    width: 120px;
    height: 120px;
    object-fit: contain;
    z-index: 1;
    transform: rotate(-10deg);
    filter: drop-shadow(0 12px 24px rgba(0,0,0,0.3));
    user-select: none;
    pointer-events: none;
    animation: floatImage 4s ease-in-out infinite;
}

.banner-card:nth-child(even) .banner-img {
    animation-delay: -2s;
}

.banner-card:nth-child(3n) .banner-img {
    animation-delay: -1.3s;
}

@keyframes floatImage {
    0% { transform: translateY(0) rotate(-10deg); filter: drop-shadow(0 12px 24px rgba(0,0,0,0.3)); }
    50% { transform: translateY(-8px) rotate(-14deg); filter: drop-shadow(0 16px 28px rgba(0,0,0,0.25)); }
    100% { transform: translateY(0) rotate(-10deg); filter: drop-shadow(0 12px 24px rgba(0,0,0,0.3)); }
}

.banner-card h3 {
    font-size: 22px;
    margin-bottom: 6px;
    font-weight: 700;
    position: relative;
    z-index: 2;
    letter-spacing: -0.02em;
}

.banner-card p {
    font-size: 14px;
    opacity: 0.95;
    margin: 0;
    position: relative;
    z-index: 2;
    font-weight: 500;
}

.banner-finance {
    background: #9030de; /* Realistic solid/gradient purple */
}

.banner-security {
    background: linear-gradient(135deg, #0dc2a1, #1ecda3);
}

.banner-social {
    background: linear-gradient(135deg, #005FF9, #00B4DB);
}

/* --- New Categories & Tags --- */

.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.section-link {
    font-size: 14px;
    color: #005FF9;
    text-decoration: none;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.categories-scroll {
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 32px;
    scroll-snap-type: x mandatory;
}

.categories-scroll::-webkit-scrollbar {
    display: none;
}

.categories-grid-horizontal {
    display: grid;
    grid-template-rows: repeat(2, auto);
    grid-auto-flow: column;
    gap: 12px;
    width: max-content;
}

.category-chip {
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.category-chip:hover {
    background: var(--bg-secondary);
}

.chip-icon {
    font-size: 18px;
    margin-right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #005FF9;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
}

.tag-pill {
    background: var(--bg-secondary);
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.2s;
}

.tag-pill:hover {
    background: #e2e4e8;
}


/* Hero Section */
.hero-section {
    margin-bottom: 48px;
}

.hero-carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
}

.hero-carousel::-webkit-scrollbar {
    display: none;
}

.hero-card {
    min-width: 80%;
    height: 360px;
    border-radius: var(--radius-lg);
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    padding: 48px;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('https://static.rustore.ru/imgproxy/blue_arrow_24.e01c569d.svg') no-repeat right 10% bottom 10%;
    opacity: 0.1;
    pointer-events: none;
}

.hero-content {
    z-index: 1;
    max-width: 400px;
}

.hero-content h2 {
    font-size: 40px;
    margin-bottom: 12px;
}

.hero-content p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 32px;
}

/* Apps Section */
.apps-section {
    margin-bottom: 48px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.view-all {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 15px;
}

.view-all:hover {
    color: var(--primary-hover);
}

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

/* App Card */
.app-card {
    display: flex;
    flex-direction: column;
    padding: 16px;
    border-radius: var(--radius-md);
    background: var(--card-bg);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    border: 1px solid transparent;
}

.app-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-color);
    transform: translateY(-2px);
}

.app-icon {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-lg);
    object-fit: cover;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.app-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.app-category {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.app-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.app-install-btn {
    margin-top: auto;
    width: 100%;
    padding: 8px;
    border-radius: var(--radius-sm);
    background-color: var(--bg-secondary);
    color: var(--primary-color);
    border: none;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.app-install-btn:hover {
    background-color: #E6EFFF;
}

/* Footer */
.footer {
    background-color: var(--bg-secondary);
    padding: 48px 0;
    margin-top: 64px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
}

.footer-logo {
    height: 32px;
    margin-bottom: 16px;
}

.footer-desc {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    max-width: 300px;
}

.footer-col h4 {
    font-size: 16px;
    margin-bottom: 20px;
}

.footer-col a {
    display: block;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 12px;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        flex-wrap: nowrap;
    }
    .header-center {
        order: 3;
        min-width: 100%;
    }
    .hero-card {
        min-width: 90%;
        padding: 32px;
        height: 280px;
    }
    .hero-content h2 {
        font-size: 28px;
    }
    .apps-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-container {
        grid-template-columns: 1fr;
    }
}

/* Leave Review Section */
.leave-review-box {
    background-color: #F6F7F8;
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.leave-review-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 4px 0;
}

.leave-review-subtitle {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.leave-review-stars {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
}

.leave-review-stars svg {
    width: 32px;
    height: 32px;
    cursor: pointer;
    transition: transform 0.1s;
}

.leave-review-stars svg:active {
    transform: scale(0.9);
}

.leave-review-input {
    width: 100%;
    min-height: 80px;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 12px;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    margin-bottom: 12px;
    box-sizing: border-box;
    background-color: white;
}

.leave-review-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.leave-review-submit {
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-size: 16px;
    cursor: pointer;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 24px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background-color: rgba(60, 60, 65, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 24px 20px;
    width: 100%;
    max-width: 310px;
    color: white;
    box-sizing: border-box;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.modal-content p {
    font-size: 15px;
    line-height: 1.4;
    margin: 0 0 20px 0;
    text-align: left;
    font-weight: 500;
}

.modal-close-btn {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    border: none;
    border-radius: 14px;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.modal-close-btn:active {
    background-color: rgba(255, 255, 255, 0.25);
}
