/* === iOS 26 LIQUID GLASS DESIGN TOKENS === */
:root {
    --glass-bg: rgba(255, 255, 255, 0.45);
    --glass-bg-light: rgba(255, 255, 255, 0.55);
    --glass-bg-dark: rgba(0, 0, 0, 0.35);
    --glass-border: rgba(255, 255, 255, 0.35);
    --glass-blur: blur(24px) saturate(160%) brightness(1.05);
    --glass-blur-heavy: blur(50px) saturate(200%) brightness(1.08);
    --glass-blur-light: blur(16px) saturate(130%);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.6);
    --glass-specular: inset 0 0.5px 0 rgba(255, 255, 255, 0.7);
    --glass-refraction: rgba(200, 220, 255, 0.06);
    --glass-radius: 26px;
    --glass-surface-bg: rgba(255, 255, 255, 0.12);
    --ios-blue: #007aff;
    --ios-green: #34c759;
    --ios-red: #ff3b30;
    --ios-orange: #ff9500;
    --ios-yellow: #ffcc00;
    --ios-purple: #af52de;
    --ios-pink: #ff2d55;
    --ios-teal: #5ac8fa;
    --ios-gray: #8e8e93;
    --ios-gray-light: #f2f2f7;
    --ios-gray-dark: #1c1c1e;
    --text-primary: #000;
    --text-secondary: rgba(60, 60, 67, 0.6);
    --text-tertiary: rgba(60, 60, 67, 0.3);
    --spring-bounce: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --spring-smooth: cubic-bezier(0.32, 0.72, 0, 1);
    --spring-gentle: cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* === REUSABLE GLASS SURFACE UTILITY === */
.glass-surface {
    background: transparent;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border: 0.5px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    isolation: isolate;
}

/* === REUSABLE GLASS TAB BAR === */
.glass-tab-bar {
    position: absolute;
    bottom: 12px;
    left: 16px;
    right: 16px;
    display: flex;
    border-radius: 999px;
    background: transparent;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border: 0.5px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    padding: 6px 8px 8px;
    z-index: 100;
    isolation: isolate;
    transition: all 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}
.glass-tab-bar.minimized {
    padding: 4px 8px 6px;
    transform: scale(0.92);
    opacity: 0.9;
}
.glass-tab-bar .tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 4px 0;
    cursor: pointer;
    color: #8e8e93;
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;
}
.glass-tab-bar .tab-item.active {
    color: #007AFF;
}
.glass-tab-bar .tab-item.active::before {
    content: '';
    position: absolute;
    top: -6px;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 72px;
    background: rgba(120, 120, 128, 0.16);
    backdrop-filter: blur(8px) saturate(140%);
    -webkit-backdrop-filter: blur(8px) saturate(140%);
    border-radius: 999px;
    border: 0.5px solid rgba(255,255,255,0.28);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 1px 4px rgba(0,0,0,0.08);
    z-index: -1;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.glass-tab-bar.tab-switching .tab-item.active::before {
    animation: tabLiquid 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes tabLiquid {
    0%  { transform: translateX(-50%) scaleX(2.2) scaleY(0.45); filter: blur(6px); width: 80px; opacity: 0.7; }
    50% { transform: translateX(-50%) scaleX(0.84) scaleY(1.18); filter: blur(1px); opacity: 1; }
    75% { transform: translateX(-50%) scaleX(1.06) scaleY(0.96); filter: blur(0); }
    100%{ transform: translateX(-50%) scaleX(1) scaleY(1); filter: blur(0); opacity: 1; }
}
.glass-tab-bar .tab-item svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}
.glass-tab-bar .tab-item span {
    font-size: 10px;
    font-weight: 500;
}

/* === GENERAL RESET & SIMULATOR === */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background: #000;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    -webkit-font-smoothing: antialiased;
}

/* === PWA STANDALONE MODE === */
@media all and (display-mode: standalone), all and (display-mode: fullscreen) {
    #simulator {
        max-width: 100vw !important;
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }
    html, body {
        overflow: hidden !important;
    }
}

html.pwa-standalone #simulator {
    max-width: 100vw !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* === LOCKDOWN MODE STYLES === */
body.lockdown-mode {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

body.lockdown-mode::-webkit-scrollbar {
    display: none;
}

body.lockdown-mode {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

body.lockdown-mode * {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

body.lockdown-mode input,
body.lockdown-mode textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

#simulator {
    position: relative;
    width: 100vw;
    height: 100vh;
    max-width: 420px;
    max-height: 100vh;
    background: url('https://cdn.builder.io/api/v1/assets/4bdb8a64a9b24066ad1311bb7783fba0/backdrop.jpg') center/cover no-repeat;
    overflow: hidden;
    box-shadow: 0 0 80px rgba(0,0,0,0.6);
    contain: layout style;
    transform: translateZ(0);
}

/* === iOS 26 STATUS BAR (Liquid Glass Floating) === */
#status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 24px;
    height: 36px;
    box-sizing: border-box;
    z-index: 100000;
    color: #fff;
    font-weight: 600;
    position: relative;
    transition: transform 0.3s ease, opacity 0.3s ease;
    background: transparent;
    margin-top: 10px;
    margin-right: 7px;
    margin-left: 7px;
}

#status-bar svg path,
#status-bar svg rect {
    fill: #fff;
}

#sb-left, #sb-right {
    flex: 1;
    display: flex;
    align-items: center;
}

#sb-left { justify-content: flex-start; }
#sb-right { justify-content: flex-end; gap: 6px; }
#sb-center { width: 100px; }
#time { font-size: 17px; letter-spacing: -0.4px; font-weight: 600; }

/* Signal Bars (4 bars getting bigger) */
.signal-bars {
    display: flex;
    align-items: flex-end;
    gap: 1.5px;
    height: 12px;
}
.signal-bar {
    width: 3px;
    background: #fff;
    border-radius: 1px;
}
.signal-bar:nth-child(1) { height: 4px; }
.signal-bar:nth-child(2) { height: 6px; }
.signal-bar:nth-child(3) { height: 9px; }
.signal-bar:nth-child(4) { height: 12px; }

/* WiFi Icon */
.sb-icon-wifi {
    width: 18px;
    height: 18px;
}

/* Battery Icon */
.sb-icon-batt {
    width: 28px;
    height: 14px;
}

/* === HOME SCREEN PAGES (Swipeable) === */
#home-pages-container {
    position: absolute;
    top: 54px;
    left: 0;
    right: 0;
    bottom: 120px;
    overflow: hidden;
    z-index: 10;
}

#home-pages-track {
    display: flex;
    width: 300%;
    height: 100%;
    transform: translateX(-33.333%);
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
    will-change: transform;
}

#home-pages-track.dragging {
    transition: none;
}

.home-page {
    width: 33.333%;
    height: 100%;
    flex-shrink: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

/* Page Indicators */
#page-indicators {
    position: absolute;
    bottom: 112px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 101;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 12px;
}

.page-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
    cursor: pointer;
}

.page-dot.active {
    background: #fff;
    width: 24px;
    border-radius: 4px;
}

/* === WIDGETS PAGE (iOS 26 Liquid Glass) === */
.widgets-container {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.widget-glass {
    background: transparent;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 27px;
    border: 0.5px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    padding: 16px;
    color: #1c1c1e;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.widget-glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: none;
    pointer-events: none;
    border-radius: 27px 27px 0 0;
}

.widget-large {
    min-height: 160px;
}

.widget-medium {
    min-height: 100px;
}

.widget-small {
    flex: 1;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.widget-row {
    display: flex;
    gap: 16px;
}

/* Weather Widget */
#weather-widget .widget-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

#weather-widget .widget-location {
    font-size: 18px;
    font-weight: 600;
}

#weather-widget .widget-temp {
    font-size: 48px;
    font-weight: 300;
    line-height: 1;
}

#weather-widget .widget-condition {
    font-size: 15px;
    color: rgba(60, 60, 67, 0.8);
    margin-top: 4px;
}

#weather-widget .widget-hourly {
    display: flex;
    gap: 20px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.hourly-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 14px;
}

.hourly-item span:first-child {
    color: rgba(60, 60, 67, 0.6);
    font-size: 12px;
}

/* Battery Widget */
#battery-widget .widget-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--ios-green) 0%, #2fb34a 100%);
    border-radius: 10px;
    margin-bottom: 8px;
}

#battery-widget .widget-label {
    font-size: 12px;
    color: rgba(60, 60, 67, 0.6);
}

#battery-widget .widget-value {
    font-size: 28px;
    font-weight: 600;
    margin-top: 4px;
}

/* Calendar Widget */
#calendar-widget .widget-day {
    font-size: 12px;
    color: var(--ios-red);
    font-weight: 600;
    letter-spacing: 0.5px;
}

#calendar-widget .widget-date {
    font-size: 42px;
    font-weight: 300;
    line-height: 1.1;
}

#calendar-widget .widget-month {
    font-size: 14px;
    color: rgba(60, 60, 67, 0.6);
}

/* Music Widget */
#music-widget {
    display: flex;
    align-items: center;
    gap: 12px;
}

#music-widget .widget-music-art {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, #fc3c44 0%, #fa233b 100%);
    flex-shrink: 0;
}

#music-widget .widget-music-info {
    flex: 1;
    min-width: 0;
}

#music-widget .widget-music-title {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#music-widget .widget-music-artist {
    font-size: 13px;
    color: rgba(60, 60, 67, 0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#music-widget .widget-music-controls {
    display: flex;
    gap: 8px;
}

#music-widget .widget-music-controls svg {
    width: 28px;
    height: 28px;
    fill: #1c1c1e;
    cursor: pointer;
}

/* Screen Time Widget */
#screen-time-widget .widget-st-header {
    font-size: 13px;
    color: rgba(60, 60, 67, 0.6);
    margin-bottom: 4px;
}

#screen-time-widget .widget-st-time {
    font-size: 28px;
    font-weight: 600;
}

#screen-time-widget .widget-st-bar {
    display: flex;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin: 12px 0 8px;
    background: rgba(0, 0, 0, 0.1);
}

#screen-time-widget .st-bar-fill {
    height: 100%;
}

#screen-time-widget .widget-st-label {
    font-size: 13px;
    color: rgba(60, 60, 67, 0.6);
}

/* === APP LIBRARY PAGE === */
.app-library-container {
    padding: 16px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.app-library-search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: transparent;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 999px;
    border: 0.5px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    isolation: isolate;
    margin-bottom: 20px;
}

.app-library-search svg {
    width: 20px;
    height: 20px;
    fill: rgba(60, 60, 67, 0.6);
    flex-shrink: 0;
}

.app-library-search input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 17px;
    color: #1c1c1e;
    outline: none;
}

.app-library-search input::placeholder {
    color: rgba(60, 60, 67, 0.6);
}

.app-library-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    flex: 1;
    overflow-y: auto;
}

.app-library-category {
    background: transparent;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 24px;
    border: 0.5px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    isolation: isolate;
}

.category-label {
    font-size: 14px;
    font-weight: 600;
    color: #1c1c1e;
}

.category-icons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.mini-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition: transform 0.15s var(--spring-bounce);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.mini-icon:active {
    transform: scale(0.9);
}

/* App Library List View (Contacts-style) */
.app-library-list {
    display: none;
    flex: 1;
    overflow-y: auto;
    padding-bottom: 20px;
    position: relative;
}

.app-list-section {
    margin-bottom: 8px;
}

.app-list-header {
    font-size: 20px;
    font-weight: 700;
    color: #1c1c1e;
    padding: 8px 0;
    position: sticky;
    top: 0;
    z-index: 5;
}

.app-list-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    margin-bottom: 2px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 14px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.app-list-row:active {
    background: rgba(255, 255, 255, 0.9);
}

.app-list-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    flex-shrink: 0;
}

.app-list-name {
    font-size: 17px;
    font-weight: 400;
    color: #1c1c1e;
}

.app-list-index {
    position: fixed;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    z-index: 50;
    padding: 4px;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 10px;
}

.index-letter {
    font-size: 11px;
    font-weight: 600;
    color: #007aff;
    cursor: pointer;
    padding: 1px 4px;
}

.index-letter:active {
    background: rgba(0, 122, 255, 0.2);
    border-radius: 4px;
}

/* === APP GRID (iOS 26 Style) === */
#app-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px 14px;
    padding: 16px 18px;
    margin-top: 8px;
}

.icon-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: -0.2px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
    transition: transform 0.2s var(--spring-bounce);
}

.icon-box:active {
    transform: scale(0.88);
}

.icon {
    width: 62px;
    height: 62px;
    border-radius: 16px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2), inset 0 0.5px 0 rgba(255,255,255,0.4), inset 0 0 0 0.5px rgba(255,255,255,0.15);
    position: relative;
}

.gospel-library-icon {
    background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gospel-library-icon::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 60'%3E%3Ccircle cx='30' cy='18' r='8' fill='rgba(255,255,255,0.95)'/%3E%3Cpath d='M18 32 Q30 24 42 32 L42 52 Q30 44 18 52 Z' fill='rgba(255,255,255,0.95)'/%3E%3Cpath d='M30 32 L30 52' stroke='rgba(29,78,216,0.3)' stroke-width='0.8'/%3E%3C/svg%3E");
    background-size: 70%;
    background-position: center;
    background-repeat: no-repeat;
}

.icon-small {
    width: 50px !important;
    height: 50px !important;
    border-radius: 13px !important;
}

.icon::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.08) 30%, transparent 60%);
    pointer-events: none;
}

/* === DOCK (iOS 26 Liquid Glass) === */
#dock-wrapper {
    position: absolute;
    bottom: 16px;
    margin-left: 2.5vw;
    z-index: 100;
}

#dock {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 15px 3vw 15px 3vw;
    box-sizing: border-box;
    background: transparent;
    backdrop-filter: url(#liquid-glass-filter);
    -webkit-backdrop-filter: url(#liquid-glass-filter);
    border-radius: 10.7vw;
    border: 0.5px solid rgba(255, 255, 255, 0.45);
    box-shadow:
        0 4px var(--outer-shadow-blur, 24px) rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    width: 95vw;
    min-height: 70px;
    transition: background 0.3s ease;
    isolation: isolate;
}

.dock-icon {
    width: 17vw;
    min-width: 17vw;
    height: 17vw;
    min-height: 17vw;
    border-radius: 14px;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition: transform 0.15s var(--spring-bounce);
    box-shadow: 0 4px 16px rgba(0,0,0,0.18), inset 0 0 0 0.5px rgba(255,255,255,0.15);
    aspect-ratio: 1 / 1;
}

.dock-icon:active { transform: scale(0.9); }

/* === CONTROL CENTER (iOS 26 Full Redesign) === */
#control-center {
    position: absolute;
    top: -110%;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 5000;
    transition: top 0.52s cubic-bezier(0.32, 0.72, 0, 1), visibility 0.4s;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    visibility: hidden;
    overflow: hidden;
    color: #fff;
}

#control-center.open {
    top: 0;
    visibility: visible;
}

/* Animate children in with stagger */
#control-center.open #cc-header { animation: ccFadeUp 0.4s 0.05s both cubic-bezier(0.32,0.72,0,1); }
#control-center.open .cc-row-top { animation: ccFadeUp 0.45s 0.08s both cubic-bezier(0.32,0.72,0,1); }
#control-center.open .cc-row-controls { animation: ccFadeUp 0.45s 0.12s both cubic-bezier(0.32,0.72,0,1); }
#control-center.open .cc-focus-row { animation: ccFadeUp 0.45s 0.15s both cubic-bezier(0.32,0.72,0,1); }
#control-center.open .cc-actions-row:nth-of-type(1) { animation: ccFadeUp 0.45s 0.17s both cubic-bezier(0.32,0.72,0,1); }
#control-center.open .cc-actions-row:nth-of-type(2) { animation: ccFadeUp 0.45s 0.20s both cubic-bezier(0.32,0.72,0,1); }
#control-center.open .cc-actions-row:nth-of-type(3) { animation: ccFadeUp 0.45s 0.23s both cubic-bezier(0.32,0.72,0,1); }

@keyframes ccFadeUp {
    from { opacity: 0; transform: translateY(12px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── HEADER ── */
#cc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 52px 20px 0;
    flex-shrink: 0;
}

#cc-add-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
}
#cc-add-btn:active { background: rgba(255,255,255,0.12); }

#cc-weather-label {
    display: flex;
    align-items: center;
    gap: 5px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    opacity: 0.85;
}

#cc-power-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
    border: 0.5px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s cubic-bezier(0.175,0.885,0.32,1.275);
}
#cc-power-btn:active { transform: scale(0.88); }
#cc-power-btn svg { width: 15px; height: 15px; fill: white; }

/* ── SCROLL CONTENT ── */
#cc-scroll-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 14px 16px 40px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
#cc-scroll-content::-webkit-scrollbar { display: none; }

