:root {
    --bg-main: #0f1014;
    --bg-secondary: #1c1d22;
    --bg-card: #25262c;
    --text-primary: #ffffff;
    --text-secondary: #9aa0a6;
    --accent: #00e676; /* Premium Emerald Green */
    --accent-hover: #00c853;
    --glass-bg: rgba(28, 29, 34, 0.8);
    --glass-border: rgba(255, 255, 255, 0.05);
    --border-radius: 12px;
    --spacing: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    overflow-x: hidden;
}

.app-container {
    max-width: 600px; /* Mobile first */
    margin: 0 auto;
    background-color: var(--bg-main);
    min-height: 100vh;
    position: relative;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
}

/* Glassmorphism Utilities */
.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
}

/* Store Header */
.store-header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 12px var(--spacing) 0;
}

.search-bar {
    background: var(--bg-card);
    border-radius: 50px;
    display: flex;
    align-items: center;
    padding: 8px 16px;
    gap: 12px;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.02);
}

.search-bar input {
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    flex-grow: 1;
}

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

.user-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

/* Category Chips */
.chips-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 12px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

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

.chip {
    background: transparent;
    border: 1px solid var(--text-secondary);
    color: var(--text-secondary);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
}

.chip.active {
    background: var(--bg-card);
    border: 1px solid var(--bg-card);
    color: var(--accent);
}

.store-content {
    padding-bottom: 20px;
}

/* Banner Carousel */
.banner-section {
    padding: var(--spacing) 0;
}

.banner-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 0 var(--spacing);
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

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

.banner-card {
    min-width: 280px;
    width: 85%;
    flex-shrink: 0;
    scroll-snap-align: center;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    background: var(--bg-card);
}

.banner-image {
    height: 140px;
    width: 100%;
    display: flex;
    align-items: flex-end;
    padding: 16px;
}

.banner-text {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(0,0,0,0.5);
    padding: 4px 8px;
    border-radius: 4px;
}

.banner-info {
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.banner-app-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: #333;
}

.banner-app-details h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.banner-app-details p {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* App Rows (Horizontal) */
.app-row-section {
    padding: var(--spacing) 0;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--spacing);
    margin-bottom: 16px;
}

.section-title h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

.app-horizontal-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 0 var(--spacing);
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.app-horizontal-scroll::-webkit-scrollbar {
    display: none;
}

.app-card {
    width: 100px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    scroll-snap-align: start;
}

.app-card-icon {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    background: var(--bg-card);
    margin-bottom: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    object-fit: cover;
}

.app-card-title {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.app-card-size {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.app-card-rating {
    font-size: 0.7rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 2px;
}

/* App List (Vertical) */
.app-list-section {
    padding: var(--spacing) 0;
}

.app-list-item {
    display: flex;
    align-items: center;
    padding: 12px var(--spacing);
    gap: 16px;
    transition: background 0.2s;
}

.app-list-item:active {
    background: rgba(255,255,255,0.05);
}

.list-app-icon {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    background: var(--bg-card);
    object-fit: cover;
}

.list-app-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.list-app-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.list-app-info p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.list-rating {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 2px;
}

.btn-list-install {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 6px 16px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-list-install:active {
    background: rgba(0, 230, 118, 0.1);
}

/* Bottom Nav */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    border-top: 1px solid var(--glass-border);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
}

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

.nav-item svg {
    margin-bottom: 2px;
}

/* Bottom Sheet Modal */
.bottom-sheet-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
}
.bottom-sheet-overlay.active {
    opacity: 1;
    pointer-events: all;
}
.bottom-sheet {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-secondary);
    border-radius: 24px 24px 0 0;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1);
    padding: 16px 24px 32px;
    border-top: 1px solid var(--glass-border);
}
.bottom-sheet-overlay.active .bottom-sheet {
    transform: translateY(0);
}
.drag-handle {
    width: 40px;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
    margin: 0 auto 20px;
}
.modal-header {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}
#modal-app-icon {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    object-fit: cover;
}
.modal-app-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.modal-app-info h3 {
    font-size: 1.2rem;
    margin-bottom: 4px;
}
.modal-app-dev {
    color: var(--accent);
    font-size: 0.9rem;
    margin-bottom: 4px;
}
.modal-app-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.modal-screenshots {
    display: flex;
    gap: 12px;
    margin: 24px 0;
    overflow-x: auto;
}
.screenshot-skeleton {
    width: 100px;
    height: 180px;
    border-radius: 12px;
    background: var(--bg-card);
    flex-shrink: 0;
}
.modal-desc {
    font-size: 0.9rem;
    line-height: 1.5;
    color: rgba(255,255,255,0.8);
}
.modal-progress-container {
    margin-top: 16px;
}


/* Button and Progress Styling for Modal */
#modal-install-btn {
    width: 100%;
    background: var(--accent);
    color: #000;
    border: none;
    padding: 14px 24px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    margin-top: 20px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 230, 118, 0.3);
}

#modal-install-btn:active {
    transform: scale(0.97);
    box-shadow: 0 2px 8px rgba(0, 230, 118, 0.4);
}

#modal-install-btn.hidden {
    display: none !important;
}

.btn-text {
    display: inline-block;
}

.btn-text.hidden {
    display: none !important;
}

.btn-loading {
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-loading.hidden {
    display: none !important;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 10px;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

