body {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #000;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

:root {
    --accent-color: #007AFF;
}

/* Phone Hardware Frame */
.phone-frame {
    width: 100%;
    height: 100vh;
    background-color: black;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    position: relative;
    box-sizing: border-box;
}

/* Screen Area */
.screen {
    width: 100%;
    height: 100%;
    background-color: #333;
    /* Default Wallpaper */
    background-image: url('https://images.unsplash.com/photo-1493246507139-91e8fad9978e?ixlib=rb-4.0.3&auto=format&fit=crop&w=1000&q=80');
    background-size: cover;
    background-position: center;
    border-radius: 0;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    user-select: none; /* Prevent text selection during hold */
    transition: background-image 0.3s ease;
}

/* Top Notch/Status Bar */
.status-bar {
    height: 30px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    box-sizing: border-box;
    color: white;
    font-size: 12px;
    font-weight: 600;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), transparent);
    z-index: 2;
}

.notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 25px;
    background-color: #1a1a1a;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    z-index: 3;
}

/* Widgets */
.widgets {
    padding: 40px 20px 10px;
    color: white;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.clock-large {
    font-size: 48px;
    font-weight: 200;
    margin: 0;
}
.date-small {
    font-size: 16px;
    margin-top: 5px;
}

/* App Grid */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 15px 10px;
    padding: 20px;
    margin-bottom: auto;
}
/* Recent grid expands to fill row */
.app-grid.recent-grid {
    grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
}

/* Hide scrollbar for home grid but allow scrolling */
#homeAppsGrid::-webkit-scrollbar {
    display: none;
}

/* Dock */
.dock {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    margin: 15px 15px 65px 15px;
    border-radius: 25px;
    display: flex;
    justify-content: space-around;
    padding: 15px 10px;
}

/* App Icons */
.app-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    font-size: 11px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    cursor: pointer;
    transition: transform 0.1s;
    text-align: center;
}
.app-item:active {
    transform: scale(0.9);
}
.icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    margin-bottom: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}
.icon-box svg {
    width: 28px;
    height: 28px;
    fill: white;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}
.app-section-title {
    grid-column: 1 / -1;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    margin-top: 15px;
    margin-bottom: 0;
    padding: 0 20px;
}