/* ── SHARED GLASS TILE BASE ── */
.cc-tile {
    border-radius: 26px;
    isolation: isolate;
    position: relative;
    overflow: hidden;
    background: transparent;
    border: 0.5px solid rgba(255, 255, 255, 0.38);
    box-shadow:
        0 4px 24px rgba(0,0,0,0.22),
        inset 0 0 20px -5px rgba(255,255,255,0.45),
        inset 0 1px 0 rgba(255,255,255,0.6);
}

/* real liquid-glass backdrop per element */
#cc-connectivity { backdrop-filter: url(#lgf-cc-connectivity); -webkit-backdrop-filter: url(#lgf-cc-connectivity); }
#cc-media        { backdrop-filter: url(#lgf-cc-media);        -webkit-backdrop-filter: url(#lgf-cc-media); }
#cc-focus        { backdrop-filter: url(#lgf-cc-focus);        -webkit-backdrop-filter: url(#lgf-cc-focus); }

/* ── ROW 1: CONNECTIVITY + MEDIA ── */
.cc-row-top {
    display: flex;
    gap: 13px;
    height: 160px;
}

#cc-connectivity {
    width: 36%;
    height: 32.1vw;
    flex-shrink: 0;
    padding: 11px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 10px;
    margin-left: 8px;
}

.cc-conn-btn {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.2s;
    background: rgba(60, 60, 80, 0.55);
    border: 0.5px solid rgba(255,255,255,0.08);
}
.cc-conn-btn:active { transform: scale(0.85); }
.cc-conn-btn svg { width: 17px; height: 17px; fill: rgba(255,255,255,0.7); }
.cc-conn-btn.active-blue { background: #007AFF; border-color: rgba(255,255,255,0.2); }
.cc-conn-btn.active-blue svg { fill: white; }
.cc-conn-btn.active-green { background: #30D158; border-color: rgba(255,255,255,0.2); }
.cc-conn-btn.active-green svg { fill: white; }

.cc-media-tile {
    flex: 1;
    min-width: 0;
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: rgba(60, 40, 100, 0.50);
    height: 30vw;
    max-width: 35%;
    margin-right: 10px;
}

.cc-media-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.cc-media-art {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: rgba(255,255,255,0.10);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.cc-media-art svg { width: 20px; height: 20px; fill: rgba(255,255,255,0.4); }

.cc-airplay-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.15s;
}
.cc-airplay-btn:active { background: rgba(255,255,255,0.12); }
.cc-airplay-btn svg { width: 16px; height: 16px; fill: rgba(255,255,255,0.5); }

.cc-media-title {
    color: white;
    font-size: 13px;
    font-weight: 600;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cc-media-artist {
    color: rgba(255,255,255,0.5);
    font-size: 11px;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 14px;
}

.cc-media-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
}
.cc-media-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.15s;
}
.cc-media-btn:active { background: rgba(255,255,255,0.12); }
.cc-media-btn svg { width: 18px; height: 18px; fill: white; }
.cc-play-btn svg { width: 22px; height: 22px; }

/* ── ROW 2: TOGGLE ROUNDS + SLIDERS ── */
.cc-row-controls {
    display: flex;
    gap: 10px;
}

.cc-toggles-col {
    display: flex;
    flex-direction: row;
    gap: 12px;
    width: calc(44% - 5px);
    flex-shrink: 0;
    margin-left: 4vw;
    height: 17vw;
}

.cc-glass-btn {
    flex: 1;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    isolation: isolate;
    position: relative;
    overflow: hidden;
    background: rgba(255,255,255,0.08);
    backdrop-filter: url(#lgf-cc-btn);
    -webkit-backdrop-filter: url(#lgf-cc-btn);
    border: 0.5px solid rgba(255,255,255,0.38);
    box-shadow:
        0 2px 14px rgba(0,0,0,0.22),
        inset 0 0 18px -4px rgba(255,255,255,0.5),
        inset 0 1px 0 rgba(255,255,255,0.65);
    transition: transform 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.2s;
    
}
.cc-glass-btn:active { transform: scale(0.88); }
.cc-glass-btn svg { width: 19px; height: 19px; fill: white; position: relative; z-index: 1; }
.cc-glass-btn.active { background: white !important; }
.cc-glass-btn.active svg { fill: #1c1c1e; }

.cc-sliders-row {
    display: flex;
    gap: 10px;
    flex: 1;
    margin-left: 1.7vw;
}

.cc-slider-pill {
    flex: 1;
    border-radius: 55px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    touch-action: none;
    isolation: isolate;
    background: transparent;
    backdrop-filter: url(#lgf-cc-slider);
    -webkit-backdrop-filter: url(#lgf-cc-slider);
    border: 0.5px solid rgba(255,255,255,0.38);
    box-shadow:
        0 2px 16px rgba(0,0,0,0.22),
        inset 0 0 20px -5px rgba(255,255,255,0.45),
        inset 0 1px 0 rgba(255,255,255,0.6);
    max-width: 18vw;
    max-height: 39vw;
    min-height: 37vw;
}

.cc-slider-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.90);
    border-radius: 0 0 50px 50px;
    transition: height 0.06s linear;
}

.cc-slider-icon {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    pointer-events: none;
}
.cc-slider-icon svg {
    width: 20px;
    height: 20px;
    fill: rgba(0, 0, 0, 0.65);
}

.cc-focus-pill {
    height: 100%;
    border-radius: 26px;
    display: flex;
    align-items: center;
    padding: 0 18px;
    gap: 10px;
    cursor: pointer;
    transition: transform 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.2s;
}
.cc-focus-pill:active { transform: scale(0.98); }
.cc-focus-pill.active { background: rgba(94, 92, 230, 0.85) !important; }

.cc-focus-icon { width: 19px; height: 19px; fill: rgba(255,255,255,0.75); flex-shrink: 0; }
.cc-focus-pill.active .cc-focus-icon { fill: white; }
.cc-focus-label { color: white; font-size: 14px; font-weight: 500; flex: 1; }
.cc-focus-chevron { width: 13px; height: 13px; fill: rgba(255,255,255,0.35); flex-shrink: 0; }

/* ── ACTION ROWS ── */
.cc-actions-row {
    display: flex;
    gap: 10px;
}

.cc-action-btn {
    flex: 1;
    aspect-ratio: 1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    isolation: isolate;
    position: relative;
    overflow: hidden;
    background: transparent;
    backdrop-filter: url(#lgf-cc-btn);
    -webkit-backdrop-filter: url(#lgf-cc-btn);
    border: 0.5px solid rgba(255,255,255,0.35);
    box-shadow:
        0 2px 12px rgba(0,0,0,0.2),
        inset 0 0 16px -4px rgba(255,255,255,0.45),
        inset 0 1px 0 rgba(255,255,255,0.6);
    transition: transform 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.2s;
}
.cc-action-btn:active { transform: scale(0.85); }
.cc-action-btn svg { width: 20px; height: 20px; fill: white; position: relative; z-index: 1; }
.cc-action-btn.active { background: white !important; }
.cc-action-btn.active svg { fill: #1c1c1e; }
.cc-action-btn.active-green { background: #30D158 !important; }

/* Remove old CC26 styles that are no longer used */
.cc26-grid, .cc26-row, .cc26-row-top, .cc26-connectivity,
.cc26-media, .cc26-row-middle, .cc26-sliders-col, .cc26-right-col,
.cc26-row-actions, .cc26-page-dots, .cc26-power-btn,
.cc-close-hint, .cc-close-bar { display: none !important; }

/* === APP SCREEN (iOS 26 Liquid Glass) === */
#app-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--ios-gray-light);
    z-index: 1000;
    display: none;
    flex-direction: column;
    color: var(--text-primary);
    transform: scale(0.94) translateY(20px);
    opacity: 0;
    transition: transform 0.4s var(--spring-smooth), opacity 0.3s ease;
    overflow: hidden;
}

#app-screen.active {
    display: flex;
    transform: scale(1) translateY(0);
    opacity: 1;
}

#app-header {
    padding: 70px 20px 12px;
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: rgba(242, 242, 247, 0.65);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06), inset 0 -0.5px 0 rgba(0,0,0,0.05), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    color: #000;
}

#app-content {
    flex: 1;
    padding: 0;
    font-size: 17px;
    overflow-y: auto;
    background: var(--ios-gray-light);
    -webkit-overflow-scrolling: touch;
}

/* === SETTINGS APP (iOS 26 Liquid Glass) === */
.settings-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--ios-gray-light);
    overflow: hidden;
}

.settings-scroll {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 100px;
}

/* Floating Glass Header */
.settings-glass-header {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 60px 16px 0;
    background: rgba(242, 242, 247, 0.92);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.settings-glass-header.scrolled {
    box-shadow: 0 0.5px 0 rgba(0,0,0,0.1);
}

.settings-glass-header .title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.settings-glass-header .title {
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #000;
}

/* Search Bar */
.settings-search-bottom {
    position: absolute;
    bottom: 12px;
    left: 16px;
    right: 16px;
    z-index: 50;
}
.settings-search-bar {
    display: flex;
    align-items: center;
    background: transparent;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 999px;
    padding: 11px 16px;
    gap: 8px;
    border: 0.5px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    margin-bottom: 0;
}

.settings-search-bar svg {
    width: 16px;
    height: 16px;
    fill: var(--ios-gray);
    flex-shrink: 0;
}

.settings-search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 17px;
    color: #000;
    outline: none;
}

.settings-search-bar input::placeholder {
    color: rgba(60, 60, 67, 0.6);
}

/* Glass Card Groups */
.settings-group {
    margin: 8px 16px;
}

.settings-group-label {
    font-size: 13px;
    font-weight: 400;
    color: rgba(60, 60, 67, 0.6);
    text-transform: uppercase;
    letter-spacing: -0.08px;
    padding: 0 16px 6px;
}

.settings-list {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 28px;
    box-shadow: 
        0 0.5px 0 rgba(255,255,255,0.5) inset,
        0 2px 8px rgba(0,0,0,0.04),
        0 0 0 0.5px rgba(0,0,0,0.04);
    overflow: hidden;
}

.settings-item:first-child {
    border-radius: 28px 28px 0 0;
    overflow: hidden;
}
.settings-item:last-child {
    border-radius: 0 0 28px 28px;
    overflow: hidden;
    border-bottom: none;
}
.settings-item {
    padding: 11px 16px;
    border-bottom: 0.5px solid rgba(60,60,67,0.1);
    display: flex;
    align-items: center;
    background: transparent;
    transition: background 0.15s;
    color: #000;
    font-size: 17px;
    min-height: 44px;
    box-sizing: border-box;
}

.settings-item:last-child { border-bottom: none; }
.settings-item:active { background: rgba(0,0,0,0.04); }

.settings-item span:first-of-type:not(.settings-icon + span) {
    flex: 1;
}

.settings-item > span {
    flex: 1;
}

.settings-item .chevron {
    color: rgba(60,60,67,0.3);
    font-size: 17px;
    font-weight: 300;
    margin-left: 4px;
}

.settings-item .value {
    color: rgba(60,60,67,0.6);
    font-size: 17px;
    margin-right: 4px;
}

/* Settings Icon (Refined) */
.settings-icon {
    width: 29px;
    height: 29px;
    border-radius: 7px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 12px;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.settings-icon svg {
    width: 18px;
    height: 18px;
    fill: white;
}

/* Profile Card (Enhanced) */
.settings-profile-card {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin: 8px 16px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 12px;
    box-shadow: 
        0 0.5px 0 rgba(255,255,255,0.5) inset,
        0 2px 8px rgba(0,0,0,0.04),
        0 0 0 0.5px rgba(0,0,0,0.04);
    cursor: pointer;
    transition: transform 0.15s, background 0.15s;
}

.settings-profile-card:active {
    background: rgba(245, 245, 250, 0.9);
    transform: scale(0.98);
}

.settings-profile-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(145deg, #c7c7cc, #a8a8ad);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    font-weight: 500;
    color: white;
    margin-right: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.settings-profile-avatar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.25), transparent);
    border-radius: 50% 50% 0 0;
}

.settings-profile-info { flex: 1; }
.settings-profile-name { font-size: 20px; font-weight: 600; color: #000; letter-spacing: -0.4px; }
.settings-profile-sub { font-size: 13px; color: rgba(60,60,67,0.6); margin-top: 2px; }

.settings-profile-card .chevron {
    color: rgba(60,60,67,0.3);
    font-size: 20px;
    font-weight: 300;
}

/* Sub-page Header */
.settings-header {
    display: flex;
    align-items: center;
    padding: 60px 16px 12px;
    margin-bottom: 0;
    background: rgba(242, 242, 247, 0.92);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    position: sticky;
    top: 0;
    z-index: 20;
}

.back-btn {
    color: var(--ios-blue);
    font-size: 17px;
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 400;
    gap: 2px;
}

.back-btn svg { 
    width: 10px;
    height: 17px;
    fill: var(--ios-blue); 
}

.settings-title-small {
    flex: 1;
    text-align: center;
    font-weight: 600;
    font-size: 17px;
    margin-right: 50px;
    color: #000;
}

/* Toggle Switch (iOS 26 Liquid Glass) */
.ios-toggle {
    width: 51px;
    height: 31px;
    background: rgba(120, 120, 128, 0.16);
    border-radius: 16px;
    position: relative;
    transition: 0.25s var(--spring-gentle);
    cursor: pointer;
    flex-shrink: 0;
}

.ios-toggle.on { 
    background: var(--ios-green); 
}

.ios-toggle::after {
    content: '';
    position: absolute;
    width: 27px;
    height: 27px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: 0.25s var(--spring-bounce);
    box-shadow: 0 3px 8px rgba(0,0,0,0.15), 0 1px 1px rgba(0,0,0,0.06);
}

.ios-toggle.on::after { left: 22px; }

/* Footer text */
.settings-footer-text {
    font-size: 13px;
    color: rgba(60,60,67,0.6);
    padding: 8px 32px;
    line-height: 1.4;
}

/* About section */
.settings-about-item {
    padding: 11px 16px;
    border-bottom: 0.5px solid rgba(60,60,67,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    color: #000;
    font-size: 17px;
    min-height: 44px;
    box-sizing: border-box;
}

.settings-about-item:last-child { border-bottom: none; }

.settings-about-item .label {
    color: #000;
}

.settings-about-item .value {
    color: rgba(60,60,67,0.6);
}

/* Slider control */
.settings-slider-row {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.settings-slider-row svg {
    width: 20px;
    height: 20px;
    fill: var(--ios-gray);
    flex-shrink: 0;
}

.settings-slider-row svg.large {
    width: 24px;
    height: 24px;
}

.settings-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: rgba(120, 120, 128, 0.2);
    border-radius: 2px;
    outline: none;
}

.settings-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2), 0 0 0 0.5px rgba(0,0,0,0.04);
}

/* === MESSAGES APP (iOS 26 Style) === */
.messages-list-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--ios-gray-light);
    overflow-y: auto;
}

.messages-header-container {
    padding: 80px 16px 12px;
    background: rgba(242, 242, 247, 0.85);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 0.5px solid rgba(0,0,0,0.08);
}

.messages-header-fixed {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 80px 16px 14px;
    background: rgba(242, 242, 247, 0.9);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 0.5px solid rgba(0,0,0,0.08);
}

.messages-title {
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #000;
    text-align: left;
    margin-bottom: 12px;
}

.messages-search {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 999px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 0.5px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04), inset 0 0.5px 0 rgba(255, 255, 255, 0.4);
}

.messages-search input {
    border: none;
    background: none;
    flex: 1;
    font-size: 17px;
    color: #000;
    outline: none;
}

.messages-search input::placeholder { color: rgba(60, 60, 67, 0.6); }

/* iOS 26 Conversation Header (Liquid Glass) */
.conversation-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.conversation-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 52px 12px 12px;
    background: transparent;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-bottom: 0.5px solid rgba(0,0,0,0.06);
    position: relative;
}
.conversation-header-row {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-between;
    margin-bottom: 8px;
}
.conversation-profile-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.conversation-avatar-large {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5AC8FA, #007AFF);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 26px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.conversation-profile-name {
    font-size: 16px;
    font-weight: 600;
    color: #000;
    letter-spacing: -0.3px;
}
.conversation-profile-info {
    font-size: 12px;
    color: rgba(60,60,67,0.6);
}

.conversation-back-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.conversation-back-btn svg {
    width: 20px;
    height: 20px;
    fill: var(--ios-blue);
}

.conversation-contact {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    padding: 8px 14px;
    border-radius: 22px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.conversation-contact-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c7d3e0, #a8b5c4);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    color: white;
}

.conversation-contact-name {
    font-size: 17px;
    font-weight: 600;
    color: #000;
}

.conversation-camera-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.conversation-camera-btn svg {
    width: 20px;
    height: 20px;
    fill: var(--ios-blue);
}

.messages-chat-area {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    background: #fff;
}

