/* ============================================================
   ravsil os — mobile view stylesheet (android 14 material you)
   ============================================================ */

/* ===========================
   1. mobile mode container
   =========================== */

#mobile-mode {
    display: none;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    width: 100vw;
    background:
        radial-gradient(ellipse at 20% 40%, rgba(167, 139, 250, 0.45) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 25%, rgba(96, 165, 250, 0.35) 0%, transparent 50%),
        radial-gradient(ellipse at 55% 85%, rgba(244, 114, 182, 0.3) 0%, transparent 45%),
        radial-gradient(ellipse at 40% 60%, rgba(52, 211, 153, 0.15) 0%, transparent 35%),
        linear-gradient(160deg, #1e1b4b 0%, #312e81 45%, #1e1b4b 100%);
    font-family: 'Roboto', system-ui, sans-serif;
    position: relative;
}

/* ===========================
   2. status bar
   =========================== */

#status-bar {
    height: var(--md-status-h, 1.75rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    padding: 0 1rem;
    z-index: 500;
    transition: background 200ms ease;
}

#status-time {
    font-size: 0.75rem;
    font-weight: 500;
    color: #fff;
    letter-spacing: 0.01875rem;
}

.status-icons {
    display: flex;
    align-items: center;
    gap: 0.3125rem;
}

.status-icons svg {
    width: 0.875rem;
    height: 0.875rem;
    color: #fff;
}

/* ===========================
   3. home screen
   =========================== */

#home-screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0.25rem 1.25rem 0;
    overflow: hidden;
}

/* search widget */
#search-widget {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.625rem 1.125rem;
    margin: 0.625rem 0 1.375rem;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(1.25rem);
    -webkit-backdrop-filter: blur(1.25rem);
    border-radius: var(--md-r, 1.5rem);
    cursor: default;
    transition: background 200ms;
}

#search-widget:active {
    background: rgba(255, 255, 255, 0.18);
}

.g-logo {
    width: 1.375rem;
    height: 1.375rem;
    flex-shrink: 0;
}

#search-widget .search-text {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.5);
    flex: 1;
}

#search-widget .search-mic {
    width: 1.25rem;
    height: 1.25rem;
    color: rgba(255, 255, 255, 0.6);
}

/* app grid */
#app-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem 0.5rem;
    align-content: start;
    flex: 1;
    overflow-y: auto;
    padding-bottom: 0.5rem;
}

#app-grid::-webkit-scrollbar {
    display: none;
}

.mobile-app {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4375rem;
    cursor: default;
    -webkit-tap-highlight-color: transparent;
}

.mobile-app:active .app-icon-wrap {
    transform: scale(0.85);
}

.app-icon-wrap {
    width: 3.375rem;
    height: 3.375rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(1rem);
    -webkit-backdrop-filter: blur(1rem);
    border: 0.0625rem solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 0.25rem 0.875rem rgba(0, 0, 0, 0.35);
    transition: transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1), background 200ms;
}

.app-icon-wrap svg {
    width: 2.25rem;
    height: 2.25rem;
}

.mobile-app .app-name {
    font-size: 0.6875rem;
    color: #fff;
    text-shadow: 0 0.0625rem 0.25rem rgba(0, 0, 0, 0.6);
    text-align: center;
    max-width: 4.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
}

/* ===========================
   4. dock
   =========================== */

#dock {
    display: flex;
    justify-content: center;
    gap: 0.875rem;
    padding: 0.625rem 1.25rem;
    margin: 0 1.25rem 0.375rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(1.5rem);
    -webkit-backdrop-filter: blur(1.5rem);
    border-radius: var(--md-r, 1.5rem);
}

.dock-app {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(1rem);
    -webkit-backdrop-filter: blur(1rem);
    border: 0.0625rem solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 0.25rem 0.875rem rgba(0, 0, 0, 0.35);
    -webkit-tap-highlight-color: transparent;
    transition: transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dock-app:active {
    transform: scale(0.85);
}

.dock-app svg {
    width: 2.125rem;
    height: 2.125rem;
}

/* ===========================
   6. navigation bar
   =========================== */

#nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: transparent;
    padding: 0.375rem 2rem 0rem;
    transition: background 200ms ease;
}

/* black background when mobile app is open */
#mobile-mode.app-open #status-bar,
#mobile-mode.app-open #nav-bar,
#mobile-mode:has(#mobile-app-screen.open) #status-bar,
#mobile-mode:has(#mobile-app-screen.open) #nav-bar {
    background: #000;
}

.nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.25rem;
    color: rgba(255, 255, 255, 0.85);
    background: transparent;
    border: none;
    border-radius: 0.5rem;
    cursor: default;
    -webkit-tap-highlight-color: transparent;
    transition: background 150ms, transform 150ms;
}

.nav-btn:active {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(0.88);
}

.nav-btn svg {
    width: 1.125rem;
    height: 1.125rem;
}

/* ===========================
   7. mobile app screen overlay
   =========================== */

#mobile-app-screen {
    position: absolute;
    top: var(--md-status-h, 1.75rem);
    left: 0;
    right: 0;
    bottom: 2.25rem;
    background: #141419;
    z-index: 80;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 280ms cubic-bezier(0, 0, 0.2, 1), opacity 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-app-screen.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.mobile-app-header {
    height: 3.25rem;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.mobile-back-btn {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #fff;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 150ms;
}

.mobile-back-btn:active {
    background: rgba(255, 255, 255, 0.2);
}

.mobile-back-btn svg {
    width: 1.25rem;
    height: 1.25rem;
}

.mobile-app-title {
    font-size: 1.0625rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-app-body {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* ===========================
   8. mobile welcome popup modal
   =========================== */

#mobile-welcome-modal {
    position: absolute;
    inset: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    opacity: 1;
    transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-welcome-modal.hidden {
    display: none !important;
}

.mwm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(0.5rem);
    -webkit-backdrop-filter: blur(0.5rem);
}

.mwm-card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 22.5rem;
    max-height: 75vh;
    display: flex;
    flex-direction: column;
    background: rgba(28, 28, 38, 0.88);
    backdrop-filter: blur(1.5rem);
    -webkit-backdrop-filter: blur(1.5rem);
    border: 0.0625rem solid rgba(255, 255, 255, 0.18);
    border-radius: 1.5rem;
    box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.5);
    overflow: hidden;
    animation: mwmPop 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes mwmPop {
    from {
        opacity: 0;
        transform: scale(0.88);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.mwm-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.08);
}

.mwm-icon {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mwm-icon svg {
    width: 1.75rem;
    height: 1.75rem;
}

.mwm-title {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
}

.mwm-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
    color: #e2e8f0;
}

.mwm-footer {
    display: flex;
    justify-content: flex-end;
    padding: 0.875rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border-top: 0.0625rem solid rgba(255, 255, 255, 0.08);
}

.mwm-ok-btn {
    padding: 0.625rem 1.75rem;
    background: #3a7bd5;
    color: #ffffff;
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    border-radius: 1.25rem;
    cursor: pointer;
    box-shadow: 0 0.25rem 0.75rem rgba(58, 123, 213, 0.4);
    transition: transform 150ms cubic-bezier(0.34, 1.56, 0.64, 1), background 150ms;
}

.mwm-ok-btn:active {
    transform: scale(0.92);
    background: #2b6cb0;
}

/* ===========================
   9. responsive breakpoint
   =========================== */

@media (max-width: 47.9375rem) {
    #mobile-mode {
        display: flex !important;
    }
}

@media (min-width: 48rem) {
    #mobile-mode {
        display: none !important;
    }
}