/* App Store Specific Styles */
body {
    background: #ffffff !important;
}

/* Override index.css Card Styles */
.container {
    max-width: 800px !important;
    padding: 15px !important;
}

header {
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 15px 0 !important;
    margin-bottom: 15px !important;
    border-bottom: 1px solid #edf2f7;
}

.apps-container {
    max-width: 800px; /* Narrower for list view */
    margin: 10px auto;
    padding: 0;
}

.apps-header {
    margin-bottom: 30px;
}

.apps-header h1 {
    font-size: 2.2rem;
    color: #1a202c;
    margin-bottom: 8px;
    font-weight: 700;
}

/* Play Store Style List Layout */
.app-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.app-list-item {
    display: flex;
    align-items: center;
    padding: 20px 0;
    text-decoration: none;
    border-bottom: 1px solid #edf2f7;
    transition: background 0.2s;
    gap: 20px;
}

.app-list-item:hover {
    background: #f7fafc;
    border-radius: 12px;
    padding: 20px 15px;
    margin: 0 -15px;
    border-bottom-color: transparent;
}

.app-list-icon {
    width: 65px;
    height: 65px;
    border-radius: 16px;
    overflow: hidden;
    background: #f7fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), inset 0 0 0 1px rgba(0,0,0,0.05);
}

.app-list-icon i {
    font-size: 2rem;
    color: #667eea;
}

.app-list-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-list-info {
    flex: 1;
    min-width: 0; /* for text truncation */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.app-name {
    font-weight: 600;
    color: #1a202c;
    font-size: 1.1rem;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-publisher-cat {
    font-size: 0.85rem;
    color: #4a5568;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.publisher-link {
    color: #4a5568;
    cursor: pointer;
    font-weight: 500;
}

.publisher-link:hover {
    color: #2d3748;
    text-decoration: underline;
}

.app-stats-row {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.8rem;
    color: #718096;
    font-weight: 500;
}

.app-list-rating {
    display: flex;
    align-items: center;
    gap: 4px;
}

.app-list-rating i {
    color: #1a202c;
    font-size: 9px;
    margin-top: -1px;
}

.app-list-size {
    display: flex;
    align-items: center;
}

/* Play Store Style Detail Page */
.app-detail-container {
    max-width: 800px; /* Match list width */
    margin: 30px auto;
    padding: 0 20px 40px 20px;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.play-store-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 25px;
}

.ps-title-row {
    margin-bottom: 20px;
}

.ps-title-row h1 {
    font-size: 2rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 5px;
    line-height: 1.2;
}

.ps-publisher {
    color: #01875f;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
}

.ps-publisher:hover {
    text-decoration: underline;
}

.ps-main-info {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.ps-detail-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08), inset 0 0 0 1px rgba(0,0,0,0.05);
    background: #f7fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.ps-detail-icon i {
    font-size: 2.5rem;
}

.ps-detail-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ps-stats-bar {
    display: flex;
    gap: 30px;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none; /* Hide scrollbar */
    padding: 5px 0;
}
.ps-stats-bar::-webkit-scrollbar { display: none; }

.ps-stat-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-width: max-content;
}

.ps-stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: #1a202c;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 2px;
}

.ps-stat-value i {
    font-size: 10px;
}

.ps-stat-label {
    font-size: 0.75rem;
    color: #718096;
    font-weight: 500;
}

.ps-divider {
    width: 1px;
    height: 30px;
    background: #edf2f7;
    margin: auto 0;
}

.action-buttons {
    display: flex;
    flex-direction: row; /* Side by side */
    gap: 12px;
    margin-bottom: 30px;
}

.btn-install {
    flex: 1; /* Make buttons grow to fill space */
    padding: 12px;
    background: #01875f;
    color: white;
    border-radius: 12px; /* Less pill, more rounded square to match screenshot */
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
    text-align: center;
    font-size: 0.95rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
}

.btn-install:hover {
    background: #007050;
}

.screenshot-carousel {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 20px;
    margin-bottom: 40px;
    scroll-snap-type: x mandatory;
}

.screenshot-carousel::-webkit-scrollbar {
    height: 6px;
}

.screenshot-carousel::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 10px;
}

.screenshot {
    flex: 0 0 auto;
    width: 280px;
    height: 500px;
    border-radius: 15px;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    scroll-snap-align: start;
    object-fit: cover;
}

.app-description {
    line-height: 1.8;
    color: #4a5568;
    font-size: 1.05rem;
}

@media (max-width: 768px) {
    .app-main-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .detail-icon {
        width: 150px;
        height: 150px;
    }

    .action-buttons {
        justify-content: center;
    }
}

/* Filter Bar Styles */
.filter-bar {
    margin-top: 20px;
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    border: none;
    border-bottom: 1px solid #edf2f7;
    padding-bottom: 20px;
}

.filter-form {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.search-input-wrapper {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.search-input-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
}

.search-input-wrapper input {
    width: 100%;
    padding: 12px 12px 12px 45px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.filter-group {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group select {
    padding: 10px 15px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    font-size: 0.9rem;
    color: #4a5568;
    outline: none;
    background: white;
}

.btn-apply {
    padding: 10px 20px;
    font-size: 0.9rem;
    background: #4a5568;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-apply:hover {
    background: #2d3748;
}

.clear-link {
    color: #718096;
    font-size: 0.85rem;
    text-decoration: none;
}

@media (max-width: 640px) {
    .filter-bar {
        padding: 12px;
    }

    .filter-form {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .search-input-wrapper {
        min-width: 100%;
    }

    .filter-group {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: space-between;
    }

    .filter-group select {
        flex: 1;
        min-width: calc(50% - 5px);
        font-size: 0.85rem;
        padding: 10px 8px;
    }

    .btn-apply {
        width: 100%;
        padding: 12px;
        font-weight: 600;
        margin-top: 5px;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
    }

    .clear-link {
        width: 100%;
        text-align: center;
        margin-top: 5px;
    }
}

/* User Menu Dropdown */
.menu-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.menu-dots-btn {
    background: none;
    border: none;
    color: #4a5568;
    font-size: 1.2rem;
    padding: 10px;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-dots-btn:hover {
    background: #edf2f7;
}

.menu-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 10px;
    background: white;
    min-width: 200px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    border: 1px solid #edf2f7;
    overflow: hidden;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.menu-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-dropdown a {
    display: block;
    padding: 12px 20px;
    color: #4a5568;
    text-decoration: none;
    font-size: 0.95rem;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-dropdown a i {
    color: #718096;
    width: 20px;
}

.menu-dropdown a:hover {
    background: #f7fafc;
    color: #2d3748;
}

.menu-dropdown a:hover i {
    color: #4a5568;
}