/* iOS 26 Message Input Bar (Liquid Glass) */
.message-input-bar {
    padding: 8px 12px 30px;
    background: rgba(255,255,255,0.82);
    backdrop-filter: blur(40px) saturate(180%) brightness(1.05);
    -webkit-backdrop-filter: blur(40px) saturate(180%) brightness(1.05);
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 0.5px solid rgba(0,0,0,0.1);
    box-shadow: 0 -0.5px 0 rgba(0,0,0,0.08), 0 -4px 20px rgba(0,0,0,0.04);
    transition: bottom 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    z-index: 100;
    isolation: isolate;
}

.message-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.message-input-bar.keyboard-active {
    position: fixed;
    bottom: 290px;
    left: 0;
    right: 0;
    padding-bottom: 12px;
}

.messages-chat-area.keyboard-active {
    padding-bottom: 130px;
}

.message-plus-btn {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 0.5px solid rgba(0,0,0,0.12);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.9);
    transition: transform 0.15s var(--spring-bounce);
    flex-shrink: 0;
}
.message-plus-btn:active { transform: scale(0.88); }

.message-plus-btn svg {
    width: 16px;
    height: 16px;
    fill: #1c1c1e;
}

.message-input {
    flex: 1;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(24px) saturate(200%) brightness(1.05);
    -webkit-backdrop-filter: blur(24px) saturate(200%) brightness(1.05);
    border: 0.5px solid rgba(0,0,0,0.15);
    border-radius: 22px;
    padding: 9px 14px;
    color: #1c1c1e;
    font-size: 17px;
    outline: none;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.95);
    min-width: 0;
}

.message-input::placeholder { color: rgba(60,60,67,0.4); }

.send-btn {
    width: 32px;
    height: 32px;
    background: #007AFF;
    border: none;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,122,255,0.35);
    transition: transform 0.15s var(--spring-bounce), opacity 0.15s;
    flex-shrink: 0;
}

.send-btn:active { transform: scale(0.9); }
.send-btn svg { fill: white; width: 16px; height: 16px; }

.msg-bubble {
    padding: 10px 14px;
    border-radius: 18px;
    margin-bottom: 3px;
    max-width: 75%;
    font-size: 17px;
    line-height: 1.35;
    animation: bubblePop 0.25s var(--spring-bounce);
}

@keyframes bubblePop {
    0% { transform: scale(0.85); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.msg-sent {
    background: var(--ios-blue);
    align-self: flex-end;
    color: white;
    border-bottom-right-radius: 4px;
}

.msg-received {
    background: rgba(229, 229, 234, 1);
    align-self: flex-start;
    color: #000;
    border-bottom-left-radius: 4px;
}

.msg-time {
    font-size: 11px;
    color: rgba(60, 60, 67, 0.6);
    text-align: center;
    margin: 10px 0 4px;
}

.msg-status {
    font-size: 10px;
    color: rgba(60, 60, 67, 0.6);
    text-align: right;
    margin-top: 2px;
}

/* Contact Thread Item */
.thread-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 0.5px solid rgba(0,0,0,0.08);
    transition: background 0.15s;
}

.thread-item:active { background: rgba(0,0,0,0.04); }

.thread-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a8a8ad, #8e8e93);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    font-weight: 600;
    color: white;
    margin-right: 12px;
}

.thread-info { flex: 1; }
.thread-name { font-size: 17px; font-weight: 600; color: #000; }
.thread-preview { font-size: 15px; color: rgba(60, 60, 67, 0.6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; margin-top: 2px; }
.thread-time { font-size: 15px; color: rgba(60, 60, 67, 0.6); }
.thread-chevron { color: rgba(60, 60, 67, 0.3); margin-left: 8px; }

/* === PHONE APP (iOS 26 Unified Layout) === */
.phone-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--ios-gray-light);
}

.phone-unified-header {
    padding: 54px 20px 14px;
    background: rgba(242, 242, 247, 0.95);
    border-bottom: 0.5px solid rgba(0,0,0,0.08);
}

.phone-title {
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #000;
}

.phone-favorites {
    display: flex;
    gap: 12px;
    padding: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.favorite-card {
    flex-shrink: 0;
    width: 90px;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 16px;
    padding: 14px 10px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.favorite-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a8a8ad, #8e8e93);
    margin: 0 auto 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: 600;
    font-size: 18px;
}

.favorite-name {
    font-size: 12px;
    font-weight: 500;
    color: #000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.favorite-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 10px;
}

.favorite-action {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0,0,0,0.05);
    display: flex;
    justify-content: center;
    align-items: center;
}

.favorite-action svg { width: 14px; height: 14px; fill: var(--ios-blue); }

.phone-tabs {
    display: flex;
    background: transparent;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 999px;
    border: 0.5px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    padding: 6px 8px 8px;
    position: absolute;
    bottom: 16px;
    left: 16px;
    right: 16px;
    z-index: 100;
    isolation: isolate;
}

.phone-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--ios-gray);
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    z-index: 1;
    padding: 4px 0;
}

.phone-tab.active { color: var(--ios-blue); }
.phone-tab.active::before {
    content: '';
    position: absolute;
    top: -6px;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 72px;
    background: rgba(120, 120, 128, 0.16);
    backdrop-filter: blur(8px) saturate(140%);
    -webkit-backdrop-filter: blur(8px) saturate(140%);
    border-radius: 999px;
    border: 0.5px solid rgba(255,255,255,0.28);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 1px 4px rgba(0,0,0,0.08);
    z-index: -1;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.phone-tabs.tab-switching .phone-tab.active::before {
    animation: tabLiquid 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.phone-tab svg { width: 24px; height: 24px; }

.dialpad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 20px 40px;
    justify-items: center;
}

.dial-btn {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 32px;
    font-weight: 300;
    color: #000;
    transition: transform 0.15s var(--spring-bounce), background 0.15s;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.dial-btn:active {
    transform: scale(0.95);
    background: rgba(200,200,200,0.6);
}

.dial-letters {
    font-size: 10px;
    font-weight: 500;
    margin-top: -2px;
    color: rgba(0,0,0,0.5);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.call-btn {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: var(--ios-green);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px auto 0;
    box-shadow: 0 4px 16px rgba(52, 199, 89, 0.35);
    transition: transform 0.15s var(--spring-bounce);
}

.call-btn:active { transform: scale(0.9); }
.call-btn svg { fill: white; width: 28px; height: 28px; }

/* === SAFARI APP (iOS 26 Liquid Glass) === */
.safari-browser {
    background: #fff;
    color: #000;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.safari-address-bar {
    background: rgba(242, 242, 247, 0.9);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 64px 16px 10px;
    z-index: 10;
}

.safari-input-wrapper {
    background: rgba(118, 118, 128, 0.12);
    border-radius: 999px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.safari-input {
    border: none;
    background: none;
    width: 100%;
    font-size: 17px;
    text-align: center;
    outline: none;
    color: #000;
}

.safari-toolbar-bottom {
    background: rgba(242, 242, 247, 0.95);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 10px 24px 30px;
    display: flex;
    justify-content: space-between;
    border-top: 0.5px solid rgba(0,0,0,0.08);
}

.safari-tool-btn {
    color: var(--ios-blue);
    cursor: pointer;
    padding: 6px;
}

.safari-tool-btn svg { width: 22px; height: 22px; }

.safari-iframe-container { flex: 1; background: #fff; }
.safari-iframe { width: 100%; height: 100%; border: none; }

/* === WEATHER APP (iOS 26 Liquid Glass) === */
.weather-app {
    height: 100%;
    background: linear-gradient(180deg, #47bfff 0%, #1e90ff 40%, #0066cc 100%);
    color: white;
    padding-top: 70px;
    position: relative;
    overflow-y: auto;
}

.weather-top { text-align: center; padding: 0 20px; }
.weather-location { font-size: 32px; font-weight: 400; margin-bottom: 4px; }
.weather-temp { font-size: 102px; font-weight: 200; line-height: 1; letter-spacing: -4px; }
.weather-desc { font-size: 20px; font-weight: 500; opacity: 0.95; margin-top: 4px; }
.weather-hi-lo { font-size: 18px; opacity: 0.85; margin-top: 2px; }

.weather-card {
    margin: 24px 16px;
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 16px;
    padding: 14px 16px;
    border: 1px solid rgba(255,255,255,0.25);
}

.weather-card-title {
    font-size: 13px;
    text-transform: uppercase;
    opacity: 0.7;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.weather-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

.weather-row:last-child { border-bottom: none; }
.weather-loading { text-align: center; padding-top: 100px; }

.weather-floating-btns {
    position: absolute;
    bottom: 40px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.weather-float-btn {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.25);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(255,255,255,0.3);
}

.weather-float-btn svg { fill: white; width: 20px; height: 20px; }

/* === NOTES APP (iOS 26 Style) === */
.notes-container {
    background: var(--ios-gray-light);
    height: 100%;
    padding: 16px;
}

.note-item {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: transform 0.15s var(--spring-bounce);
}

.note-item:active { transform: scale(0.98); }
.note-title { font-size: 17px; font-weight: 600; color: #000; }
.note-preview { font-size: 15px; color: rgba(60, 60, 67, 0.6); margin-top: 3px; }

.add-note-btn {
    position: absolute;
    bottom: 36px;
    right: 20px;
    width: 52px;
    height: 52px;
    background: var(--ios-yellow);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 26px;
    color: #000;
    box-shadow: 0 4px 16px rgba(255,204,0,0.35);
    cursor: pointer;
    transition: transform 0.15s var(--spring-bounce);
}

.add-note-btn:active { transform: scale(0.9); }

/* Note Editor (iOS 26) */
.note-editor {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--ios-gray-light);
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.note-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 60px 16px 14px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 0.5px solid rgba(0,0,0,0.08);
}

.note-editor-header .back-btn,
.note-editor-header .save-btn {
    color: var(--ios-blue);
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
}

.note-title-input {
    border: none;
    background: transparent;
    font-size: 28px;
    font-weight: 700;
    color: #000;
    padding: 20px 16px 8px;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}

.note-title-input::placeholder {
    color: rgba(60, 60, 67, 0.3);
}

.note-textarea {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 17px;
    color: #000;
    padding: 0 16px 20px;
    outline: none;
    resize: none;
    line-height: 1.5;
    width: 100%;
    box-sizing: border-box;
}

.note-textarea::placeholder {
    color: rgba(60, 60, 67, 0.3);
}

/* === MUSIC APP (iOS 26 Dark Theme) === */
.music26-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #000;
    padding-bottom: 80px;
    overflow-y: auto;
}

.music26-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 56px 16px 0;
}

.music26-back {
    width: 28px;
    height: 28px;
    fill: #ff375f;
    cursor: pointer;
}

.music26-header-actions {
    display: flex;
    gap: 20px;
}

.music26-header-actions svg {
    width: 22px;
    height: 22px;
    fill: #ff375f;
    cursor: pointer;
}

.music26-title {
    font-size: 34px;
    font-weight: 700;
    color: #fff;
    padding: 8px 16px 12px;
    letter-spacing: -0.5px;
}

.music26-search {
    display: flex;
    align-items: center;
    background: transparent;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 999px;
    margin: 0 16px 16px;
    padding: 10px 14px;
    gap: 8px;
    border: 0.5px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06), inset 0 0.5px 0 rgba(255, 255, 255, 0.2);
}

.music26-search svg {
    width: 18px;
    height: 18px;
    fill: #8e8e93;
    flex-shrink: 0;
}

.music26-search input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 17px;
    outline: none;
}

.music26-search input::placeholder {
    color: #8e8e93;
}

.music26-mic {
    fill: #8e8e93 !important;
}

.music26-list {
    flex: 1;
    overflow-y: auto;
}

.music26-row {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    gap: 12px;
    cursor: pointer;
}

.music26-row:active {
    background: rgba(255,255,255,0.05);
}

.playlist-icon {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.playlist-icon svg {
    width: 28px;
    height: 28px;
}

.folder-icon {
    background: #1c1c1e;
    position: relative;
}

.folder-icon svg:first-child {
    fill: #8e8e93;
    position: absolute;
    left: 6px;
}

.folder-icon svg:last-child {
    fill: #ff375f;
    position: absolute;
    right: 6px;
}

.album-art-icon {
    background-size: cover;
    background-position: center;
}

.playlist-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.playlist-name {
    color: #fff;
    font-size: 17px;
    font-weight: 400;
}

.playlist-count {
    color: #8e8e93;
    font-size: 15px;
}

.playlist-chevron {
    width: 20px;
    height: 20px;
    fill: #8e8e93;
    flex-shrink: 0;
}

.music26-miniplayer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: #1c1c1e;
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 12px;
    cursor: pointer;
    border-radius: 20px;
    margin: 0 12px 12px;
    border: 0.5px solid rgba(255,255,255,0.2);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.15);
}

.miniplayer-art {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    background-color: #333;
    flex-shrink: 0;
}

.miniplayer-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.miniplayer-title {
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.miniplayer-artist {
    color: #8e8e93;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.miniplayer-play {
    width: 28px;
    height: 28px;
    fill: #fff;
    flex-shrink: 0;
}

.miniplayer-search {
    width: 24px;
    height: 24px;
    fill: #ff375f;
    flex-shrink: 0;
}

.music26-folder-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px 16px;
}

.folder-icon-large {
    width: 60px;
    height: 60px;
    background: #1c1c1e;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.folder-icon-large svg:first-child {
    fill: #8e8e93;
    width: 28px;
    height: 28px;
    position: absolute;
    left: 8px;
}

.folder-icon-large svg:last-child {
    fill: #ff375f;
    width: 28px;
    height: 28px;
    position: absolute;
    right: 8px;
}

.folder-name {
    color: #fff;
    font-size: 22px;
    font-weight: 600;
}

.music26-action-btns {
    display: flex;
    gap: 12px;
    padding: 0 16px 16px;
}

.music26-play-btn,
.music26-shuffle-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 0;
    border-radius: 8px;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.music26-play-btn {
    background: #ff375f;
    color: #fff;
}

.music26-play-btn svg {
    width: 18px;
    height: 18px;
    fill: #fff;
}

.music26-shuffle-btn {
    background: rgba(255,55,95,0.15);
    color: #ff375f;
}

.music26-shuffle-btn svg {
    width: 18px;
    height: 18px;
    fill: #ff375f;
}

.song-row {
    border-bottom: 0.5px solid rgba(255,255,255,0.1);
}

.song-art {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    flex-shrink: 0;
}

.song-name {
    flex: 1;
    color: #fff;
    font-size: 17px;
}

/* === PHOTOS APP (iOS 26 Two-Tab Design) === */
.photos-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
}

.photos-header {
    padding: 70px 20px 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

.photos-header-title {
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #000;
    margin-bottom: 12px;
}

.photos-tabs {
    display: flex;
    gap: 0;
    background: transparent;
    padding: 0;
    border-bottom: 0.5px solid rgba(0,0,0,0.08);
}

.photo-tab {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--ios-gray);
    position: relative;
    cursor: pointer;
}

.photo-tab.active {
    color: #000;
}

.photo-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 20%;
    right: 20%;
    height: 2px;
    background: #000;
    border-radius: 1px;
}

.photos-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 1px;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    background: #000;
    width: 100%;
    box-sizing: border-box;
}

.photo-thumb {
    width: 100% !important;
    min-width: 0;
    max-width: 100%;
    aspect-ratio: 1;
    background: #e5e5e5;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition: opacity 0.15s;
}

.photo-thumb:active { opacity: 0.7; }

.full-photo-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.full-photo-header {
    padding: 56px 20px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.full-photo-img {
    flex: 1;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* === CAMERA APP (iOS 26 Simplified) === */
#camera-interface {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: none;
    flex-direction: column;
}

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

#camera-stream {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#camera-stream.mirror { transform: scaleX(-1); }

.camera-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    pointer-events: none;
    z-index: 5;
}

.camera-top-bar {
    height: 70px;
    padding: 40px 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: auto;
}

.camera-top-btn {
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.camera-top-btn svg { fill: white; width: 18px; height: 18px; }

.camera-mode-selector {
    position: absolute;
    bottom: 140px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 24px;
    color: white;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    pointer-events: auto;
}

.camera-mode { 
    opacity: 0.5; 
    transition: opacity 0.2s, color 0.2s; 
    cursor: pointer;
    padding: 6px 10px;
}
.camera-mode.active { 
    color: var(--ios-yellow); 
    opacity: 1; 
}

.camera-bottom-area {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 130px;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-bottom: 20px;
    box-sizing: border-box;
    pointer-events: auto;
}

.shutter-btn {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: white;
    border: 4px solid rgba(255,255,255,0.4);
    cursor: pointer;
    transition: transform 0.15s var(--spring-bounce);
}

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

.switch-cam-btn, .cam-preview-box {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.switch-cam-btn svg { width: 22px; height: 22px; fill: white; }

.cam-preview-box {
    background: #333;
    background-size: cover;
    overflow: hidden;
    border-radius: 8px;
}

/* === CALCULATOR APP (iOS 26 Style) === */
.calc-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #000000;
    padding: 20px;
    box-sizing: border-box;
    justify-content: flex-end;
}

.calc-display {
    text-align: right;
    font-size: 68px;
    font-weight: 300;
    margin-bottom: 16px;
    color: #fff;
    padding: 0 10px;
}

.calc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.calc-btn {
    aspect-ratio: 1;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
    font-weight: 400;
    cursor: pointer;
    transition: transform 0.1s var(--spring-bounce), filter 0.1s;
}

.calc-btn:active { transform: scale(0.95); filter: brightness(0.9); }
.calc-btn.num { background: rgba(87, 87, 87, 0.5); color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.06); outline: 1px solid #6e6e6e; }
.calc-btn.op { background: var(--ios-orange); color: #fff; outline: 1px solid #6e6e6e; }
.calc-btn.spec { background: rgba(165, 165, 170, 0.6); color: #fff; outline: 1px solid #6e6e6e; }
.calc-btn.wide { grid-column: span 2; aspect-ratio: unset; border-radius: 40px; justify-content: flex-start; padding-left: 28px; }

/* === STOCKS APP (iOS 26 Style) === */
.stocks-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--ios-gray-light);
}

.stock-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: #fff;
    border-bottom: 0.5px solid rgba(0,0,0,0.08);
}