/* Specific Colors */
.bg-blue { background: var(--accent-color); }
.bg-green { background: #34C759; }
.bg-grey { background: #8E8E93; }
.bg-orange { background: #FF9500; }
.bg-red { background: #FF3B30; }
.bg-purple { background: #AF52DE; }
.bg-cyan { background: #32ADE6; }

.bg-yellow { background: #FFCC00; }
/* Lock Screen */
.lock-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* This creates a blurred overlay of the wallpaper and home screen icons behind it */
    background-color: rgba(0, 0, 0, 0.2); 
    backdrop-filter: blur(25px) brightness(0.8);
    -webkit-backdrop-filter: blur(25px) brightness(0.8);
    z-index: 5;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    transition: transform 0.4s ease-out;
    border-radius: 0; /* Match screen radius */
    cursor: grab;
    will-change: transform, opacity;
}
.lock-screen.unlocked {
    transform: translateY(-100%);
    pointer-events: none;
}
.lock-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-bottom: 100px; /* Push clock up a bit */
}
.swipe-hint {
    text-align: center;
    padding-bottom: 20px;
    font-weight: 500;
    font-size: 14px;
    animation: bounce 2s infinite ease-in-out;
}
.home-bar {
    width: 120px;
    height: 4px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 2px;
    margin: 0 auto 10px;
}
@keyframes bounce {
    0%, 20%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); }
}

/* Notification Panel */
.notification-panel {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 20; /* Above home, will sit below lock screen visually until unlocked */
    transform: translateY(-100%);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    color: white;
    display: flex;
    flex-direction: column;
    padding: 40px 20px 20px;
    box-sizing: border-box;
    border-radius: 0;
}
.notification-panel.active {
    transform: translateY(0);
}
.quick-toggles {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 10px 5px;
}
.toggle-btn {
    width: 50px; height: 50px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    cursor: pointer;
    transition: background 0.2s;
}
.toggle-btn.active { background: var(--accent-color); color: white; }
.notif-card {
    background: rgba(255,255,255,0.15);
    padding: 15px;
    border-radius: 18px;
    margin-bottom: 12px;
}

/* App Screens (Generic) */
.app-screen {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: white;
    z-index: 15; /* Below notification, above home */
    display: flex;
    flex-direction: column;
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s;
    border-radius: 0;
    overflow: hidden;
    padding-bottom: 60px; /* Space for Navigation Bar */
    box-sizing: border-box;
}
.app-screen.active {
    transform: scale(1);
    opacity: 1;
    pointer-events: auto;
}
.app-header {
    padding-top: 45px; /* clear status bar */
    padding-bottom: 15px;
    text-align: center;
    font-weight: bold;
    font-size: 18px;
    background: #f9f9f9;
    border-bottom: 1px solid #ddd;
}

/* Dialer Styles */
.dialer-display {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding-bottom: 20px;
    font-size: 32px;
    font-weight: 500;
    color: #333;
}
.keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 0 40px 40px;
    justify-items: center;
}
.key {
    width: 65px; height: 65px;
    background: #e5e5ea;
    border-radius: 50%;
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    font-size: 24px;
    cursor: pointer;
    transition: background 0.2s;
    user-select: none;
}
.key:active { background: #d1d1d6; }
.key span { font-size: 10px; font-weight: bold; color: #888; margin-top: -2px;}
.call-btn {
    background: #34C759; color: white;
    width: 65px; height: 65px;
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    font-size: 28px; cursor: pointer;
    box-shadow: 0 4px 10px rgba(52, 199, 89, 0.4);
}

/* Message Styles */
.msg-form { padding: 20px; display: flex; flex-direction: column; gap: 15px; }
.msg-input {
    padding: 12px; border: 1px solid #ddd; border-radius: 12px;
    font-size: 16px; outline: none; background: #f2f2f7;
}
.msg-input:focus { background: #fff; border-color: var(--accent-color); }
.send-btn { background: var(--accent-color); color: white; border: none; padding: 12px; border-radius: 12px; font-weight: bold; font-size: 16px; cursor: pointer; }

/* Camera Styles */
.camera-controls {
    position: absolute; bottom: 80px; width: 100%;
    display: flex; justify-content: center; align-items: center;
    z-index: 2;
}
.shutter-btn {
    width: 60px; height: 60px; border-radius: 50%; border: 4px solid white;
    background: rgba(255,255,255,0.2); cursor: pointer; transition: transform 0.1s;
}
.shutter-btn:active { transform: scale(0.9); background: white; }
.camera-flash {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: white;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease-out;
}
.camera-flash.flash {
    opacity: 1;
    transition: opacity 0.05s ease-in;
}

/* Calculator Styles */
#calculatorApp { background: black; color: white; }
.calc-display {
    flex-grow: 1; display: flex; justify-content: flex-end; align-items: flex-end;
    padding: 20px; font-size: 64px; font-weight: 300; margin-bottom: 10px;
}
.calc-keypad {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
    padding: 15px 15px 5px 15px;
}
.calc-btn {
    width: 60px; height: 60px; border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    font-size: 24px; cursor: pointer; user-select: none;
    transition: filter 0.2s;
}
.calc-btn:active { filter: brightness(1.3); }
.calc-btn.gray { background: #a5a5a5; color: black; }
.calc-btn.orange { background: #ff9f0a; color: white; }
.calc-btn.dark { background: #333333; color: white; }
.calc-btn.zero { grid-column: span 2; width: 100%; border-radius: 35px; justify-content: flex-start; padding-left: 25px; box-sizing: border-box;}

/* Browser Styles */
.browser-bar {
    padding-top: 45px; padding-bottom: 8px; padding-left: 8px; padding-right: 8px;
    background: #f2f2f7; display: flex; gap: 6px; border-bottom: 1px solid #c6c6c8;
    align-items: center;
}
.browser-url-input {
    flex-grow: 1; padding: 0 10px; border-radius: 8px; border: 1px solid #ccc; outline: none; font-size: 13px; height: 30px;
}
.browser-go {
    background: var(--accent-color); color: white; border: none; padding: 0 12px; border-radius: 8px; font-weight: 600; font-size: 13px; cursor: pointer;
    height: 30px; display: flex; align-items: center; justify-content: center;
}

/* Notepad Styles */
.notepad-textarea {
    flex-grow: 1;
    width: 100%;
    border: none;
    outline: none;
    padding: 15px;
    font-size: 16px;
    font-family: inherit;
    resize: none;
    box-sizing: border-box;
}
/* Clock App Styles */
.btn-round {
    width: 72px; height: 72px; border-radius: 50%; border: none;
    font-size: 16px; font-weight: 500; cursor: pointer; color: white;
    display: flex; justify-content: center; align-items: center;
}
.bg-dark-grey { background: #333; }

/* Gallery Styles */
.gallery-grid {
    flex-grow: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    padding: 2px;
    overflow-y: auto;
}
.gallery-item {
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    position: relative;
    background: #eee;
    overflow: hidden;
}
.gallery-item img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    cursor: pointer;
}
.no-photos-message {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #888;
    text-align: center;
}
.no-photos-message .icon { font-size: 48px; margin-bottom: 10px; }

/* Gallery Viewer */
.gallery-viewer {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: black; z-index: 20;
    display: none; flex-direction: column;
    padding-bottom: 50px; box-sizing: border-box;
}
.gallery-viewer.active { display: flex; }
.gallery-viewer img {
    flex-grow: 1; width: 100%; height: calc(100% - 100px); object-fit: contain;
}
.gallery-toolbar {
    height: 80px; display: flex; justify-content: space-around; align-items: center; padding-bottom: 20px;
    background: rgba(20,20,20,0.95); color: white; box-sizing: border-box;
}
.gallery-top-nav {
    position: absolute; top: 0; left: 0; width: 100%; padding: 40px 20px 10px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent); color: white; font-size: 24px; cursor: pointer;
}
.gallery-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    color: rgba(255,255,255,0.7); font-size: 40px; padding: 10px;
    cursor: pointer; user-select: none; z-index: 25;
}
.gallery-nav.left { left: 5px; }
.gallery-nav.right { right: 5px; }

/* Snake Game Styles */
#snakeBoard { background: #222; border: 2px solid #444; margin: 10px auto; display: block; image-rendering: pixelated; box-shadow: 0 4px 10px rgba(0,0,0,0.5); }
.snake-controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 180px; margin: 0 auto; }
.snake-btn { background: #333; color: white; border: 1px solid #555; padding: 10px; border-radius: 12px; font-size: 20px; cursor: pointer; display: flex; justify-content: center; align-items: center; height: 50px; user-select: none; }
.snake-btn:active { background: #555; transform: scale(0.95); }
.snake-btn.hidden { opacity: 0; pointer-events: none; }

/* Music Player Styles */
#musicApp { background: linear-gradient(to bottom, #200122, #6f0000); color: white; }
.music-cover {
    width: 130px; height: 130px; background: rgba(255,255,255,0.1);
    border-radius: 20px; margin: 45px auto 15px;
    flex-shrink: 0;
    display: flex; justify-content: center; align-items: center;
    font-size: 60px; box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    animation: pulse-cover 2s infinite; animation-play-state: paused;
}
.music-cover.playing { animation-play-state: running; }
@keyframes pulse-cover {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}
.music-info { text-align: center; margin-bottom: 15px; padding: 0 20px; flex-shrink: 0; }
.music-title { font-size: 20px; font-weight: bold; margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-artist { font-size: 14px; opacity: 0.7; }
.music-controls {
    display: flex; justify-content: space-evenly; align-items: center; width: 100%;
    margin-bottom: 10px; flex-shrink: 0;
}
.control-btn {
    background: none; border: none; color: white; cursor: pointer;
    font-size: 24px; display: flex; align-items: center; justify-content: center;
    width: 50px; height: 50px; border-radius: 50%; transition: background 0.2s;
}
.control-btn:active { background: rgba(255,255,255,0.1); }
.play-btn {
    width: 70px; height: 70px; background: white; color: #6f0000;
    font-size: 28px; box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.progress-container { width: 80%; margin: 0 auto 10px; cursor: pointer; padding: 10px 0; }
.progress-bar {
    width: 100%; height: 4px; background: rgba(255,255,255,0.3);
    border-radius: 2px; position: relative; overflow: hidden;
}
.progress-fill {
    height: 100%; background: white; width: 0%;
}
.time-display {
    display: flex; justify-content: space-between; width: 80%; margin: 0 auto;
    font-size: 10px; opacity: 0.6; font-family: monospace;
}
/* Music Playlist Overlay */
.music-playlist {
    position: relative; top: auto; left: auto; width: 100%; bottom: auto;
    background: rgba(0,0,0,0.2);
    overflow-y: auto; display: block; padding: 0; box-sizing: border-box;
    backdrop-filter: none;
    flex-grow: 1; border-top: 1px solid rgba(255,255,255,0.1);
    min-height: 0;
}
.playlist-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px; border-bottom: 1px solid rgba(255,255,255,0.1);
    cursor: pointer; font-size: 14px;
}
.playlist-item.active { color: #AF52DE; font-weight: bold; background: rgba(255,255,255,0.05); }
.playlist-btn-del {
    background: none; border: none; color: #FF3B30; font-size: 16px; cursor: pointer; padding: 5px 10px;
}
.app-drawer-search {
    margin: 10px 20px 5px;
    padding: 10px 15px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    color: white;
    font-size: 14px;
    outline: none;
}
.app-drawer-search::placeholder { color: rgba(255,255,255,0.6); }
.control-btn.active { color: var(--accent-color); text-shadow: 0 0 10px var(--accent-color); }

/* Settings App Styles */
.settings-list {
    padding: 20px 20px 40px; display: flex; flex-direction: column; gap: 20px;
}
.settings-list::-webkit-scrollbar {
    display: none;
}
.settings-section {
    border-radius: 12px; overflow: hidden; flex-shrink: 0;
}
.settings-row {
    padding: 15px; background: white; border-bottom: 1px solid #e5e5ea;
    display: flex; justify-content: space-between; align-items: center;
    font-size: 16px; color: #333;
}
.settings-row:last-child { border-bottom: none; }

/* Toggle Switch */
.switch { position: relative; display: inline-block; width: 50px; height: 30px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background-color: #e9e9ea; transition: .4s; border-radius: 34px;
}
.slider:before {
    position: absolute; content: ""; height: 26px; width: 26px; left: 2px; bottom: 2px;
    background-color: white; transition: .4s; border-radius: 50%; box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
input:checked + .slider { background-color: #34C759; }
input:checked + .slider:before { transform: translateX(20px); }

/* Dark Mode Theme Overrides */
body.dark .app-screen { background-color: #1c1c1e; color: white; }
body.dark .app-header, body.dark .browser-bar { background-color: #2c2c2e; color: white; border-bottom-color: #3a3a3c; }
body.dark .app-screen .status-bar { background: #2c2c2e !important; color: white !important; }
body.dark .settings-row { background-color: #2c2c2e; color: white; border-bottom-color: #38383a; }
body.dark .key { background-color: #333; color: white; }
body.dark .msg-input, body.dark .browser-url-input { background-color: #1c1c1e; color: white; border-color: #3a3a3c; }
body.dark .dialer-display { color: white; }
body.dark .notepad-textarea { background-color: #1c1c1e; color: white; }
body.dark .gallery-grid { background-color: #1c1c1e; }
body.dark .gallery-item { background-color: #2c2c2e; }
body.dark .no-photos-message { color: #666; }

/* Settings Modal */
.modal {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 150;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}
.modal.active {
    opacity: 1;
    pointer-events: auto;
}
.modal-content {
    background: white;
    width: 80%;
    padding: 20px;
    border-radius: 20px;
    text-align: center;
}
.modal-content h3 { margin-top: 0; color: #333; }
.modal-content input {
    width: 100%;
    margin-bottom: 10px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box;
}
.btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    margin: 5px;
    font-weight: bold;
}
.btn-primary { background: var(--accent-color); color: white; }
.btn-cancel { background: #e5e5ea; color: #333; }

/* Context Menu */
.context-menu {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    width: 180px;
    z-index: 100;
    display: none;
    flex-direction: column;
    overflow: hidden;
    transform-origin: top left;
    animation: scaleIn 0.2s ease-out;
}
.context-menu.active { display: flex; }
.context-menu-item {
    padding: 12px 15px;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    cursor: pointer;
    display: flex; justify-content: space-between; align-items: center;
}
.context-menu-item:last-child { border-bottom: none; }
.context-menu-item:active { background: rgba(0,0,0,0.05); }
.context-menu-item.danger { color: #FF3B30; }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }
body.dark .context-menu { background: rgba(40, 40, 40, 0.95); }
body.dark .context-menu-item { color: white; border-bottom-color: rgba(255,255,255,0.1); }
body.dark .context-menu-item.danger { color: #FF453A; }

/* Navigation Bar */
.nav-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
    backdrop-filter: blur(5px);
}
.nav-btn {
    background: none;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
}
.nav-btn svg {
    width: 26px;
    height: 26px;
    fill: rgba(255,255,255,0.7);
    transition: fill 0.2s;
}
.nav-btn:active svg {
    fill: white;
}

/* Hide Nav Bar when Lock Screen is active */
#lockScreen:not(.unlocked) ~ .nav-bar {
    display: none;
}

/* --- New Features CSS --- */

/* PIN Pad */
.pin-pad-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85); backdrop-filter: blur(20px);
    z-index: 10; display: flex; flex-direction: column; justify-content: center; align-items: center;
    transform: translateY(100%); transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.pin-pad-overlay.active { transform: translateY(0); }
.pin-dots { display: flex; gap: 20px; margin-bottom: 40px; }
.pin-dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid white; transition: background 0.2s; }
.pin-dot.filled { background: white; }
.pin-key { width: 70px; height: 70px; border-radius: 50%; background: rgba(255,255,255,0.1); display: flex; justify-content: center; align-items: center; font-size: 24px; color: white; cursor: pointer; transition: background 0.2s; }
.pin-key:active { background: rgba(255,255,255,0.3); }

/* Weather App */
#weatherApp { background: linear-gradient(to bottom, #4facfe, #00f2fe); color: white; }
.weather-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.weather-icon { font-size: 80px; margin-bottom: 10px; }
.weather-temp { font-size: 72px; font-weight: 200; }
.weather-cond { font-size: 24px; opacity: 0.9; }
.weather-list { background: rgba(255,255,255,0.2); backdrop-filter: blur(10px); padding: 20px; border-radius: 20px 20px 0 0; }
.weather-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.1); }

/* Calendar App */
#calendarApp { background: white; }
.cal-header { padding: 20px; text-align: center; font-size: 24px; font-weight: bold; color: #333; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; padding: 15px; }
.cal-day-name { text-align: center; font-weight: bold; color: #888; font-size: 12px; margin-bottom: 10px; }
.cal-day { height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%; cursor: pointer; font-size: 14px; color: #333; }
.cal-day.today { background: var(--accent-color); color: white; font-weight: bold; }

/* Flashlight Overlay */
#flashlightOverlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: white; z-index: 100; pointer-events: none; opacity: 0; transition: opacity 0.2s; }
#flashlightOverlay.active { opacity: 1; pointer-events: auto; }

/* Recent Apps */
#recentApps { background: rgba(0,0,0,0.4); backdrop-filter: blur(10px); z-index: 25; display: none; padding: 20px; flex-direction: column; gap: 15px; overflow-y: auto; }
#recentApps.active { display: flex; }
.recent-card { background: white; height: 120px; border-radius: 15px; padding: 15px; display: flex; flex-direction: column; position: relative; box-shadow: 0 5px 15px rgba(0,0,0,0.2); animation: scaleIn 0.2s; }
.recent-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-weight: bold; color: #333; font-size: 14px; }
.recent-preview { flex: 1; background: #f2f2f7; border-radius: 8px; }
.recent-close { position: absolute; top: 10px; right: 10px; background: #e5e5ea; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; cursor: pointer; color: #666; }
body.dark .recent-card { background: #2c2c2e; }
body.dark .recent-header { color: white; }
body.dark .recent-preview { background: #1c1c1e; }