.desktop-layout {
    display: block;
}

.mobile-layout {
    display: none;
}

@media (max-width: 768px) {
    .desktop-layout {
        display: none;
    }

    .mobile-layout {
        display: block;
    }
}

/* ==================== MOBILE PHONE ==================== */

.mobile-layout {
    width: 100%;
    height: 100vh;
    background: #000;
}

.mobile-phone {
    width: 100%;
    height: 100vh;
    background: #000;
    position: relative;
    overflow: hidden;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    touch-action: manipulation;
}

/* ==================== STATUS BAR ==================== */

.mobile-status-bar {
    height: 44px;
    background: linear-gradient(to bottom,
        rgba(40,40,40,0.45) 0%,
        rgba(20,20,20,0.35) 50%,
        rgba(10,10,10,0.25) 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px;
    color: white;
    font-size: 13px;
    font-weight: 600;
    position: relative;
    z-index: 1000;
    backdrop-filter: blur(25px) saturate(150%);
    -webkit-backdrop-filter: blur(25px) saturate(150%);
    box-shadow: 0 1px 0 rgba(255,255,255,0.15) inset, 0 2px 8px rgba(0,0,0,0.6);
    border-bottom: 1px solid rgba(0,0,0,0.5);
}

.mobile-status-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0) 100%);
}

.mobile-status-left {
    display: flex;
    gap: 6px;
    align-items: center;
    flex: 1;
}

.mobile-status-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    font-size: 14px;
    font-weight: 700;
}

.mobile-status-right {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
}

/* ==================== BATTERY ==================== */

.battery-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
}

.battery-icon {
    width: 24px;
    height: 11px;
    border: 1.5px solid rgba(255,255,255,0.8);
    border-radius: 2px;
    position: relative;
    display: flex;
    align-items: center;
    padding: 1px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.1), rgba(0,0,0,0.2));
    box-shadow: 0 1px 2px rgba(0,0,0,0.5), 0 1px 0 rgba(255,255,255,0.2) inset;
}

.battery-icon::after {
    content: '';
    position: absolute;
    right: -4px;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 5px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.9), rgba(200,200,200,1));
    border-radius: 0 1px 1px 0;
}

.battery-fill {
    height: 100%;
    background: linear-gradient(to bottom, rgba(255,255,255,1) 0%, rgba(230,230,230,1) 50%, rgba(200,200,200,1) 100%);
    border-radius: 1px;
    transition: width 0.3s;
    position: relative;
}

/* ==================== WALLPAPER & VIDEO ==================== */

.mobile-video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    z-index: 0;
}

.mobile-wallpaper {
    position: absolute;
    top: 44px;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 110px;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.mobile-time-widget {
    display: none;
}

/* ==================== APP GRID ==================== */

.mobile-apps-container {
    padding: 30px 15px 0;
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

.mobile-app-page {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    justify-items: center;
    align-items: center;
    width: 100%;
}

.mobile-app {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    padding: 15px 5px;
    width: 100%;
}

.mobile-app-icon {
    width: 62px;
    height: 62px;
    border-radius: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset,
                0 -1px 0 rgba(0,0,0,0.3) inset,
                0 6px 12px rgba(0,0,0,0.6),
                0 2px 4px rgba(0,0,0,0.4);
    position: relative;
    overflow: hidden;
    transition: transform 0.1s;
    border: 1px solid rgba(0,0,0,0.4);
}

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

.mobile-app-icon::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    height: 60%;
    background: linear-gradient(to bottom,
        rgba(255,255,255,0.8) 0%,
        rgba(255,255,255,0.4) 40%,
        rgba(255,255,255,0) 100%);
    border-radius: 14px 14px 60% 60%;
    pointer-events: none;
}

.mobile-app-label {
    color: white;
    font-size: 11px;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

/* Image-based app icons */
.mobile-app-icon-img {
    background: none !important;
    box-shadow: none !important;
    border: none !important;
}

.mobile-app-icon-img::before {
    display: none !important;
}

.mobile-app-icon-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* App-specific icon colors */
.app-media    { background: linear-gradient(135deg, #ff6b6b, #ee5a6f) !important; }
.app-music    { background: linear-gradient(135deg, #f093fb, #f5576c) !important; }
.app-photos   { background: linear-gradient(135deg, #4facfe, #00f2fe) !important; }
.app-mail     { background: linear-gradient(135deg, #43e97b, #38f9d7) !important; }
.app-notes    { background: linear-gradient(135deg, #ffeaa7, #fdcb6e) !important; }
.app-finder   { background: linear-gradient(135deg, #a8edea, #fed6e3) !important; }
.app-settings { background: linear-gradient(135deg, #d299c2, #fef9d7) !important; }
.app-about    { background: linear-gradient(135deg, #30cfd0, #330867) !important; }

/* ==================== MOBILE DOCK ==================== */

.mobile-dock-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.4));
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    z-index: 10000;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.mobile-dock-container.hidden {
    opacity: 0;
    transform: translateY(100px);
    pointer-events: none;
}

.mobile-dock {
    background: linear-gradient(to bottom,
        rgba(255,255,255,0.55) 0%,
        rgba(255,255,255,0.25) 100%);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-radius: 24px;
    padding: 10px 15px;
    display: flex;
    gap: 0;
    justify-content: space-evenly;
    box-shadow: 0 12px 32px rgba(0,0,0,0.5), 0 2px 0 rgba(255,255,255,0.7) inset;
    pointer-events: all;
    width: 90%;
    max-width: 500px;
    border: 2px solid rgba(255,255,255,0.6);
    position: relative;
}

/* ==================== HOME BUTTON ==================== */

.mobile-home-button {
    position: fixed;
    bottom: 110px;
    right: 15px;
    width: 58px;
    height: 58px;
    background: linear-gradient(to bottom, #ffffff 0%, #e0e0e0 60%, #c8c8c8 100%);
    border: 3px solid #777;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10002;
    box-shadow: 0 8px 20px rgba(0,0,0,0.6), 0 2px 0 rgba(255,255,255,1) inset;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: bottom 0.3s ease;
}

.mobile-home-button::before {
    content: '';
    width: 32px;
    height: 32px;
    border: 2px solid rgba(0,0,0,0.2);
    border-radius: 6px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.2) 0%, rgba(0,0,0,0.05) 100%);
}

.mobile-home-button::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    height: 50%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0) 100%);
    border-radius: 50%;
    pointer-events: none;
}

.mobile-home-button.moved-down {
    bottom: 15px;
}

.mobile-home-button:active {
    background: linear-gradient(to bottom, #e8e8e8 0%, #b0b0b0 100%);
}

/* ==================== APP MODALS ==================== */

.mobile-app-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100vh;
    background: #000;
    z-index: 2000;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.mobile-app-modal.active {
    display: flex;
}

.mobile-modal-header {
    height: 44px;
    background: linear-gradient(to bottom, #f7f7f7, #e0e0e0);
    border-bottom: 1px solid #999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.mobile-modal-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.mobile-modal-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    background: #fff;
    position: relative;
    -webkit-overflow-scrolling: touch;
}