.stock-symbol { font-weight: 700; font-size: 17px; color: #000; }
.stock-name { font-size: 13px; color: rgba(60, 60, 67, 0.6); margin-top: 1px; }
.stock-chart { width: 70px; height: 24px; background: rgba(52, 199, 89, 0.12); border-radius: 4px; }
.stock-price-box {
    background: var(--ios-green);
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    min-width: 68px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
}

/* === CLOCK APP (iOS 26 Style) === */
.clock-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--ios-gray-light);
}

.world-clock-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #fff;
    border-bottom: 0.5px solid rgba(0,0,0,0.08);
}

.city-info { display: flex; flex-direction: column; }
.city-offset { font-size: 14px; color: rgba(60, 60, 67, 0.6); }
.city-name { font-size: 28px; font-weight: 300; color: #000; margin-top: 2px; }
.city-time { font-size: 48px; font-weight: 200; color: #000; letter-spacing: -2px; }

/* === CONTACTS APP (iOS Style) === */
.contacts-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #f2f2f7;
    position: relative;
}

.contacts-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 54px 16px 12px;
    background: rgba(242, 242, 247, 0.94);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.contacts-back-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    cursor: pointer;
}

.contacts-header-title {
    font-size: 17px;
    font-weight: 600;
    color: #000;
}

.contacts-list-scroll {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 80px;
    background: #fff;
}

.contacts-section-header {
    padding: 6px 16px;
    font-size: 15px;
    font-weight: 400;
    color: rgba(60, 60, 67, 0.6);
    background: #f2f2f7;
    position: sticky;
    top: 0;
}

.contact-row {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    background: #fff;
    border-bottom: 0.5px solid rgba(0,0,0,0.08);
    cursor: pointer;
}

.contact-row:active { background: rgba(0,0,0,0.04); }

.contact-avatar-ios {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(180deg, #a8b5c8 0%, #8090a8 100%);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 500;
    font-size: 15px;
    margin-right: 12px;
    flex-shrink: 0;
}

.contact-name-ios {
    font-size: 17px;
    color: #000;
}

.contact-firstname {
    font-weight: 400;
}

.contact-lastname {
    font-weight: 600;
    margin-left: 4px;
}

.contacts-empty {
    padding: 60px 20px;
    text-align: center;
    color: rgba(60, 60, 67, 0.6);
    font-size: 17px;
}

.contacts-alphabet-index {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 20;
    padding: 8px 0;
}

.alphabet-letter {
    font-size: 10px;
    font-weight: 600;
    color: #007AFF;
    padding: 1px 6px;
    cursor: pointer;
}

.contacts-bottom-bar {
    position: absolute;
    bottom: 16px;
    left: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0;
    background: transparent;
    border-top: none;
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    z-index: 50;
}
.contacts-bottom-bar.keyboard-active {
    transform: translateY(-262px);
}

.contacts-search-bar {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 999px;
    padding: 10px 14px;
    border: 0.5px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.contacts-search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 17px;
    color: #000;
    outline: none;
}

.contacts-search-bar input::placeholder { color: rgba(60, 60, 67, 0.6); }

.contacts-add-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: transparent;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border: 0.5px solid rgba(255,255,255,0.45);
    box-shadow: 0 2px 12px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.3);
    flex-shrink: 0;
}

/* === NEW CONTACT EDITOR (iOS Style) === */
.new-contact-editor {
    min-height: 100%;
    background: #f2f2f7;
    padding-bottom: 40px;
}

.new-contact-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 54px 16px 12px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.1);
    border-radius: 0 0 12px 12px;
}

.nc-cancel {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.nc-title {
    font-size: 17px;
    font-weight: 600;
    color: #000;
}

.nc-done {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
}

.nc-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px 20px;
}

.nc-avatar-circle {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: linear-gradient(180deg, #a8b5c8 0%, #7a8ba0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.nc-add-photo {
    margin-top: 12px;
    font-size: 15px;
    font-weight: 500;
    color: #000;
    background: rgba(0, 0, 0, 0.06);
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
}

.nc-form-group {
    margin: 16px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}

.nc-form-group input {
    width: 100%;
    padding: 14px 16px;
    border: none;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.1);
    background: transparent;
    font-size: 17px;
    font-family: inherit;
    color: #000;
    outline: none;
}

.nc-form-group input:last-child { border-bottom: none; }
.nc-form-group input::placeholder { color: rgba(60, 60, 67, 0.5); }

.nc-add-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    margin: 0 16px 1px;
    background: #fff;
    border-radius: 12px;
    cursor: pointer;
}

.nc-add-row:first-of-type { margin-top: 16px; }

.nc-add-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #34c759;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 300;
}

.nc-add-row span {
    font-size: 17px;
    color: #000;
}

.nc-option-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    margin: 0 16px 1px;
    background: #fff;
    border-radius: 12px;
}

.nc-option-row > span {
    font-size: 17px;
    color: #000;
}

.nc-option-value {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nc-blue {
    color: #007AFF;
    font-size: 17px;
}

.nc-phone-field, .nc-email-field {
    margin: 0 16px 1px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}

.nc-phone-field input, .nc-email-field input {
    width: 100%;
    padding: 14px 16px;
    border: none;
    background: transparent;
    font-size: 17px;
    font-family: inherit;
    color: #000;
    outline: none;
}

.nc-phone-field input::placeholder, .nc-email-field input::placeholder {
    color: rgba(60, 60, 67, 0.5);
}

/* === LOCK SCREEN (iOS 26) === */
#lock-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://cdn.builder.io/api/v1/assets/4bdb8a64a9b24066ad1311bb7783fba0/backdrop.jpg') center/cover no-repeat;
    z-index: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 70px;
    box-sizing: border-box;
    transition: transform 0.5s var(--spring-smooth), opacity 0.3s ease;
}

#lock-screen.unlocking {
    transform: translateY(-100%);
    opacity: 0;
}

#lock-screen.hidden {
    display: none;
}

.lock-date {
    font-size: 22px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
    margin-bottom: 4px;
    letter-spacing: 0.5px;
    filter: drop-shadow(0 1px 4px rgba(255, 255, 255, 0.15));
}

.lock-time {
    font-size: 130px;
    font-weight: 500;
    letter-spacing: -1px;
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 1) 0%, 
        rgba(210, 230, 255, 0.95) 35%,
        rgba(170, 210, 255, 0.88) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    filter: drop-shadow(0 6px 28px rgba(100, 160, 255, 0.55)) drop-shadow(0 2px 8px rgba(255, 255, 255, 0.3));
    position: relative;
    margin-top: -4px;
    padding: 8px 16px;
}

.lock-time::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 30px;
    border: 0.5px solid rgba(255, 255, 255, 0.15);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    z-index: -1;
}


/* === HOME BAR === */
#home-bar-container {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50vw;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100010;
    cursor: pointer;
    touch-action: none;
}

#home-bar {
    width: 134px;
    height: 5px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 100px;
    transition: transform 0.2s var(--spring-bounce), background 0.3s ease;
}

#home-bar.dark {
    background: rgba(0, 0, 0, 0.55);
}

#home-bar-container.swiping #home-bar {
    transform: translateY(-8px) scaleX(1.08);
}

/* === NOTIFICATIONS (iOS 26 Liquid Glass) === */
#notification-area {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    z-index: 6000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.notification {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 22px;
    padding: 12px 14px;
    margin: 8px 12px;
    color: #000;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 0.5px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    pointer-events: auto;
    animation: slideDown 0.4s var(--spring-smooth) forwards;
}

@keyframes slideDown {
    from { transform: translateY(-80px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.notification.fade-out {
    animation: fadeOut 0.4s forwards;
}

@keyframes fadeOut {
    to { opacity: 0; transform: translateY(-16px) scale(0.96); }
}

.notif-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background-size: cover;
}

.notif-content { flex: 1; }
.notif-title { font-weight: 600; font-size: 14px; }
.notif-text { font-size: 14px; color: rgba(60, 60, 67, 0.6); margin-top: 1px; }

/* CC Home Indicator */
#home-indicator {
    width: 134px;
    height: 5px;
    background: rgba(0,0,0,0.3);
    border-radius: 100px;
    margin: auto auto 8px;
}

/* Scrollbar Styling - Hide all scrollbars */
::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
}

* {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

/* Fix for Photos grid */
.photos-grid * {
    box-sizing: border-box;
}

/* === APP STORE (iOS 26 Games Style - Light Mode) === */
.appstore-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #f2f2f7;
    position: relative;
}

.appstore-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 60px 20px 16px;
    background: rgba(242, 242, 247, 0.9);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.appstore-title {
    font-size: 34px;
    font-weight: 700;
    color: #000;
}

.appstore-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.appstore-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.appstore-avatar svg {
    width: 22px;
    height: 22px;
}

.appstore-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px 100px;
    -webkit-overflow-scrolling: touch;
}

.appstore-featured {
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 12px;
}

.featured-card {
    height: 320px;
    background-size: cover;
    background-position: center;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    overflow: hidden;
}

.featured-info {
    padding: 20px;
    color: white;
}

.featured-app-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.featured-app-icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background-size: cover;
    background-position: center;
}

.featured-app-name {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.featured-dot {
    color: rgba(255,255,255,0.6);
}

.featured-event {
    font-size: 13px;
    color: rgba(255,255,255,0.8);
}

.featured-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.featured-subtitle {
    font-size: 15px;
    color: rgba(255,255,255,0.85);
    margin-bottom: 16px;
}

.featured-play-btn {
    background: rgba(255,255,255,0.25);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border: none;
    border-radius: 20px;
    padding: 10px 32px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    width: fit-content;
}

.featured-play-btn:active {
    background: rgba(255,255,255,0.4);
}

.appstore-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 24px;
}

.appstore-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0,0,0,0.2);
    transition: background 0.2s;
}

.appstore-dots .dot.active {
    background: #000;
}

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

