/* NovaSideloading Design System */

/* 1. Colour Palette */
:root {
    --primary-blue: #4F8CFF;
    --primary-hover: #7C5CFF;

    --app-background: #F6F8FC;
    --card-background: #FFFFFF;
    --sidebar-background: #FFFFFF;

    --borders: #E5E7EB;
    --hover-tint: #F1F5FF;

    --primary-text: #111827;
    --secondary-text: #6B7280;
    --muted-text: #9CA3AF;

    --success: #2ED573;
    --warning: #F59E0B;
    --error: #FF4D4F;
    --info: #38BDF8;
}

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

/* Body */
body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--app-background);
    color: var(--primary-text);
    min-height: 100dvh;
    line-height: 1.5;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
}

/* Layout */
.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px;
    min-height: calc(100dvh - 160px);
}

/* Floating Nav */
.floating-nav {
    position: sticky;
    top: 20px;
    z-index: 1000;
    margin: 0 28px;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 32px;
    background: var(--card-background);
    border: 1px solid var(--borders);
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
    transition: box-shadow 0.2s ease;
}

.nav-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.nav-container:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: nowrap;
}

/* Nav Brand */
.nav-brand {
    flex: 1;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    isolation: isolate;
}

.brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
    isolation: isolate;
}

.brand-title {
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0px;
    color: var(--primary-blue);
    isolation: isolate;
}

/* Nav Links */
.nav-link {
    padding: 10px 16px;
    border-radius: 999px;
    text-decoration: none;
    color: var(--secondary-text);
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background: var(--hover-tint);
    color: var(--primary-blue);
}

/* Nav Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    justify-content: flex-end;
}

/* Hamburger Toggle */
.hamburger-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.hamburger-toggle span {
    width: 20px;
    height: 2px;
    background: var(--primary-text);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-toggle span:nth-child(2) {
    margin: 4px 0;
}

.hamburger-toggle:hover {
    background: var(--hover-tint);
}

.hamburger-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.hamburger-toggle.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--card-background);
    border: 1px solid var(--borders);
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.mobile-menu.active {
    display: block;
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-nav-link {
    padding: 12px 16px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--primary-text);
    font-weight: 500;
    font-size: 14px;
    transition: background 0.2s ease;
}

.mobile-nav-link:hover {
    background: var(--hover-tint);
    color: var(--primary-blue);
}

/* Hero */
.hero-section {
    text-align: center;
    padding: 60px 20px 40px;
}

.hero-title {
    font-size: clamp(28px, 8dvw, 57px);
    font-weight: 700;
    color: var(--primary-text);
    margin-bottom: 16px;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--secondary-text);
}

/* Cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    padding: 32px 0;
}

.card {
    display: block;
    padding: 24px;
    background: var(--card-background);
    border: 1px solid var(--borders);
    border-radius: 16px;
    text-decoration: none;
    color: var(--primary-text);
    transition: all 0.2s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-blue);
}

.card-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.card-icon-svg {
    width: 100%;
    height: 100%;
    display: block;
    opacity: 0.92;
    transition: color 0.2s ease, opacity 0.2s ease;
    isolation: isolate;
}

body.dark .card-icon-svg {
    opacity: 0.98;
}

.card:hover .card-icon-svg {
    opacity: 1;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px 20px;
    color: var(--muted-text);
    font-size: 13px;
}

/* Dark Mode */
body.dark {
    --app-background: #0a0a0c;
    --card-background: #141416;
    --sidebar-background: #141416;

    --borders: #2a2a2e;
    --hover-tint: #1e1e22;

    --primary-text: #f5f5f7;
    --secondary-text: #a1a1a6;
    --muted-text: #6e6e73;

    --primary-blue: #5e8eff;
    --primary-hover: #8b6aff;

    --success: #32d74b;
    --warning: #ff9f0a;
    --error: #ff453a;
    --info: #0a84ff;
}

