/* ==============================================================================
   APPLE CUERTINO & IOS APP STORE DESIGN SYSTEM
   Theme: Minimalist Dark OLED (Không AI màu mè, Tối giản & Đẳng cấp)
   Chỉ huy: Sếp Clack | Kỹ sư: cook45
   Fully Responsive for Mobile (iPhone/Android) & PC Desktop
   ============================================================================== */

:root {
    --bg-base: #000000;
    --bg-surface: #121214;
    --card-surface: #1c1c1e;
    --card-surface-elevated: #252528;
    --card-surface-secondary: #2c2c2e;
    --card-border: rgba(255, 255, 255, 0.08);
    --card-hover-border: rgba(255, 255, 255, 0.2);
    --apple-blue: #0a84ff;
    --apple-blue-hover: #0071e3;
    --apple-green: #30d158;
    --apple-orange: #ff9f0a;
    --text-primary: #ffffff;
    --text-secondary: #8e8e93;
    --text-tertiary: #636366;
}

* {
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Apple Pure Dark Canvas */
.site-shell {
    position: relative;
    background-color: var(--bg-base);
    min-height: 100vh;
}

.site-ambient {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background: radial-gradient(circle at 50% 0%, #16161a 0%, #000000 70%);
}

.site-shell > nav {
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-shell > main {
    position: relative;
    z-index: 10;
}

.site-shell > footer {
    position: relative;
    z-index: 10;
}

.site-shell > .site-content {
    position: relative;
    z-index: 10;
}

/* Apple Glassmorphism Panels */
.glass-panel {
    background: rgba(28, 28, 30, 0.85);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid var(--card-border);
}

.glass-nav {
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* macOS Liquid Glass Bottom Dock (Nghệ thuật & Tối giản Tuyệt Đối cho Sếp Clack) */
.macos-dock-dock {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 45;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    background: rgba(28, 28, 30, 0.78);
    backdrop-filter: blur(36px) saturate(210%);
    -webkit-backdrop-filter: blur(36px) saturate(210%);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 26px;
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.8), 0 0 1px 1px rgba(255, 255, 255, 0.1);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 639px) {
    .macos-dock-dock {
        bottom: calc(14px + env(safe-area-inset-bottom, 0px));
        padding: 6px 10px;
        gap: 6px;
        border-radius: 24px;
        max-width: calc(100vw - 28px);
        overflow-x: auto;
        scrollbar-width: none;
    }
    .macos-dock-dock::-webkit-scrollbar {
        display: none;
    }
}

.macos-dock-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 16px;
    color: #8e8e93;
    background: transparent;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    user-select: none;
    flex-shrink: 0;
}

@media (min-width: 640px) {
    .macos-dock-item {
        width: 48px;
        height: 48px;
        border-radius: 17px;
    }
    .macos-dock-item:hover {
        transform: translateY(-6px) scale(1.15);
        color: #ffffff;
        background: rgba(255, 255, 255, 0.08);
    }
}

.macos-dock-item:active {
    transform: scale(0.92);
}

.macos-dock-item.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25);
}

.macos-dock-item.active .macos-dock-icon {
    color: #0a84ff !important;
}

/* Chấm đèn báo Active dưới đáy icon chuẩn macOS */
.macos-dock-dot {
    position: absolute;
    bottom: 3px;
    width: 4px;
    height: 4px;
    border-radius: 9999px;
    background: #0a84ff;
    box-shadow: 0 0 6px #0a84ff;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.macos-dock-item.active .macos-dock-dot {
    opacity: 1;
}

/* Tooltip hiển thị tên Tab khi hover */
.macos-dock-tooltip {
    position: absolute;
    top: -34px;
    opacity: 0;
    pointer-events: none;
    padding: 4px 10px;
    border-radius: 8px;
    background: rgba(18, 18, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.6);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateY(4px);
}

@media (min-width: 640px) {
    .macos-dock-item:hover .macos-dock-tooltip {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Vạch ngăn cách chuẩn macOS Dock */
.macos-dock-divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.14);
    margin: 0 3px;
    flex-shrink: 0;
}

/* iOS App Store Squircle Icon */
.ios-squircle {
    border-radius: 22%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    aspect-ratio: 1 / 1;
}

/* iOS App Store GET / BUY Button */
.ios-get-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #2c2c2e;
    color: var(--apple-blue);
    font-weight: 700;
    border-radius: 9999px;
    padding: 6px 16px;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(255, 255, 255, 0.06);
    min-height: 32px;
}

.ios-get-btn:hover {
    background: #3a3a3c;
    color: #409cff;
}

.ios-get-btn:active {
    transform: scale(0.92);
}

.ios-buy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--apple-blue);
    color: #ffffff;
    font-weight: 700;
    border-radius: 9999px;
    padding: 8px 20px;
    font-size: 13px;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    min-height: 40px;
}

.ios-buy-btn:hover {
    background: var(--apple-blue-hover);
}

.ios-buy-btn:active {
    transform: scale(0.94);
}

/* App Store Card — Bento Style */
.app-store-card {
    background: var(--card-surface);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-store-card:hover {
    background: #242426;
    border-color: var(--card-hover-border);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.app-store-card:active {
    transform: scale(0.985);
}

/* Apple Spring Animations */
.btn-spring {
    transition: transform 0.15s cubic-bezier(0.2, 0.8, 0.4, 1), background-color 0.15s ease;
}
.btn-spring:active {
    transform: scale(0.95);
}

/* App Store Product Sheet (Modal) - Responsive Mobile & PC */
.ios-sheet {
    background: rgba(28, 28, 30, 0.96);
    backdrop-filter: blur(40px) saturate(190%);
    -webkit-backdrop-filter: blur(40px) saturate(190%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 32px 64px -12px rgba(0, 0, 0, 0.85);
    -webkit-overflow-scrolling: touch;
}

@media (min-width: 640px) {
    .ios-sheet {
        border-radius: 28px;
    }
}

@media (max-width: 639px) {
    .ios-sheet {
        border-top-left-radius: 28px;
        border-top-right-radius: 28px;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        border-bottom: none;
        padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    }
}

.ios-grab-bar {
    width: 38px;
    height: 4.5px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 9999px;
    margin: 0 auto 14px auto;
}

/* Floating Quick Support Capsule (Chỉ Telegram duy nhất theo lệnh Sếp Clack) */
.floating-capsule {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 40;
    background: rgba(28, 28, 30, 0.88);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 9999px;
    padding: 6px 14px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 639px) {
    .floating-capsule {
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        right: 16px;
        padding: 6px 12px;
        font-size: 11px;
    }
}

.floating-capsule:hover {
    border-color: rgba(255, 255, 255, 0.22);
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65);
}

/* Hide scrollbar for category pills bar on mobile */
.scrollbar-none::-webkit-scrollbar {
    display: none;
}
.scrollbar-none {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Custom Scrollbar iOS Style */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #000000;
}
::-webkit-scrollbar-thumb {
    background: #2c2c2e;
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #3a3a3c;
}