.appstore-section .section-title {
    font-size: 22px;
    font-weight: 700;
    color: #000;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.apps-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

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

.app-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.app-icon-large {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.app-card .app-name {
    font-size: 12px;
    color: #000;
    text-align: center;
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.new-games-banner {
    border-radius: 16px;
    padding: 16px;
    overflow: hidden;
}

.app-card-small {
    flex-shrink: 0;
}

.app-icon-small {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.appstore-tabbar {
    position: absolute;
    bottom: 12px;
    left: 16px;
    right: 16px;
    display: flex;
    border-radius: 999px;
    background: transparent;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border: 0.5px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    padding: 8px 8px 10px;
    z-index: 100;
    isolation: isolate;
}

.appstore-tabbar .tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px 0;
    cursor: pointer;
    color: #8e8e93;
    transition: color 0.2s;
    position: relative;
    z-index: 1;
}

.appstore-tabbar .tab-item.active {
    color: #007AFF;
}
.appstore-tabbar .tab-item.active::before {
    content: '';
    position: absolute;
    top: -6px;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 72px;
    background: rgba(255,255,255,0.16);
    box-shadow: inset 0 0.5px 0 rgba(255,255,255,0.3);
    backdrop-filter: blur(8px) saturate(140%);
    -webkit-backdrop-filter: blur(8px) saturate(140%);
    border-radius: 999px;
    border: 0.5px solid rgba(255,255,255,0.28);
    z-index: -1;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.appstore-tabbar.tab-switching .tab-item.active::before {
    animation: tabLiquid 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.appstore-tabbar .tab-item svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.appstore-tabbar .tab-item span {
    font-size: 10px;
    font-weight: 500;
}

/* App Store Search Bar */
.appstore-search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 999px;
    padding: 10px 14px;
    margin-bottom: 16px;
    border: 0.5px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04), inset 0 0.5px 0 rgba(255, 255, 255, 0.4);
}

.appstore-search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 17px;
    color: #000;
    outline: none;
}

.appstore-search-bar input::placeholder {
    color: #8e8e93;
}

/* App Store List Items */
.appstore-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: white;
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
}

.app-icon-medium {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.app-list-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.app-list-name {
    font-size: 16px;
    font-weight: 500;
    color: #000;
}

.app-list-category {
    font-size: 13px;
    color: #8e8e93;
}

.app-get-btn, .app-open-btn {
    padding: 6px 20px;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
}

.app-get-btn {
    background: #007AFF;
    color: white;
    min-width: 60px;
}

.app-get-btn.installed {
    background: rgba(0,122,255,0.12);
    color: #007AFF;
}

.app-open-btn {
    background: rgba(142, 142, 147, 0.12);
    color: #007AFF;
}

/* Discover Tags */
.discover-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.discover-tag {
    padding: 8px 16px;
    background: rgba(142, 142, 147, 0.12);
    border-radius: 18px;
    font-size: 15px;
    color: #007AFF;
    cursor: pointer;
}

.discover-tag:active {
    background: rgba(0, 122, 255, 0.1);
}

/* App Detail View */
.app-detail-header {
    padding: 12px 16px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

.app-detail-back {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.app-detail-content {
    padding: 16px;
    padding-bottom: 100px;
}

.app-detail-top {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.app-detail-icon {
    width: 100px;
    height: 100px;
    border-radius: 22px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.app-detail-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.app-detail-name {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    color: #000;
}

.app-detail-category {
    font-size: 14px;
    color: #8e8e93;
    margin: 0 0 8px 0;
}

.app-detail-get-btn {
    padding: 8px 24px;
    background: #007AFF;
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: fit-content;
}

.app-detail-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 16px;
    background: rgba(142, 142, 147, 0.06);
    border-radius: 12px;
    margin-bottom: 20px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.stat-value {
    font-size: 18px;
    font-weight: 600;
    color: #000;
}

.stat-label {
    font-size: 12px;
    color: #8e8e93;
    text-transform: uppercase;
}

.stat-divider {
    width: 1px;
    background: rgba(0,0,0,0.1);
}

.app-detail-section {
    margin-bottom: 20px;
}

.app-detail-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #000;
}

.app-detail-section p {
    font-size: 15px;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

/* === FILES APP (iOS 26 Liquid Glass) === */
.files-icon {
    width: 60px;
    height: 60px;
    border-radius: 13px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.files-icon svg {
    width: 100%;
    height: 100%;
}

.files-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--ios-gray-light);
}

.files-tabs {
    display: flex;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 0.5px solid rgba(0,0,0,0.08);
    padding: 0 16px;
    margin-top: 60px;
}

.files-tab {
    flex: 1;
    padding: 12px 0;
    text-align: center;
    font-size: 15px;
    font-weight: 500;
    color: var(--ios-gray);
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.files-tab.active {
    color: var(--ios-blue);
    border-bottom-color: var(--ios-blue);
}

.files-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    -webkit-overflow-scrolling: touch;
}

.files-locations {
    margin-bottom: 20px;
}

.files-section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--ios-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    padding: 0 4px;
}

.files-location-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: transform 0.15s, background 0.15s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.files-location-card:active {
    transform: scale(0.98);
    background: rgba(255,255,255,0.9);
}

.files-location-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.files-location-icon svg {
    width: 22px;
    height: 22px;
}

.files-location-icon.blue { background: linear-gradient(135deg, #5AC8FA, #007AFF); }
.files-location-icon.orange { background: linear-gradient(135deg, #FF9500, #FF6B00); }
.files-location-icon.green { background: linear-gradient(135deg, #34C759, #30B850); }
.files-location-icon.purple { background: linear-gradient(135deg, #AF52DE, #8E44AD); }

.files-location-icon svg { fill: white; }

.files-location-info {
    flex: 1;
}

.files-location-name {
    font-size: 17px;
    font-weight: 500;
    color: #000;
}

.files-location-meta {
    font-size: 13px;
    color: var(--ios-gray);
    margin-top: 2px;
}

.files-location-arrow {
    color: rgba(60, 60, 67, 0.3);
    font-size: 20px;
}

.files-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 0.5px solid rgba(0,0,0,0.08);
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

.files-breadcrumb-item {
    font-size: 15px;
    color: var(--ios-blue);
    cursor: pointer;
    flex-shrink: 0;
}

.files-breadcrumb-item.current {
    color: #000;
    font-weight: 600;
}

.files-breadcrumb-separator {
    color: rgba(60, 60, 67, 0.3);
    font-size: 14px;
}

.files-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-top: 0.5px solid rgba(0,0,0,0.08);
}

.files-toolbar-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--ios-blue);
    font-size: 15px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.15s;
}

.files-toolbar-btn:active {
    background: rgba(0,122,255,0.1);
}

.files-toolbar-btn svg {
    width: 20px;
    height: 20px;
    fill: var(--ios-blue);
}

.files-list {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.files-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 0.5px solid rgba(0,0,0,0.08);
    cursor: pointer;
    transition: background 0.15s;
}

.files-item:last-child {
    border-bottom: none;
}

.files-item:active {
    background: rgba(0,0,0,0.04);
}

.files-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.files-item-icon.folder {
    background: linear-gradient(135deg, #5AC8FA, #007AFF);
}

.files-item-icon.folder svg {
    fill: white;
    width: 22px;
    height: 22px;
}

.files-item-icon.file {
    background: #f2f2f7;
}

.files-item-icon.file svg {
    fill: var(--ios-gray);
    width: 20px;
    height: 20px;
}

.files-item-icon.image {
    background: linear-gradient(135deg, #FF9500, #FF6B00);
}

.files-item-icon.image svg { fill: white; }

.files-item-icon.video {
    background: linear-gradient(135deg, #FF3B30, #FF2D55);
}

.files-item-icon.video svg { fill: white; }

.files-item-icon.audio {
    background: linear-gradient(135deg, #FF2D55, #AF52DE);
}

.files-item-icon.audio svg { fill: white; }

.files-item-icon.document {
    background: linear-gradient(135deg, #007AFF, #5856D6);
}

.files-item-icon.document svg { fill: white; }

.files-item-info {
    flex: 1;
    min-width: 0;
}

.files-item-name {
    font-size: 17px;
    color: #000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.files-item-meta {
    font-size: 13px;
    color: var(--ios-gray);
    margin-top: 2px;
}

.files-item-arrow {
    color: rgba(60, 60, 67, 0.3);
    font-size: 18px;
    margin-left: 8px;
}

.files-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.files-empty-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #5AC8FA, #007AFF);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.files-empty-icon svg {
    width: 44px;
    height: 44px;
    fill: white;
}

.files-empty-title {
    font-size: 20px;
    font-weight: 600;
    color: #000;
    margin-bottom: 8px;
}

.files-empty-text {
    font-size: 15px;
    color: var(--ios-gray);
    max-width: 280px;
    line-height: 1.4;
}

.files-grant-btn {
    background: var(--ios-blue);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 600;
    margin-top: 24px;
    cursor: pointer;
    transition: transform 0.15s, opacity 0.15s;
}

.files-grant-btn:active {
    transform: scale(0.96);
    opacity: 0.9;
}

.files-action-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.files-action-sheet.active {
    opacity: 1;
    visibility: visible;
}

.files-action-sheet-content {
    position: absolute;
    bottom: 0;
    left: 8px;
    right: 8px;
    transform: translateY(100%);
    transition: transform 0.35s var(--spring-smooth);
}

.files-action-sheet.active .files-action-sheet-content {
    transform: translateY(0);
}

.files-action-group {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 8px;
}

.files-action-item {
    padding: 16px;
    text-align: center;
    font-size: 20px;
    color: var(--ios-blue);
    border-bottom: 0.5px solid rgba(0,0,0,0.08);
    cursor: pointer;
    transition: background 0.15s;
}

.files-action-item:last-child {
    border-bottom: none;
}

.files-action-item:active {
    background: rgba(0,0,0,0.04);
}

.files-action-item.destructive {
    color: var(--ios-red);
}

.files-action-cancel {
    background: white;
    border-radius: 14px;
    padding: 16px;
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    color: var(--ios-blue);
    margin-bottom: 8px;
    cursor: pointer;
}

.files-quick-look {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.files-quick-look.active {
    opacity: 1;
    visibility: visible;
}

.files-quick-look-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 50px 16px 12px;
    background: rgba(0,0,0,0.6);
}

.files-quick-look-close {
    color: var(--ios-blue);
    font-size: 17px;
    cursor: pointer;
}

.files-quick-look-title {
    color: white;
    font-size: 17px;
    font-weight: 600;
    flex: 1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 40px;
}

.files-quick-look-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow: auto;
}

.files-quick-look-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.files-quick-look-content pre {
    color: white;
    font-size: 14px;
    white-space: pre-wrap;
    word-break: break-word;
    padding: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    max-width: 100%;
    max-height: 100%;
    overflow: auto;
}

.files-unsupported {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.files-unsupported-icon {
    font-size: 60px;
    margin-bottom: 16px;
}

.files-search-bar {
    margin: 0 0 16px 0;
    position: relative;
}

.files-search-input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border: none;
    border-radius: 999px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    font-size: 17px;
    color: #000;
    outline: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04), inset 0 0.5px 0 rgba(255, 255, 255, 0.4);
    box-sizing: border-box;
}

.files-search-input::placeholder {
    color: rgba(60, 60, 67, 0.6);
}

.files-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    fill: rgba(60, 60, 67, 0.6);
}

.files-sort-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    overflow: hidden;
    z-index: 100;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95) translateY(-10px);
    transform-origin: top right;
    transition: all 0.2s var(--spring-smooth);
}

.files-sort-menu.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
}

.files-sort-item {
    padding: 12px 16px;
    font-size: 17px;
    color: #000;
    border-bottom: 0.5px solid rgba(0,0,0,0.08);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.files-sort-item:last-child {
    border-bottom: none;
}

.files-sort-item:active {
    background: rgba(0,0,0,0.04);
}

.files-sort-item.active::after {
    content: '✓';
    color: var(--ios-blue);
}

.files-recents-list {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* === iOS 26 FILES APP NEW DESIGN === */
.files-container-ios26 {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    background: #f2f2f7;
    position: relative;
}

.files-header-ios26 {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255,255,255,0.72);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.files-back-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #007AFF;
    cursor: pointer;
    margin-right: 4px;
}

.files-header-title {
    flex: 1;
    font-size: 20px;
    font-weight: 600;
    color: #000;
}

.files-header-actions {
    display: flex;
    gap: 8px;
}

.files-header-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #007AFF;
    cursor: pointer;
    border-radius: 20px;
    transition: background 0.15s;
}

.files-header-btn:active {
    background: rgba(0,122,255,0.1);
}

.files-search-ios26 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 16px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 18px;
    border: 0.5px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04), inset 0 0.5px 0 rgba(255, 255, 255, 0.4);
}

.files-search-ios26 input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 17px;
    color: #000;
    outline: none;
}

.files-search-ios26 input::placeholder {
    color: rgba(60,60,67,0.6);
}

.files-content-ios26 {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px 100px;
    -webkit-overflow-scrolling: touch;
}

.files-list-ios26 {
    background: rgba(255,255,255,0.72);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.files-item-ios26 {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 0.5px solid rgba(0,0,0,0.08);
    cursor: pointer;
    transition: background 0.15s;
}

.files-item-ios26:last-child {
    border-bottom: none;
}

.files-item-ios26:active {
    background: rgba(0,0,0,0.04);
}

.files-item-icon-ios26 {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 14px;
    flex-shrink: 0;
}

.files-item-info-ios26 {
    flex: 1;
    min-width: 0;
}

.files-item-name-ios26 {
    font-size: 17px;
    font-weight: 400;
    color: #000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.files-item-meta-ios26 {
    font-size: 13px;
    color: rgba(60,60,67,0.6);
    margin-top: 2px;
}

.files-item-arrow-ios26 {
    color: rgba(60,60,67,0.3);
    font-size: 22px;
    font-weight: 300;
    margin-left: 8px;
}

.files-empty-ios26 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
}

.files-empty-icon-ios26 {
    margin-bottom: 16px;
}

.files-empty-title-ios26 {
    font-size: 20px;
    font-weight: 600;
    color: #000;
    margin-bottom: 8px;
}

.files-empty-text-ios26 {
    font-size: 15px;
    color: rgba(60,60,67,0.6);
}

.files-bottom-tabs-ios26 {
    position: absolute;
    bottom: 12px;
    left: 16px;
    right: 16px;
    display: flex;
    border-radius: 999px;
    background: transparent;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border: 0.5px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    padding: 6px 8px 8px;
    z-index: 100;
    isolation: isolate;
}

.files-bottom-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 4px 0;
    color: rgba(60,60,67,0.6);
    cursor: pointer;
    transition: color 0.15s;
    position: relative;
    z-index: 1;
}

.files-bottom-tab.active {
    color: #007AFF;
    position: relative;
    z-index: 1;
}
.files-bottom-tab.active::before {
    content: '';
    position: absolute;
    top: -6px;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 72px;
    background: rgba(120, 120, 128, 0.16);
    backdrop-filter: blur(8px) saturate(140%);
    -webkit-backdrop-filter: blur(8px) saturate(140%);
    border-radius: 999px;
    border: 0.5px solid rgba(255,255,255,0.28);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 1px 4px rgba(0,0,0,0.08);
    z-index: -1;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.files-bottom-tabs-ios26.tab-switching .files-bottom-tab.active::before {
    animation: tabLiquid 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.files-bottom-tab span {
    font-size: 10px;
    font-weight: 500;
}

.files-sort-menu-ios26 {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    min-width: 240px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s var(--spring-smooth);
}

.files-sort-menu-ios26.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.files-sort-item-ios26 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    font-size: 17px;
    color: #000;
    border-bottom: 0.5px solid rgba(0,0,0,0.08);
    cursor: pointer;
}

.files-sort-item-ios26:last-child {
    border-bottom: none;
}

.files-sort-item-ios26:active {
    background: rgba(0,0,0,0.04);
}

/* === iOS 26 CUSTOM KEYBOARD === */
#ios-keyboard {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100030;
    background: rgba(242, 242, 245, 0.92);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 20px 20px 0 0;
    padding: 0 0 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    transform: translateY(0);
    transition: transform 0.4s var(--spring-bounce), opacity 0.25s ease;
    border-top: 0.5px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.12);
}

#ios-keyboard.hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

#ios-keyboard.showing {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* Suggestion bar at top */
.keyboard-suggestions {
    display: flex;
    height: 44px;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.1);
}

.keyboard-suggestion {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 400;
    color: #000;
    cursor: pointer;
    position: relative;
}

.keyboard-suggestion:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 10px;
    bottom: 10px;
    width: 0.5px;
    background: rgba(0, 0, 0, 0.15);
}

.keyboard-suggestion:active {
    background: rgba(0, 0, 0, 0.05);
}

.keyboard-container {
    padding: 8px 3px 10px 3px;
}

.keyboard-row {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 10px;
    padding: 0 3px;
}

.keyboard-row:last-child {
    margin-bottom: 0;
}

/* Middle row (ASDFGHJKL) - add spacing on left and right like real iOS */
.keyboard-row:nth-child(2) {
    padding: 0 18px;
}

.keyboard-row:nth-child(3) .key:not(.key-shift):not(.key-backspace):not(.key-123):not(.key-abc) {
    flex: 1;
    max-width: 36px;
}

/* iOS 26 Keys: pure white, semi-transparent, no shadow/outline */
.key {
    min-width: 30px;
    height: 38px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 23px;
    font-weight: 400;
    letter-spacing: -0.5px;
    color: #000;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    flex: 1;
    max-width: 36px;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.key .key-letter {
    transition: opacity 0.05s ease;
}

.key.pressed .key-letter {
    opacity: 0;
}

/* Key pressed state - no scale, just visual feedback */
.key:active:not(.key-has-popup) {
    background: rgba(200, 200, 205, 0.9);
}

/* Special keys: same white as regular keys */
.key-shift,
.key-backspace {
    flex: 1.4;
    max-width: 46px;
    background: rgba(255, 255, 255, 0.85);
}

.key-shift.active {
    background: rgba(255, 255, 255, 0.95);
}

.key-shift svg,
.key-backspace svg {
    fill: #000;
}

.key-123,
.key-abc {
    flex: 2.2;
    max-width: 60px;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: -0.3px;
    background: rgba(255, 255, 255, 0.85);
}

.key-emoji,
.key-mic {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    background: transparent;
    border-radius: 8px;
}

.key-space {
    flex: 1.5;
    max-width: none;
    min-width: 80px;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.3px;
}

.key-return {
    flex: 2.2;
    max-width: 60px;
    background: rgba(255, 255, 255, 0.85);
}

.key-return svg {
    fill: #000;
}

.key-return:active {
    background: rgba(200, 200, 205, 0.9);
}

.keyboard-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px 6px 12px;
}

.keyboard-bottom-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
}

.keyboard-bottom-icon svg {
    width: 24px;
    height: 24px;
    fill: #000;
}

/* iOS 26 Key Popup - Extension morphing from key */
.key-popup {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 44px;
    height: 70px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 10px 10px 8px 8px;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 10px;
    font-size: 28px;
    font-weight: 500;
    color: #000;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    pointer-events: none;
    z-index: 10001;
}

.key-popup.visible {
    display: flex;
}

/* Swipe trail canvas */
#swipe-trail-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10002;
}

/* Caret styling for custom keyboard inputs */
input[data-custom-keyboard],
textarea[data-custom-keyboard] {
    caret-color: var(--ios-blue);
}

/* === SIRI OVERLAY === */
#siri-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

#siri-overlay.hidden {
    display: none;
    opacity: 0;
}

#siri-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, 
        rgba(30, 30, 40, 0.95) 0%, 
        rgba(50, 40, 70, 0.95) 50%,
        rgba(40, 30, 60, 0.95) 100%);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

#siri-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    text-align: center;
}

#siri-orb {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, 
        rgba(100, 150, 255, 0.8) 0%,
        rgba(200, 100, 255, 0.8) 50%,
        rgba(255, 100, 150, 0.8) 100%);
    position: relative;
    margin-bottom: 30px;
    box-shadow: 
        0 0 60px rgba(150, 100, 255, 0.5),
        0 0 100px rgba(100, 150, 255, 0.3);
    animation: siriPulse 2s ease-in-out infinite;
}

@keyframes siriPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.siri-wave {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    animation: siriWave 2s ease-out infinite;
}

.siri-wave:nth-child(2) {
    animation-delay: 0.5s;
}

.siri-wave:nth-child(3) {
    animation-delay: 1s;
}

@keyframes siriWave {
    0% {
        width: 100%;
        height: 100%;
        opacity: 0.5;
    }
    100% {
        width: 250%;
        height: 250%;
        opacity: 0;
    }
}

#siri-orb.listening {
    animation: siriListening 0.5s ease-in-out infinite alternate;
}

@keyframes siriListening {
    0% { transform: scale(0.95); }
    100% { transform: scale(1.1); }
}

#siri-orb.speaking {
    animation: siriSpeaking 0.3s ease-in-out infinite alternate;
}

@keyframes siriSpeaking {
    0% { transform: scale(1); }
    100% { transform: scale(1.15); }
}

#siri-status {
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 20px;
    min-height: 24px;
}

#siri-transcript {
    color: white;
    font-size: 24px;
    font-weight: 600;
    max-width: 300px;
    min-height: 60px;
    margin-bottom: 20px;
}

#siri-response {
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
    font-weight: 400;
    max-width: 300px;
    line-height: 1.5;
    min-height: 50px;
}

#siri-buttons {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 16px;
    z-index: 2;
}

#siri-close, #siri-chat-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

#siri-close:active, #siri-chat-btn:active {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0.95);
}

#siri-chat-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #1c1c1e;
    z-index: 10002;
    display: flex;
    flex-direction: column;
    animation: siriChatSlideIn 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

#siri-chat-overlay.hidden {
    display: none;
}

@keyframes siriChatSlideIn {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

#siri-chat-header {
    display: flex;
    align-items: center;
    padding: 56px 16px 12px;
    gap: 12px;
    background: rgba(28, 28, 30, 0.95);
    backdrop-filter: blur(2px);
    border-bottom: 0.5px solid rgba(255,255,255,0.1);
}

.siri-chat-back {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.siri-chat-title {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 17px;
    font-weight: 600;
}

.siri-chat-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #ff5f6d, #ffc371);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.siri-chat-search-toggle {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
}

.siri-chat-search-toggle svg {
    fill: #8e8e93;
    transition: fill 0.2s;
}

.siri-chat-search-toggle.active {
    background: rgba(10, 132, 255, 0.2);
}

.siri-chat-search-toggle.active svg {
    fill: #0a84ff;
}

#siri-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.siri-chat-msg {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 16px;
    line-height: 1.4;
    animation: chatMsgIn 0.25s ease-out;
}

@keyframes chatMsgIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.siri-chat-msg.user {
    background: #0a84ff;
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 6px;
}

.siri-chat-msg.assistant {
    background: #2c2c2e;
    color: #fff;
    align-self: flex-start;
    border-bottom-left-radius: 6px;
}