body.dark .card {
    background: linear-gradient(180deg, #1a1a1d 0%, #141416 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

body.dark .card:hover {
    box-shadow: 0 8px 30px rgba(94, 142, 255, 0.15);
}

body.dark .nav-container {
    background: rgba(20, 20, 22, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

body.dark .nav-container:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

body.dark .hero-title {
    background: linear-gradient(135deg, #f5f5f7 0%, #a1a1a6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass Mode - iOS 26 Liquid Glass Style */
body.glass {
    --app-background: linear-gradient(135deg, #E8F4FF 0%, #F0F8FF 50%, #E8F4FF 100%);
    --card-background: rgba(255, 255, 255, 0.65);
    --sidebar-background: rgba(255, 255, 255, 0.7);

    --borders: rgba(255, 255, 255, 0.8);
    --hover-tint: rgba(255, 255, 255, 0.85);

    --primary-text: #1a1a2e;
    --secondary-text: #4a5568;
    --muted-text: #718096;

    --primary-blue: #4F8CFF;
    --primary-hover: #7C5CFF;

    --success: #2ED573;
    --warning: #F59E0B;
    --error: #FF4D4F;
    --info: #38BDF8;
}

/* Liquid Glass Base Effect */
.liquid-glass {
    position: relative;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 
        0 8px 32px rgba(31, 38, 135, 0.15),
        0 2px 8px rgba(31, 38, 135, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
}

.liquid-glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.4) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.2) 100%
    );
    border-radius: inherit;
    pointer-events: none;
    z-index: -1;
}

.card {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow:
        0 12px 40px rgba(31, 38, 135, 0.18),
        0 4px 12px rgba(31, 38, 135, 0.1),
        inset 0 2px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

body.dark .card {
    background: rgba(30, 30, 30, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.3),
        0 4px 12px rgba(0, 0, 0, 0.2),
        inset 0 2px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

.card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at 30% 30%,
        rgba(255, 255, 255, 0.6) 0%,
        transparent 50%
    );
    pointer-events: none;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

body.dark .card::before {
    background: radial-gradient(
        circle at 30% 30%,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 50%
    );
}

.card:hover::before {
    opacity: 0.8;
}

.card:hover {
    background: rgba(255, 255, 255, 0.65);
    border-color: rgba(79, 140, 255, 0.4);
    box-shadow:
        0 16px 50px rgba(79, 140, 255, 0.2),
        0 6px 16px rgba(31, 38, 135, 0.12),
        inset 0 2px 0 rgba(255, 255, 255, 0.95),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    transform: translateY(-6px);
}

body.dark .card:hover {
    background: rgba(40, 40, 40, 0.65);
    border-color: rgba(79, 140, 255, 0.3);
    box-shadow:
        0 16px 50px rgba(0, 0, 0, 0.4),
        0 6px 16px rgba(0, 0, 0, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(0, 0, 0, 0.4);
}

.nav-container {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 8px rgba(31, 38, 135, 0.08);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

body.dark .nav-container {
    background: rgba(30, 30, 30, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.nav-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at 20% 20%,
        rgba(255, 255, 255, 0.8) 0%,
        transparent 40%
    );
    pointer-events: none;
    opacity: 0.6;
}

body.dark .nav-container::before {
    background: radial-gradient(
        circle at 20% 20%,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 40%
    );
}

.nav-container:hover {
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 6px 20px rgba(31, 38, 135, 0.2);
}

body.dark .nav-container:hover {
    background: rgba(40, 40, 40, 0.8);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.hero-title {
    background: linear-gradient(135deg, #1a1a2e 0%, #4F8CFF 50%, #7C5CFF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 10px rgba(79, 140, 255, 0.2);
}

body.dark .hero-title {
    background: linear-gradient(135deg, #4a4a6e 0%, #6F9CFF 50%, #9C7CFF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mobile-menu {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow:
        0 16px 50px rgba(31, 38, 135, 0.2),
        0 6px 16px rgba(31, 38, 135, 0.1),
        inset 0 2px 0 rgba(255, 255, 255, 0.95),
        inset 0 -1px 0 rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

body.dark .mobile-menu {
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 16px 50px rgba(0, 0, 0, 0.3),
        0 6px 16px rgba(0, 0, 0, 0.2),
        inset 0 2px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

.mobile-menu::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at 30% 30%,
        rgba(255, 255, 255, 0.7) 0%,
        transparent 40%
    );
    pointer-events: none;
    opacity: 0.5;
}

body.dark .mobile-menu::before {
    background: radial-gradient(
        circle at 30% 30%,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 40%
    );
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.9);
    box-shadow:
        0 4px 12px rgba(31, 38, 135, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.dark .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.mobile-nav-link:hover {
    background: rgba(255, 255, 255, 0.9);
    box-shadow:
        0 4px 12px rgba(31, 38, 135, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.dark .mobile-nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.9);
    box-shadow:
        0 4px 12px rgba(31, 38, 135, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.dark .theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.hamburger-toggle:hover {
    background: rgba(255, 255, 255, 0.9);
    box-shadow:
        0 4px 12px rgba(31, 38, 135, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.dark .hamburger-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Dark Mode Toggle */
.theme-toggle {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--secondary-text);
    transition: background .2s ease, color .2s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: var(--hover-tint);
    color: var(--primary-blue);
}

.theme-toggle-icon {
    width: 24px;
    height: 24px;
    display: block;
    opacity: 0.92;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.theme-toggle:hover .theme-toggle-icon {
    opacity: 1;
}

body.dark .theme-toggle-icon {
    opacity: 0.98;
}

/* Mobile Fix */
@media (max-width: 1100px) {
    .nav-center {
        display: none;
    }

    .hamburger-toggle {
        display: flex;
    }

    .floating-nav {
        position: sticky;
    }

    .mobile-menu {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        left: auto;
        transform: none;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 14px 20px;
    }

    .brand-title {
        font-size: 16px;
    }

    .brand-logo {
        width: 32px;
        height: 32px;
    }
}

/* App Picker */
.app-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.app-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: var(--card-background);
    border: 1px solid var(--borders);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.app-option:hover {
    border-color: var(--primary-blue);
    transform: translateY(-2px);
}

.app-option img {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
}

.app-option span {
    font-size: 13px;
    font-weight: 500;
    color: var(--primary-text);
}

body.dark .app-option span {
    color: var(--primary-text);
}

/* App Store Styles */
.app-store-container {
    padding: 32px 0;
}

.app-store-controls {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    align-items: center;
}

.app-store-search {
    flex: 1;
    min-width: 200px;
}

.app-store-search-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--card-background);
    border: 1px solid var(--borders);
    border-radius: 12px;
    font-size: 15px;
    color: var(--primary-text);
    transition: all 0.2s ease;
}

.app-store-search-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.1);
}

.app-store-search-input::placeholder {
    color: var(--muted-text);
}

.app-store-pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-store-pagination-controls label {
    font-size: 14px;
    font-weight: 500;
    color: var(--secondary-text);
}

.app-store-items-select {
    padding: 8px 12px;
    background: var(--card-background);
    border: 1px solid var(--borders);
    border-radius: 8px;
    font-size: 14px;
    color: var(--primary-text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.app-store-items-select:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.app-store-pagination {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    margin-top: 24px;
}

.pagination-info {
    font-size: 14px;
    color: var(--secondary-text);
}

.pagination-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-button {
    padding: 8px 16px;
    background: var(--card-background);
    border: 1px solid var(--borders);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--primary-text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-button:hover {
    background: var(--hover-tint);
    border-color: var(--primary-blue);
}

.pagination-button-active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

.pagination-button-active:hover {
    background: var(--primary-hover);
}

.pagination-ellipsis {
    padding: 8px 4px;
    color: var(--muted-text);
}

.app-store-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 16px;
}

.app-store-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--card-background);
    border: 1px solid var(--borders);
    border-radius: 12px;
    text-decoration: none;
    color: var(--primary-text);
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.app-store-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-blue);
}

.app-store-card-icon {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    border-radius: 16px;
    overflow: hidden;
    background: var(--hover-tint);
}

.app-store-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-store-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.app-store-card-name {
    font-size: 17px;
    font-weight: 600;
    color: var(--primary-text);
    margin-bottom: 0px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-store-card-description {
    font-size: 13px;
    color: var(--secondary-text);
    line-height: 1.4;
}

.app-source-count {
    display: inline-block;
    background: var(--primary-blue);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

.app-store-card-action {
    flex-shrink: 0;
}

.app-store-view-button {
    padding: 8px 20px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.app-store-view-button:hover {
    background: var(--primary-hover);
}

/* App Detail Page */
.app-detail-hero {
    width: 100%;
    margin: -100px 0 0 0;
    padding: 180px 28px 40px;
    position: relative;
    overflow: hidden;
}

.app-detail-hero::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    right: -50px;
    bottom: -50px;
    background-image: var(--hero-bg-image);
    background-size: 200% auto;
    background-position: center;
    filter: blur(80px);
    opacity: 1;
    z-index: -1;
}

.app-detail-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.3) 100%);
    z-index: 0;
    pointer-events: none;
}

.app-detail-hero-content {
    display: flex;
    align-items: center;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.app-detail-icon-wrapper {
    flex-shrink: 0;
}

.app-detail-icon {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    object-fit: cover;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.app-detail-hero-info {
    flex: 1;
}

.app-detail-name {
    font-size: 32px;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.app-detail-version {
    font-size: 16px;
    color: white;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.app-detail-version-selector {
    margin-top: 8px;
}

.version-select {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: var(--primary-text);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.version-select:hover {
    background: rgba(255, 255, 255, 0.3);
}

.version-select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
}

.version-select option {
    background: var(--card-background);
    color: var(--primary-text);
}

.app-detail-share-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.app-detail-share-button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.app-detail-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.app-detail-description h2 {
    font-size: 24px;
    margin-bottom: 16px;
    color: var(--primary-text);
}

.app-detail-description p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--secondary-text);
}

.app-detail-screenshots {
    margin-bottom: 32px;
}

.app-detail-screenshots h2 {
    font-size: 24px;
    margin-bottom: 16px;
    color: var(--primary-text);
}

.screenshots-grid {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
}

.screenshots-grid::-webkit-scrollbar {
    height: 8px;
}

.screenshots-grid::-webkit-scrollbar-track {
    background: var(--hover-tint);
    border-radius: 4px;
}

.screenshots-grid::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 4px;
}

.screenshot-image {
    flex-shrink: 0;
    width: auto;
    height: 400px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid var(--borders);
    scroll-snap-align: start;
}

.app-detail-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.app-detail-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px;
    background: var(--card-background);
    border: 1px solid var(--borders);
    border-radius: 12px;
}

.app-detail-info-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.app-detail-info-value {
    font-size: 15px;
    font-weight: 500;
    color: var(--primary-text);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.app-detail-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.app-detail-download-button {
    padding: 14px 32px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.app-detail-download-button:hover {
    background: var(--primary-hover);
}

.app-detail-back-button {
    padding: 14px 32px;
    background: var(--card-background);
    color: var(--primary-text);
    border: 1px solid var(--borders);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.app-detail-back-button:hover {
    background: var(--hover-tint);
    border-color: var(--primary-blue);
}

.loading-state,
.error-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--secondary-text);
    font-size: 16px;
}

.error-state {
    color: var(--error);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .app-store-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .app-store-card {
        padding: 12px;
    }

    .app-store-card-icon {
        width: 56px;
        height: 56px;
    }

    .app-store-card-name {
        font-size: 15px;
    }

    .app-store-card-description {
        font-size: 12px;
    }

    .app-store-view-button {
        padding: 6px 12px;
        font-size: 13px;
    }

    .app-detail-hero-content {
        flex-direction: column;
        text-align: center;
    }

    .app-detail-icon {
        width: 100px;
        height: 100px;
    }

    .app-detail-name {
        font-size: 24px;
    }

    .app-detail-info {
        grid-template-columns: 1fr;
    }

    .app-detail-actions {
        flex-direction: column;
    }

    .app-detail-download-button,
    .app-detail-back-button {
        width: 100%;
    }
}