.siri-chat-msg.thinking {
    background: #2c2c2e;
    color: #8e8e93;
    align-self: flex-start;
    font-style: italic;
}

.siri-chat-msg.thinking::after {
    content: '';
    display: inline-block;
    animation: thinkingDots 1.4s infinite;
}

@keyframes thinkingDots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

.siri-chat-web-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #8e8e93;
    margin-bottom: 6px;
}

.siri-chat-web-indicator svg {
    width: 14px;
    height: 14px;
    fill: #8e8e93;
}

#siri-chat-input-area {
    display: flex;
    align-items: center;
    padding: 12px 16px 30px;
    gap: 12px;
    background: rgba(28, 28, 30, 0.95);
    backdrop-filter: blur(2px);
    border-top: 0.5px solid rgba(255,255,255,0.1);
    transition: bottom 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    z-index: 100;
}

#siri-chat-input-area.keyboard-active {
    position: fixed;
    bottom: 290px;
    left: 0;
    right: 0;
    padding-bottom: 12px;
}

#siri-chat-messages.keyboard-active {
    padding-bottom: 120px;
}

.apple-intelligence-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF6B6B 0%, #9B59B6 50%, #3498DB 100%);
}

#siri-chat-input {
    flex: 1;
    height: 40px;
    background: #2c2c2e;
    border: none;
    border-radius: 20px;
    padding: 0 16px;
    color: #fff;
    font-size: 16px;
    outline: none;
}

#siri-chat-input::placeholder {
    color: #8e8e93;
}

#siri-chat-send {
    width: 40px;
    height: 40px;
    background: #0a84ff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s, background 0.15s;
}

#siri-chat-send:active {
    transform: scale(0.92);
    background: #0070e0;
}

/* Voice Typing Mode */
.voice-typing-container {
    display: flex;
    flex-direction: column;
    min-height: 260px;
    height: 260px;
    padding: 16px;
    position: relative;
}

.voice-typing-back {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
}

.voice-typing-back:active {
    background: rgba(255, 255, 255, 0.5);
}

.voice-typing-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: -40px;
    gap: 16px;
}

.voice-typing-pulse {
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(0, 122, 255, 0.2);
    transition: transform 0.1s ease-out, opacity 0.1s ease-out;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.voice-typing-mic {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 122, 255, 0.3);
    z-index: 1;
    transition: transform 0.2s, box-shadow 0.2s;
}

.voice-typing-mic.active {
    box-shadow: 0 4px 30px rgba(0, 122, 255, 0.5);
    animation: micPulse 1.5s ease-in-out infinite;
}

@keyframes micPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.voice-typing-status {
    font-size: 15px;
    color: #666;
    text-align: center;
    max-width: 80%;
    min-height: 20px;
}

.keyboard-mic-btn {
    cursor: pointer;
}

.keyboard-mic-btn:active svg {
    fill: #007AFF;
}

/* === CONTACT POPUP === */
#contact-popup {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%) translateY(-120px);
    width: calc(100% - 32px);
    max-width: 388px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 200000;
    opacity: 0;
    transition: transform 0.4s var(--spring-smooth), opacity 0.3s ease;
}

#contact-popup.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

#contact-popup.hidden {
    display: none;
}

.contact-popup-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5ac8fa, #007aff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.contact-popup-info {
    flex: 1;
    min-width: 0;
}

.contact-popup-name {
    font-size: 18px;
    font-weight: 600;
    color: #000;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-popup-number {
    font-size: 15px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-popup-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.contact-popup-call,
.contact-popup-message {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.contact-popup-call:active,
.contact-popup-message:active {
    background: rgba(0, 0, 0, 0.12);
}

/* === CONTACT CONTEXT MENU === */
#contact-context-menu {
    position: absolute;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2), 0 0 0 0.5px rgba(0, 0, 0, 0.05);
    z-index: 150000;
    overflow: hidden;
    min-width: 140px;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.2s ease, transform 0.2s var(--spring-smooth);
}

#contact-context-menu.visible {
    opacity: 1;
    transform: scale(1);
}

#contact-context-menu.hidden {
    display: none;
}

.contact-menu-option {
    padding: 14px 20px;
    font-size: 17px;
    color: #000;
    cursor: pointer;
    transition: background 0.15s;
}

.contact-menu-option:active {
    background: rgba(0, 0, 0, 0.08);
}

.contact-menu-option.delete {
    color: #ff3b30;
}

.contact-menu-divider {
    height: 0.5px;
    background: rgba(0, 0, 0, 0.1);
    margin: 0 12px;
}

/* === NOTES APP iOS 26 HEADER === */
.note-editor-header-ios26 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px 8px 30px 8px;
    margin-bottom: 4px;
}

.note-back-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 22px;
    transition: background 0.15s;
}

.note-back-btn:active {
    background: rgba(0, 122, 255, 0.1);
}

.note-header-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.note-search-btn,
.note-menu-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 22px;
    transition: background 0.15s;
}

.note-search-btn:active,
.note-menu-btn:active {
    background: rgba(0, 122, 255, 0.1);
}

/* === NOTE MENU POPUP === */
.note-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.note-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.note-menu-sheet {
    position: absolute;
    bottom: 0;
    left: 8px;
    right: 8px;
    transform: translateY(100%);
    transition: transform 0.35s var(--spring-smooth);
}

.note-menu-overlay.active .note-menu-sheet {
    transform: translateY(-8px);
}

.note-menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    font-size: 18px;
    color: #000;
    cursor: pointer;
    transition: background 0.15s;
}

.note-menu-item:first-child {
    border-radius: 14px 14px 0 0;
}

.note-menu-item:last-of-type {
    border-radius: 0 0 14px 14px;
}

.note-menu-item:active {
    background: rgba(240, 240, 240, 0.95);
}

.note-menu-cancel {
    margin-top: 8px;
    padding: 16px;
    background: white;
    border-radius: 14px;
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    color: #007AFF;
    cursor: pointer;
    margin-bottom: 8px;
}

/* === SAVE AS POPUP === */
.save-as-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 100020;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    pointer-events: none;
}

.save-as-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
    pointer-events: auto;
}

.save-as-overlay.active {
    opacity: 1;
    visibility: visible;
}

.save-as-overlay.keyboard-active::before {
    bottom: 290px;
}

.save-as-overlay.keyboard-active {
    align-items: flex-start;
    padding-top: 80px;
}

.save-as-modal {
    width: 90%;
    max-width: 320px;
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 16px;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s var(--spring-smooth);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.save-as-overlay.active .save-as-modal {
    transform: scale(1);
}

.save-as-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.1);
}

.save-as-cancel,
.save-as-save {
    font-size: 17px;
    color: #007AFF;
    cursor: pointer;
    padding: 4px 8px;
}

.save-as-save {
    font-weight: 600;
}

.save-as-cancel:active,
.save-as-save:active {
    opacity: 0.6;
}

.save-as-title {
    font-size: 17px;
    font-weight: 600;
    color: #000;
}

.save-as-content {
    padding: 20px 16px 24px;
}

.save-as-label {
    font-size: 15px;
    color: #666;
    margin-bottom: 12px;
}

.save-as-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 999px;
    font-size: 17px;
    color: #000;
    background: rgba(255, 255, 255, 0.8);
    outline: none;
    transition: border-color 0.2s;
}

.save-as-input:focus {
    border-color: #007AFF;
}

.save-as-hint {
    font-size: 13px;
    color: #888;
    margin-top: 10px;
}

/* === iOS TOAST === */
.ios-toast {
    position: fixed;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 500;
    z-index: 200000;
    animation: toastIn 0.3s var(--spring-smooth);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    max-width: 90%;
    text-align: center;
}

.ios-toast.fade-out {
    animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
}

/* === UNIVERSAL FILE VIEWER === */
.universal-file-viewer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 100000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.universal-file-viewer.active {
    opacity: 1;
    visibility: visible;
}

.file-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 50px 16px 12px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.file-viewer-close {
    color: #007AFF;
    font-size: 17px;
    cursor: pointer;
    padding: 4px 8px;
}

.file-viewer-title {
    color: white;
    font-size: 17px;
    font-weight: 600;
    flex: 1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 20px;
}

.file-viewer-content {
    flex: 1;
    overflow: auto;
    padding: 16px;
    -webkit-overflow-scrolling: touch;
}

.file-viewer-text,
.file-viewer-code {
    color: #fff;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px;
    margin: 0;
}

.file-viewer-code {
    color: #a9dc76;
}

.file-viewer-json {
    color: #78dce8;
}

.file-viewer-css {
    color: #ff6188;
}

.file-viewer-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.file-viewer-tab {
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.file-viewer-tab.active {
    background: #007AFF;
    color: white;
}

.file-viewer-html-rendered {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
}

.file-viewer-html-rendered iframe {
    width: 100%;
    height: 100%;
    min-height: 400px;
    border: none;
}

.file-viewer-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 40px;
}

.file-viewer-filename {
    color: white;
    font-size: 18px;
    font-weight: 600;
    margin-top: 20px;
}

.file-viewer-type {
    color: rgba(255, 255, 255, 0.6);
    font-size: 15px;
    margin-top: 8px;
}

.file-viewer-size {
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
    margin-top: 4px;
}

.file-viewer-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.file-viewer-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.file-viewer-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.file-viewer-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
}

.file-viewer-table th,
.file-viewer-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 14px;
}

.file-viewer-table th {
    background: rgba(255, 255, 255, 0.1);
    font-weight: 600;
}

.file-viewer-table tr:last-child td {
    border-bottom: none;
}

/* === PIN OVERLAY - iOS 26 Liquid Glass === */
#pin-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.85) 0%, rgba(20,20,30,0.95) 100%);
    z-index: 100050;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 100px;
}

#pin-setup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.85) 0%, rgba(20,20,30,0.95) 100%);
    z-index: 100050;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 85px;
}

#pin-overlay.hidden,
#pin-setup-overlay.hidden {
    display: none;
}

.pin-container-glass {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 320px;
    padding: 0 20px;
}

.pin-header {
    text-align: center;
    margin-bottom: 24px;
}

.pin-title {
    color: white;
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 6px;
}

.pin-subtitle {
    color: rgba(255,255,255,0.5);
    font-size: 14px;
}

.pin-dots-container {
    display: flex;
    gap: 14px;
    margin-bottom: 16px;
    min-height: 16px;
}

.pin-dot {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 50%;
    transition: all 0.15s ease;
    background: transparent;
}

.pin-dot.filled {
    background: white;
    border-color: white;
    box-shadow: 0 0 8px rgba(255,255,255,0.4);
}

.pin-dot.hidden {
    display: none;
}

.pin-error {
    color: var(--ios-red);
    font-size: 14px;
    height: 20px;
    margin-bottom: 8px;
}

.pin-keypad-glass {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: 100%;
    max-width: 280px;
    margin-bottom: 20px;
}

.pin-key-glass {
    aspect-ratio: 1;
    width: 100%;
    max-width: 80px;
    margin: 0 auto;
    border-radius: 50%;
    background: transparent;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border: 0.5px solid rgba(255, 255, 255, 0.45);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    isolation: isolate;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18), inset 0 0 20px -5px rgba(255,255,255,0.45), inset 0 1px 0 rgba(255,255,255,0.6);
}

.pin-key-glass > span:first-child {
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
}

.pin-key-letters {
    font-size: 9px;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.6);
    margin-top: 2px;
}

.pin-key-glass:active {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(0.95);
}

.pin-key-glass.empty {
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    pointer-events: none;
}

.pin-key-glass.action {
    background: transparent;
}

.pin-key-glass.action:active {
    background: rgba(255, 255, 255, 0.2);
}

.pin-actions {
    display: flex;
    gap: 40px;
    margin-top: 8px;
}

.pin-action-btn {
    color: var(--ios-blue);
    font-size: 17px;
    padding: 10px 20px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.pin-action-btn.primary {
    background: rgba(0, 122, 255, 0.2);
    border-radius: 20px;
    font-weight: 500;
}

.pin-action-btn:active {
    opacity: 0.6;
}

/* === FACE ID OVERLAY - iOS 26 Style === */
#faceid-overlay,
#faceid-setup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.9) 0%, rgba(10,10,20,0.98) 100%);
    z-index: 100050;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 80px;
}

#faceid-overlay.hidden,
#faceid-setup-overlay.hidden {
    display: none;
}

.faceid-container-glass {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px;
    width: 100%;
    max-width: 300px;
}

.faceid-camera-wrapper {
    position: relative;
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.faceid-progress-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.faceid-progress-bar {
    transition: stroke-dashoffset 0.3s ease;
}

#faceid-video,
#faceid-setup-video {
    position: absolute;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    z-index: 1;
    transform: scaleX(-1);
    background: rgba(30,30,40,1);
    border: 3px solid rgba(255,255,255,0.1);
}

#faceid-canvas,
#faceid-setup-canvas {
    display: none;
}

.faceid-status-text {
    color: white;
    font-size: 20px;
    font-weight: 400;
    text-align: center;
}

.faceid-percent {
    color: rgba(255,255,255,0.6);
    font-size: 16px;
    font-weight: 300;
}

.faceid-hint {
    color: var(--ios-blue);
    font-size: 15px;
    margin-top: 30px;
    cursor: pointer;
}

.faceid-action-btn {
    color: var(--ios-blue);
    font-size: 17px;
    padding: 12px 24px;
    cursor: pointer;
    margin-top: 20px;
}

.faceid-action-btn:active {
    opacity: 0.6;
}

@keyframes gospelVerseIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.floating-glass-search {
    position: absolute;
    bottom: 28px;
    left: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 50px;
    padding: 0 16px;
    background: transparent;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 999px;
    border: 0.5px solid rgba(255,255,255,0.45);
    box-shadow: 0 4px 24px rgba(0,0,0,0.18), inset 0 0 20px -5px rgba(255,255,255,0.45), inset 0 1px 0 rgba(255,255,255,0.6);
    isolation: isolate;
    z-index: 100;
    transition: transform 0.3s ease;
}

.floating-glass-search input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 16px;
    color: #000;
    outline: none;
}

.floating-glass-search input::placeholder {
    color: rgba(60,60,67,0.5);
}

.floating-glass-search svg {
    flex-shrink: 0;
    color: rgba(60,60,67,0.5);
}

.floating-glass-search.keyboard-active {
    transform: translateY(-260px);
}

/* Hide scrollbars in web content */
.web-content-frame,
.web-content-frame * {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.web-content-frame::-webkit-scrollbar,
.web-content-frame *::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* Simulator Alert Overlay */
.simulator-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    animation: fadeIn 0.2s ease;
}

.simulator-alert {
    background: transparent;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 20px;
    border: 0.5px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    isolation: isolate;
    width: 270px;
    overflow: hidden;
    animation: alertBounce 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes alertBounce {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.simulator-alert-content {
    padding: 20px 16px 16px;
    text-align: center;
}

.simulator-alert-title {
    font-size: 17px;
    font-weight: 600;
    color: #000;
    margin-bottom: 4px;
}

.simulator-alert-message {
    font-size: 13px;
    color: rgba(0,0,0,0.6);
    line-height: 1.4;
}

.simulator-alert-input {
    width: calc(100% - 32px);
    margin: 12px 16px 0;
    padding: 10px 12px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 999px;
    font-size: 15px;
    background: rgba(255,255,255,0.8);
}

.simulator-alert-buttons {
    display: flex;
    border-top: 0.5px solid rgba(0,0,0,0.1);
    margin-top: 16px;
}

.simulator-alert-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    font-size: 17px;
    color: #007AFF;
    cursor: pointer;
}

.simulator-alert-btn:not(:last-child) {
    border-right: 0.5px solid rgba(0,0,0,0.1);
}

.simulator-alert-btn.destructive {
    color: #FF3B30;
}

.simulator-alert-btn.bold {
    font-weight: 600;
}

.simulator-alert-btn:active {
    background: rgba(0,0,0,0.05);
}

/* Simulator Notification Banner */
.simulator-notification {
    position: fixed;
    top: 50px;
    left: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 22px;
    padding: 14px 16px;
    margin: 8px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 0.5px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    z-index: 99998;
    animation: notificationSlide 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes notificationSlide {
    0% { transform: translateY(-100px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.simulator-notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #007AFF;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.simulator-notification-content {
    flex: 1;
    min-width: 0;
}

.simulator-notification-title {
    font-size: 15px;
    font-weight: 600;
    color: #000;
}

.simulator-notification-body {
    font-size: 13px;
    color: rgba(0,0,0,0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* File Picker Modal */
.simulator-file-picker {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(242,242,247,0.95);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 20px 20px 0 0;
    z-index: 99999;
    animation: slideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 70vh;
    display: flex;
    flex-direction: column;
}

@keyframes slideUp {
    0% { transform: translateY(100%); }
    100% { transform: translateY(0); }
}

.file-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 0.5px solid rgba(0,0,0,0.1);
}

.file-picker-title {
    font-size: 17px;
    font-weight: 600;
}

.file-picker-close {
    color: #007AFF;
    font-size: 17px;
    cursor: pointer;
}

.file-picker-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

/* === HOME SCREEN EDIT MODE === */
.edit-mode .icon-box {
    animation: jiggle 0.3s ease-in-out infinite alternate;
    cursor: grab;
}
.edit-mode .icon-box:nth-child(even) {
    animation-delay: 0.15s;
}
.edit-mode .icon-box:nth-child(3n) {
    animation-delay: 0.08s;
    animation-direction: alternate-reverse;
}
.edit-mode .icon-box .icon-delete-btn {
    display: flex;
}
.edit-mode .icon-box:active {
    transform: scale(1.1);
    z-index: 1000;
    cursor: grabbing;
}
@keyframes jiggle {
    0% { transform: rotate(-1.5deg) scale(1); }
    100% { transform: rotate(1.5deg) scale(1); }
}

.icon-delete-btn {
    display: none;
    position: absolute;
    top: -6px;
    left: -6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(60, 60, 60, 0.75);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    align-items: center;
    justify-content: center;
    z-index: 10;
    border: 0.5px solid rgba(255, 255, 255, 0.2);
}
.icon-delete-btn svg {
    width: 12px;
    height: 12px;
    fill: white;
}

.icon-box {
    position: relative;
}

.icon-dragging {
    opacity: 0.5;
    transform: scale(0.9) !important;
}

.icon-drag-over {
    transform: scale(1.15);
    transition: transform 0.15s ease;
}

/* Context menu */
.ios-context-menu {
    position: fixed;
    z-index: 100000;
    min-width: 220px;
    background: transparent;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 28px;
    border: 0.5px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    overflow: hidden;
    padding: 6px 0;
    animation: contextMenuIn 0.22s cubic-bezier(0.32, 0.72, 0, 1);
}
@keyframes contextMenuIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}
.ios-context-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 16px;
    font-size: 16px;
    color: #1c1c1e;
    cursor: pointer;
    transition: background 0.15s;
}
.ios-context-menu-item:active {
    background: rgba(0, 0, 0, 0.06);
}
.ios-context-menu-item svg {
    width: 20px;
    height: 20px;
    fill: #8e8e93;
}
.ios-context-menu-item.destructive {
    color: #ff3b30;
}
.ios-context-menu-item.destructive svg {
    fill: #ff3b30;
}
.ios-context-menu-separator {
    height: 0.5px;
    background: rgba(0, 0, 0, 0.1);
    margin: 2px 0;
}
.ios-context-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 99999;
    animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.edit-mode-done-btn {
    position: absolute;
    top: 40px;
    right: 16px;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 20px;
    border: 0.5px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 15px;
    font-weight: 600;
    z-index: 200;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}
/* === iOS 26 LIQUID GLASS TOGGLE === */
.liquid-toggle-ios26 {
    width: 51px;
    height: 31px;
    border-radius: 100px;
    border: none;
    padding: 0;
    cursor: pointer;
    position: relative;
    overflow: visible;
    background: none;
    flex-shrink: 0;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    display: inline-block;
    vertical-align: middle;
}

.liquid-toggle-ios26 .lt-track {
    position: absolute;
    inset: 0;
    border-radius: 100px;
    background: rgba(120, 120, 128, 0.16);
    backdrop-filter: blur(8px) saturate(160%);
    -webkit-backdrop-filter: blur(8px) saturate(160%);
    border: 0.5px solid rgba(255,255,255,0.35);
    box-shadow: inset 0 0.5px 0 rgba(255,255,255,0.4), 0 1px 3px rgba(0,0,0,0.08);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.liquid-toggle-ios26[aria-pressed=true] .lt-track {
    background: #34c759;
    border-color: rgba(255,255,255,0.2);
    box-shadow: inset 0 0.5px 0 rgba(255,255,255,0.3), 0 1px 4px rgba(52,199,89,0.35);
}

.liquid-toggle-ios26 .lt-goo {
    position: absolute;
    inset: 0;
    border-radius: 100px;
    overflow: hidden;
    filter: url(#goo-toggle);
}

.liquid-toggle-ios26 .lt-blob {
    position: absolute;
    width: 27px;
    height: 27px;
    border-radius: 100px;
    background: white;
    top: 2px;
    left: 2px;
    translate: 0 0;
    transition: translate 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                width 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
                height 0.22s ease-out,
                top 0.22s ease-out,
                border-radius 0.22s ease-out,
                background 0.2s ease;
    will-change: translate, width, border-radius;
    box-shadow: 
        0 1px 4px rgba(0,0,0,0.22),
        0 0.5px 1px rgba(0,0,0,0.1),
        inset 0 0.5px 0 rgba(255,255,255,1),
        inset 0 -0.5px 0 rgba(0,0,0,0.04);
}

.liquid-toggle-ios26[aria-pressed=true] .lt-blob {
    translate: 20px 0;
    background: white;
}

/* iOS 26 liquid squish — blob stretches wide and flat while transitioning */
.liquid-toggle-ios26[data-active=true] .lt-blob {
    width: 43px;
    height: 23px;
    top: 4px;
    border-radius: 100px;
    background: rgba(255,255,255,0.97);
    box-shadow: 
        0 2px 10px rgba(0,0,0,0.18),
        inset 0 1px 0 rgba(255,255,255,0.9),
        inset 0 -0.5px 0 rgba(0,0,0,0.05);
}

/* Pull blob toward destination edge during press */
.liquid-toggle-ios26[data-active=true][aria-pressed=false] .lt-blob {
    translate: 4px 0;
}
.liquid-toggle-ios26[data-active=true][aria-pressed=true] .lt-blob {
    translate: 9px 0;
}

.liquid-toggle-ios26 .lt-shadow {
    position: absolute;
    width: 27px;
    height: 27px;
    border-radius: 100px;
    top: 2px;
    left: 2px;
    translate: 0 0;
    transition: translate 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                width 0.22s ease-out, height 0.22s ease-out, top 0.22s ease-out;
    box-shadow: 0 3px 10px rgba(0,0,0,0.22), 0 1px 3px rgba(0,0,0,0.12);
    pointer-events: none;
}

.liquid-toggle-ios26[aria-pressed=true] .lt-shadow {
    translate: 20px 0;
}

.liquid-toggle-ios26[data-active=true] .lt-shadow {
    width: 43px;
    height: 23px;
    top: 4px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.18), 0 1px 3px rgba(0,0,0,0.1);
}

/* === DIAL BUTTON LIQUID GLASS === */
.dial-btn-glass {
    background: rgba(255,255,255,0.18) !important;
    backdrop-filter: blur(24px) saturate(180%) brightness(1.06) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) brightness(1.06) !important;
    border: 0.5px solid rgba(255, 255, 255, 0.55) !important;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        inset 0 -0.5px 0 rgba(0, 0, 0, 0.06) !important;
    border-radius: 50% !important;
    transition: transform 0.12s ease, box-shadow 0.12s ease !important;
}
.dial-btn-glass:active {
    transform: scale(0.93) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.5) !important;
}

/* === FILES APP MISSING CSS === */
.files-content-ios26 {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 16px 110px;
    position: relative;
}

.files-container-ios26 {
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    background: var(--ios-gray-light);
    overflow: hidden;
}

.files-nav-bar-ios26 {
    padding: 48px 0 0;
    position: relative;
    flex-shrink: 0;
}

.files-nav-top-ios26 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 16px;
    min-height: 44px;
}

.files-large-title-ios26 {
    font-size: 34px;
    font-weight: 700;
    color: #000;
    padding: 0 16px 8px;
    letter-spacing: -0.5px;
}

.files-breadcrumb-ios26 {
    font-size: 12px;
    color: rgba(60,60,67,0.5);
    padding: 0 16px 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.files-section-header-ios26 {
    font-size: 22px;
    font-weight: 700;
    color: #000;
    padding: 16px 0 10px;
}

.files-location-row-ios26 {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.72);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 16px;
    padding: 14px 16px;
    gap: 14px;
    cursor: pointer;
    margin-bottom: 8px;
    transition: background 0.15s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.files-location-row-ios26:active {
    background: rgba(255,255,255,0.9);
}

.files-location-icon-ios26 {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #5AC8FA, #007AFF);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.files-location-info-ios26 {
    flex: 1;
}

.files-location-name-ios26 {
    font-size: 17px;
    font-weight: 500;
    color: #000;
}

.files-location-arrow-ios26 {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.files-search-ios26 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 16px 12px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 999px;
    border: 0.5px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04), inset 0 0.5px 0 rgba(255, 255, 255, 0.4);
}

.files-search-ios26 input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    color: #000;
    outline: none;
}

.files-search-ios26 input::placeholder {
    color: rgba(60,60,67,0.5);
}

/* Ensure dial btn glass looks clean */
.dial-btn.dial-btn-glass span {
    position: relative;
    z-index: 1;
}
.dial-btn.dial-btn-glass .dial-letters {
    position: relative;
    z-index: 1;
}

/* Files nav bar top padding correction */
.files-container-ios26 {
    position: relative;
}

/* Settings items get radius from parent .settings-list */

/* Make settings profile card rounder */
.settings-profile-card {
    border-radius: 24px !important;
    overflow: hidden;
}

/* Search bottom glass style */
.settings-search-bottom .settings-search-bar {
    background: rgba(255,255,255,0.72) !important;
    border: 0.5px solid rgba(255,255,255,0.55) !important;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.6) !important;
}

/* Blink keyframe for phone cursor */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Settings search bar keyboard raise */
.settings-search-bottom.keyboard-active {
    transform: translateY(-262px);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}
.settings-search-bottom {
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

/* Contacts list scroll needs bottom padding for bottom bar */
.contacts-list-scroll {
    padding-bottom: 90px;
}

/* Context menu more rounded */
.ios-context-menu-item {
    border-radius: 0;
}
.ios-context-menu-item:first-child {
    border-radius: 22px 22px 0 0;
}
.ios-context-menu-item:last-child {
    border-radius: 0 0 22px 22px;
}

/* All dropdowns - ultra rounded */
.ios-action-sheet,
.files-sort-menu-ios26,
.simulator-alert,
.nc-form-group {
    border-radius: 28px !important;
}

/* Gospel Library tab bar liquid glass */
.gospel-tab-bar-pill {
    background: transparent !important;
    backdrop-filter: blur(40px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(40px) saturate(180%) !important;
    border: 0.5px solid rgba(255,255,255,0.45) !important;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.3) !important;
}

/* ============================================================
   iOS 26 CAMERA APP — LIQUID GLASS REDESIGN
   ============================================================ */

.cam-glass-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 52px 20px 14px;
    background: transparent;
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border-bottom: 0.5px solid rgba(255,255,255,0.18);
    z-index: 50;
    isolation: isolate;
}

.cam-top-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border: 0.5px solid rgba(255,255,255,0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s var(--spring-bounce);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 2px 8px rgba(0,0,0,0.3);
}
.cam-top-btn:active { transform: scale(0.88); }
.cam-top-btn.cam-btn-active {
    background: rgba(255,204,0,0.7);
    border-color: rgba(255,220,0,0.6);
}

.cam-zoom-bar {
    position: absolute;
    bottom: 200px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 0.5px solid rgba(255,255,255,0.22);
    border-radius: 999px;
    padding: 4px 6px;
    z-index: 40;
}
.cam-zoom-btn {
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    transition: all 0.2s var(--spring-bounce);
}
.cam-zoom-btn.active {
    background: rgba(255,255,255,0.18);
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.3);
}

.cam-record-timer {
    position: absolute;
    top: 110px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 0.5px solid rgba(255,255,255,0.2);
    border-radius: 999px;
    padding: 6px 14px;
    z-index: 60;
    transition: opacity 0.3s;
}
.cam-record-timer.hidden { display: none; }
.cam-record-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff3b30;
    animation: recPulse 1s ease-in-out infinite;
}
@keyframes recPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}
#cam-record-time {
    font-size: 14px;
    font-weight: 600;
    color: white;
    font-variant-numeric: tabular-nums;
}

.cam-mode-strip {
    position: absolute;
    bottom: 148px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 18px;
    z-index: 40;
    padding: 0 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.cam-mode-strip::-webkit-scrollbar { display: none; }
.cam-mode-item {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.55);
    cursor: pointer;
    padding: 4px 0;
    letter-spacing: 0.3px;
    transition: color 0.2s, transform 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}
.cam-mode-item.active {
    color: #ffcc00;
    transform: scale(1.08);
}

.cam-glass-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 148px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px 28px;
    background: transparent;
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border-top: 0.5px solid rgba(255,255,255,0.15);
    z-index: 50;
    isolation: isolate;
}

.cam-thumb {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    border: 2px solid rgba(255,255,255,0.7);
    overflow: hidden;
    cursor: pointer;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
    background-size: cover;
    background-position: center;
    transition: transform 0.15s var(--spring-bounce);
}
.cam-thumb:active { transform: scale(0.92); }

.cam-shutter-wrap {
    position: relative;
    width: 78px;
    height: 78px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cam-shutter-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.9);
    pointer-events: none;
}
.cam-shutter-btn {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: rgba(255,255,255,0.92);
    cursor: pointer;
    transition: transform 0.12s var(--spring-bounce), background 0.3s;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.cam-shutter-btn:active { transform: scale(0.87); }

.cam-flip-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border: 0.5px solid rgba(255,255,255,0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 2px 8px rgba(0,0,0,0.3);
    transition: transform 0.15s var(--spring-bounce);
}
.cam-flip-btn:active { transform: scale(0.88); }

/* ============================================================
   iOS 26 PHOTOS APP — DARK DESIGN
   ============================================================ */

.photos26-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #000;
    color: #fff;
}

.photos26-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 54px 20px 12px;
    flex-shrink: 0;
}
.photos26-header-title {
    font-size: 34px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
}
.photos26-header-right {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}
.photos26-header-right:active { background: rgba(255,255,255,0.22); }

.photos26-tabs {
    display: flex;
    gap: 0;
    padding: 0 20px 14px;
    flex-shrink: 0;
    border-bottom: 0.5px solid rgba(255,255,255,0.1);
}
.photos26-tab {
    flex: 1;
    text-align: center;
    padding: 8px 0;
    font-size: 15px;
    font-weight: 500;
    color: rgba(255,255,255,0.45);
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s;
}
.photos26-tab.active {
    color: #fff;
    background: rgba(255,255,255,0.12);
}

.photos26-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.photos26-content::-webkit-scrollbar { display: none; }

.photos26-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    padding: 2px;
}

.photos26-cell {
    aspect-ratio: 1;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    background: rgba(255,255,255,0.05);
    transition: opacity 0.15s;
}
.photos26-cell:active { opacity: 0.75; }

.photos26-cell-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.photos26-cell-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photos26-video-badge {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0,0,0,0.55);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photos26-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 32px;
    gap: 12px;
    text-align: center;
    height: 100%;
    min-height: 300px;
}
.photos26-empty-title {
    font-size: 20px;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
}
.photos26-empty-sub {
    font-size: 14px;
    color: rgba(255,255,255,0.45);
    line-height: 1.5;
    max-width: 260px;
}
.photos26-action-btn {
    margin-top: 8px;
    padding: 11px 28px;
    background: #007aff;
    color: #fff;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s var(--spring-bounce);
}
.photos26-action-btn:active { transform: scale(0.95); }

/* Full-screen viewer */
.photos26-fullview {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    animation: slideUpFade 0.28s cubic-bezier(0.32,0.72,0,1);
}
@keyframes slideUpFade {
    from { opacity: 0; transform: scale(0.96) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.photos26-fv-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 52px 16px 14px;
    background: rgba(0,0,0,0.5) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border-bottom: 0.5px solid rgba(255,255,255,0.1) !important;
    border-radius: 0 !important;
    z-index: 10;
    flex-shrink: 0;
}
.photos26-fv-back {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #007aff;
    font-size: 17px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background 0.15s;
}
.photos26-fv-back:active { background: rgba(0,122,255,0.15); }
.photos26-fv-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}
.photos26-fv-actions svg { cursor: pointer; opacity: 0.9; }
.photos26-fv-actions svg:active { opacity: 0.5; }

.photos26-fv-media {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}
.photos26-fv-img {
    width: 100%;
    height: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}
.photos26-fv-video {
    max-width: 100%;
    max-height: 100%;
    border-radius: 0;
    background: #000;
}

.photos26-fv-footer {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 14px 16px 36px;
    background: rgba(0,0,0,0.5) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border-top: 0.5px solid rgba(255,255,255,0.1) !important;
    border-radius: 0 !important;
    flex-shrink: 0;
}
.photos26-fv-footer svg { cursor: pointer; opacity: 0.85; transition: opacity 0.15s; }
.photos26-fv-footer svg:active { opacity: 0.4; }

/* ============================================================
   YOUTUBE APP — Apple TV Style with iOS 26 Liquid Glass
   ============================================================ */
.yt-app {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    position: relative;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    color: white;
}

/* Top Bar */
.yt-topbar {
    position: relative;
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 52px 16px 12px;
    background: rgba(10,10,10,0.55);
    backdrop-filter: blur(28px) saturate(180%) brightness(0.95);
    -webkit-backdrop-filter: blur(28px) saturate(180%) brightness(0.95);
    border-bottom: 0.5px solid rgba(255,255,255,0.12);
    box-shadow: inset 0 -1px 0 rgba(255,255,255,0.06);
}
.yt-logo { display: flex; align-items: center; flex-shrink: 0; }
.yt-search-pill {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 7px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 0.5px solid rgba(255,255,255,0.22);
    border-radius: 999px;
    padding: 8px 14px;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 2px 8px rgba(0,0,0,0.25);
    transition: background 0.2s;
}
.yt-search-pill:active { background: rgba(255,255,255,0.16); }
.yt-search-pill span { font-size: 14px; color: rgba(255,255,255,0.55); }
.yt-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, #ff0000, #cc0000);
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; color: white;
    border: 1.5px solid rgba(255,255,255,0.3);
    flex-shrink: 0;
}

/* Search Overlay */
.yt-search-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 400;
    flex-direction: column;
    background: rgba(10,10,10,0.92);
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
}
.yt-search-bar-full {
    display: flex; align-items: center; gap: 10px;
    padding: 54px 16px 12px;
    border-bottom: 0.5px solid rgba(255,255,255,0.12);
}
.yt-search-input {
    flex: 1; background: rgba(255,255,255,0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 0.5px solid rgba(255,255,255,0.22);
    border-radius: 999px;
    padding: 9px 16px; color: white; font-size: 16px; outline: none;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.18);
}
.yt-search-input::placeholder { color: rgba(255,255,255,0.4); }
.yt-search-suggestions { padding: 8px 0; overflow-y: auto; flex: 1; }
.yt-suggestion {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 20px; font-size: 15px; color: rgba(255,255,255,0.8);
    cursor: pointer; transition: background 0.15s;
}
.yt-suggestion:active { background: rgba(255,255,255,0.06); }

/* Scrollable Content Area */
.yt-content {
    flex: 1; overflow-y: auto; overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 20px;
}
.yt-content::-webkit-scrollbar { display: none; }

/* Filter Chips */
.yt-chips {
    display: flex; gap: 8px; padding: 12px 16px 4px;
    overflow-x: auto; scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.yt-chips::-webkit-scrollbar { display: none; }
.yt-chip {
    flex-shrink: 0;
    padding: 6px 14px; border-radius: 999px;
    font-size: 13px; font-weight: 500; cursor: pointer;
    background: rgba(255,255,255,0.1);
    border: 0.5px solid rgba(255,255,255,0.18);
    color: rgba(255,255,255,0.75);
    transition: all 0.2s var(--spring-bounce, cubic-bezier(0.34,1.56,0.64,1));
}
.yt-chip.active {
    background: white; color: #0a0a0a; font-weight: 600;
    border-color: white;
    box-shadow: 0 2px 12px rgba(255,255,255,0.25);
}

/* Hero Featured Video */
.yt-hero {
    margin: 12px 16px 0;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 16/9;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
}
.yt-hero-thumb {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.yt-hero-glass {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: 16px;
}
.yt-hero-badge {
    position: absolute; top: 14px; left: 14px;
    background: rgba(255,0,0,0.85);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 0.5px solid rgba(255,255,255,0.3);
    border-radius: 6px; padding: 3px 8px;
    font-size: 10px; font-weight: 700; letter-spacing: 1px; color: white;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
}
.yt-hero-title { font-size: 17px; font-weight: 700; line-height: 1.2; margin-bottom: 6px; text-shadow: 0 1px 4px rgba(0,0,0,0.6); }
.yt-hero-meta { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.yt-hero-creator { font-size: 13px; color: rgba(255,255,255,0.8); font-weight: 500; }
.yt-hero-views { font-size: 12px; color: rgba(255,255,255,0.55); }
.yt-play-hero {
    display: inline-flex; align-items: center; gap: 7px;
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(14px) saturate(180%); -webkit-backdrop-filter: blur(14px) saturate(180%);
    border: 0.5px solid rgba(255,255,255,0.35);
    border-radius: 999px; padding: 8px 18px;
    font-size: 14px; font-weight: 600;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 2px 12px rgba(0,0,0,0.3);
    transition: background 0.2s;
    cursor: pointer; align-self: flex-start;
}
.yt-hero:active .yt-play-hero { background: rgba(255,255,255,0.28); }

/* Creator Section */
.yt-section { margin-top: 24px; }
.yt-section-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 16px 10px;
}
.yt-creator-info { display: flex; align-items: center; gap: 10px; }
.yt-creator-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid transparent;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    background: rgba(255,255,255,0.12);
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700; color: white;
}
.yt-creator-dot {
    width: 8px; height: 8px; border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 8px currentColor;
}
.yt-shorts-icon {
    width: 28px; height: 28px; border-radius: 8px;
    background: rgba(255,0,0,0.15);
    border: 0.5px solid rgba(255,0,0,0.4);
    display: flex; align-items: center; justify-content: center;
}
.yt-creator-name { font-size: 15px; font-weight: 700; }
.yt-creator-subs { font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 1px; }

/* Subscribe Button */
.yt-sub-btn {
    padding: 7px 15px; border-radius: 999px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(16px) saturate(180%); -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 0.5px solid rgba(255,255,255,0.28);
    color: white; font-size: 13px; font-weight: 600;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), 0 2px 8px rgba(0,0,0,0.2);
    transition: all 0.2s var(--spring-bounce, cubic-bezier(0.34,1.56,0.64,1));
}
.yt-sub-btn:active { transform: scale(0.92); }
.yt-sub-btn.yt-sub-active {
    background: rgba(255,255,255,0.92); color: #0a0a0a;
    border-color: white;
    box-shadow: 0 0 20px rgba(255,255,255,0.3), inset 0 1px 0 rgba(255,255,255,0.8);
}
@keyframes ytSubPop {
    0% { transform: scale(1); }
    40% { transform: scale(1.18); }
    70% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

/* Horizontal Scroll Row */
.yt-row {
    display: flex; gap: 12px;
    padding: 0 16px 4px;
    overflow-x: auto; scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.yt-row::-webkit-scrollbar { display: none; }

/* Video Cards */
.yt-card {
    flex-shrink: 0; width: 200px;
    border-radius: 16px; overflow: hidden;
    background: rgba(255,255,255,0.05);
    border: 0.5px solid rgba(255,255,255,0.1);
    cursor: pointer; scroll-snap-align: start;
    transition: transform 0.2s var(--spring-bounce, cubic-bezier(0.34,1.56,0.64,1));
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.yt-card:active { transform: scale(0.95); }
.yt-card-thumb-wrap {
    position: relative; width: 100%; aspect-ratio: 16/9;
    background: linear-gradient(135deg, #1c1c2e, #16213e);
    overflow: hidden;
}
.yt-card-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt-card-dur {
    position: absolute; bottom: 6px; right: 6px;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    border-radius: 4px; padding: 2px 5px;
    font-size: 10px; font-weight: 600; color: white;
}
.yt-card-play-overlay {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0);
    transition: background 0.2s;
}
.yt-card:active .yt-card-play-overlay { background: rgba(0,0,0,0.35); }
.yt-card-info { padding: 10px 10px 12px; }
.yt-card-title {
    font-size: 13px; font-weight: 600; line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; margin-bottom: 4px;
}
.yt-card-meta { font-size: 11px; color: rgba(255,255,255,0.5); }

/* Shorts Cards */
.yt-short-card {
    flex-shrink: 0; width: 130px;
    cursor: pointer; scroll-snap-align: start;
    transition: transform 0.2s var(--spring-bounce, cubic-bezier(0.34,1.56,0.64,1));
}
.yt-short-card:active { transform: scale(0.94); }
.yt-short-thumb-wrap {
    position: relative; width: 100%; aspect-ratio: 9/16;
    border-radius: 16px; overflow: hidden;
    background: linear-gradient(180deg, #1a1a2e, #16213e);
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    border: 0.5px solid rgba(255,255,255,0.1);
    margin-bottom: 8px;
}
.yt-short-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt-short-play {
    position: absolute; bottom: 10px; right: 10px;
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 0.5px solid rgba(255,255,255,0.35);
    display: flex; align-items: center; justify-content: center;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.3);
}
.yt-short-title { font-size: 12px; font-weight: 600; line-height: 1.3; margin-bottom: 2px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.yt-short-views { font-size: 11px; color: rgba(255,255,255,0.5); }

/* Bottom Tab Bar — floating pill (like Phone/App Store) */
.yt-tabbar-wrap {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 300;
    pointer-events: none;
}
.yt-glass-tabbar {
    display: flex;
    gap: 0;
    border-radius: 40px;
    padding: 6px;
    border: 0.5px solid rgba(255,255,255,0.28);
    box-shadow:
        0 8px 32px rgba(0,0,0,0.45),
        0 2px 8px rgba(0,0,0,0.25),
        inset 0 1px 0 rgba(255,255,255,0.22),
        inset 0 -0.5px 0 rgba(0,0,0,0.15);
    pointer-events: all;
    min-width: 230px;
}
.yt-tab {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    gap: 2px; padding: 9px 18px;
    color: rgba(255,255,255,0.5); font-size: 10px; font-weight: 600;
    cursor: pointer; transition: color 0.2s ease, background 0.2s ease;
    border-radius: 32px;
    white-space: nowrap;
}
.yt-tab.active {
    color: white;
    background: rgba(255,255,255,0.16);
    box-shadow: inset 0 0.5px 0 rgba(255,255,255,0.3);
}
.yt-tab svg { transition: transform 0.2s var(--spring-bounce, cubic-bezier(0.34,1.56,0.64,1)); }
.yt-tab:active svg { transform: scale(0.88); }

/* Light mode tab bar */
.yt-light .yt-glass-tabbar {
    border-color: rgba(0,0,0,0.12);
    box-shadow:
        0 8px 32px rgba(0,0,0,0.12),
        0 2px 8px rgba(0,0,0,0.08),
        inset 0 1px 0 rgba(255,255,255,0.9),
        inset 0 -0.5px 0 rgba(0,0,0,0.08);
}
.yt-light .yt-tab {
    color: rgba(0,0,0,0.4);
}
.yt-light .yt-tab.active {
    color: #0f0f0f;
    background: rgba(0,0,0,0.10);
    box-shadow: inset 0 0.5px 0 rgba(255,255,255,0.6);
}

/* Video Player Modal */
.yt-player-modal {
    position: absolute; inset: 0; z-index: 1000;
    flex-direction: column;
    background: rgba(0,0,0,0.88);
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    opacity: 0; transition: opacity 0.35s ease;
}
.yt-player-modal.yt-modal-visible { opacity: 1; }
.yt-player-inner { display: flex; flex-direction: column; height: 100%; }
.yt-player-header {
    display: flex; align-items: center; gap: 12px;
    padding: 52px 16px 12px;
    border-bottom: 0.5px solid rgba(255,255,255,0.12);
}
.yt-close-btn {
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 0.5px solid rgba(255,255,255,0.25);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
    transition: background 0.2s;
}
.yt-close-btn:active { background: rgba(255,255,255,0.22); transform: scale(0.9); }
.yt-player-label { font-size: 16px; font-weight: 600; }
.yt-iframe-wrap { width: 100%; background: #000; flex-shrink: 0; }
.yt-player-info { flex: 1; overflow-y: auto; padding: 16px; scrollbar-width: none; }
.yt-player-info::-webkit-scrollbar { display: none; }
.yt-player-title { font-size: 17px; font-weight: 700; line-height: 1.3; margin-bottom: 10px; }
.yt-player-creator-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.yt-player-creator { font-size: 14px; color: rgba(255,255,255,0.7); font-weight: 500; }
.yt-sub-inline { font-size: 12px; padding: 6px 14px; }
.yt-player-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.yt-action-pill {
    display: flex; align-items: center; gap: 6px;
    padding: 9px 16px; border-radius: 999px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(16px) saturate(180%); -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 0.5px solid rgba(255,255,255,0.22);
    font-size: 13px; font-weight: 500; cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 2px 8px rgba(0,0,0,0.2);
    transition: background 0.2s;
}
.yt-action-pill:active { background: rgba(255,255,255,0.18); transform: scale(0.95); }

/* Creator mini row inside card */
.yt-creator-row-mini {
    display: flex; align-items: center; margin-bottom: 3px;
}
.yt-card-creator-mini {
    font-size: 11px; color: rgba(255,255,255,0.5); font-weight: 500;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Cancel button in search overlay */
.yt-cancel-btn {
    font-size: 15px; font-weight: 500; cursor: pointer;
    color: rgba(255,255,255,0.7); padding: 4px 8px; white-space: nowrap;
}

/* YouTube Light Mode */
.yt-app.yt-light {
    background: #f2f2f7;
    color: #0f0f0f;
}
.yt-light .yt-topbar {
    background: rgba(242,242,247,0.72);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border-bottom-color: rgba(0,0,0,0.1);
}
.yt-light .yt-search-pill {
    background: rgba(0,0,0,0.07);
    border-color: rgba(0,0,0,0.1);
    box-shadow: none;
}
.yt-light .yt-chip {
    background: rgba(0,0,0,0.07);
    color: rgba(0,0,0,0.75);
    border-color: rgba(0,0,0,0.08);
}
.yt-light .yt-chip.active {
    background: rgba(0,0,0,0.88);
    color: white;
    border-color: transparent;
}
.yt-light .yt-section { background: transparent; }
.yt-light .yt-creator-name { color: #0f0f0f; }
.yt-light .yt-creator-subs { color: rgba(0,0,0,0.45); }
.yt-light .yt-card { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.08); }
.yt-light .yt-card-thumb-wrap { background: rgba(0,0,0,0.08); }
.yt-light .yt-card-title { color: #0f0f0f; }
.yt-light .yt-card-meta { color: rgba(0,0,0,0.45); }
.yt-light .yt-card-creator-mini { color: rgba(0,0,0,0.45); }
.yt-light .yt-short-card { background: rgba(0,0,0,0.04); }
.yt-light .yt-short-thumb-wrap { background: rgba(0,0,0,0.08); }
.yt-light .yt-short-title { color: #0f0f0f; }
.yt-light .yt-short-views { color: rgba(0,0,0,0.45); }
.yt-light .yt-sub-btn { background: rgba(0,0,0,0.08); color: #0f0f0f; border-color: rgba(0,0,0,0.12); }
.yt-light .yt-sub-btn.yt-sub-active { background: #0f0f0f; color: white; }
.yt-light .yt-action-pill { background: rgba(0,0,0,0.07); color: #0f0f0f; border-color: rgba(0,0,0,0.1); }
.yt-light .yt-player-modal { background: rgba(255,255,255,0.92); color: #0f0f0f; }
.yt-light .yt-player-creator { color: rgba(0,0,0,0.55); }
.yt-light .yt-close-btn { background: rgba(0,0,0,0.08); border-color: rgba(0,0,0,0.12); }
.yt-light .yt-player-header { border-bottom-color: rgba(0,0,0,0.1); }
.yt-light .yt-cancel-btn { color: rgba(0,0,0,0.6); }
.yt-light .yt-search-overlay { background: rgba(242,242,247,0.96); }
.yt-light .yt-suggestion { color: #0f0f0f; border-bottom-color: rgba(0,0,0,0.08); }
.yt-light .yt-hero-glass { background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 60%, transparent 100%); }
.yt-light .yt-player-label { color: #0f0f0f; }

/* Settings Appearance Picker */
.settings-appearance-picker {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
}
.settings-appearance-opt {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
}
.settings-appearance-preview {
    width: 100%;
    aspect-ratio: 9/16;
    border-radius: 12px;
    overflow: hidden;
    border: 2.5px solid transparent;
    transition: border-color 0.2s ease;
    position: relative;
}
.settings-appearance-opt.active .settings-appearance-preview {
    border-color: var(--ios-blue);
}
.settings-appearance-light {
    background: #f2f2f7;
}
.settings-appearance-dark {
    background: #1c1c1e;
}
.settings-appearance-auto {
    background: linear-gradient(135deg, #f2f2f7 50%, #1c1c1e 50%);
}
.sap-statusbar {
    height: 18%;
    background: rgba(0,0,0,0.06);
}
.settings-appearance-dark .sap-statusbar { background: rgba(255,255,255,0.06); }
.sap-content {
    margin: 8px 6px;
    height: 30%;
    border-radius: 4px;
    background: rgba(0,0,0,0.09);
}
.settings-appearance-dark .sap-content { background: rgba(255,255,255,0.09); }

/* Global light mode for system UI */
[data-theme="light"] .app-screen {
    background: rgba(255,255,255,0.15);
}
[data-theme="light"] #status-bar {
    color: #000;
}
[data-theme="light"] #status-bar .status-icons { filter: invert(1); }
[data-theme="light"] .home-bar { background: rgba(0,0,0,0.4); }
