* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f0f0f0;
    overflow: hidden;
}

.device-container {
    position: relative;
    perspective: 1000px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    background-color: #f0f0f0;
}

.device {
    position: relative;
    width: 375px;
    height: 812px;
    background-color: #000;
    border-radius: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transform-style: preserve-3d;
    transition: transform 0.5s;
}

.device:hover {
    transform: rotateY(5deg) rotateX(2deg);
}

.device-header {
    height: 40px;
    position: relative;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.3);
}

.notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 30px;
    background-color: #000;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    z-index: 5;
}

.status-bar {
    display: flex;
    justify-content: space-between;
    padding: 5px 20px;
    color: white;
    font-size: 14px;
    z-index: 3;
}

.status-icons {
    display: flex;
    gap: 5px;
}

.icon {
    width: 14px;
    height: 14px;
}

.status-bar .status-icons .icon:nth-child(2) {
    display: none;
}

.device-screen {
    height: calc(100% - 80px);
    position: relative;
    background-color: #fff;
    overflow: hidden;
}

.device-footer {
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.3);
}

.mobile-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 80%;
}

.mobile-controls button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 18px;
}

#home-btn {
    width: 60px;
    height: 60px;
    background-color: rgba(255,255,255,0.2);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

#home-btn:active {
    background-color: rgba(255,255,255,0.4);
}

#recent-apps-btn, #back-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#back-btn {
    transform: rotate(180deg);
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    transform-origin: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    pointer-events: none;
}

.screen.active {
    display: flex;
    opacity: 1;
    pointer-events: auto;
    transform: scale(1) !important;
    z-index: 10;
}

.wallpaper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/background.jpg');
    background-size: cover;
    background-position: center;
    z-index: -1;
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 50px 20px;
    margin-top: 0;
    background-color: rgba(0, 0, 0, 0.1);
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}

.app {
    position: relative;
    z-index: 1;
    transform-origin: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(0);
}

.app:active {
    transform: scale(0.95) translateY(2px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.app-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    margin-bottom: 5px;
}

.app-name {
    color: white;
    font-size: 12px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* App screens */
.app-screen {
    background-color: #f8f8f8;
}

.app-header {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: #f0f0f0;
    border-bottom: 1px solid #ddd;
}

.back-button {
    background: none;
    border: none;
    font-size: 20px;
    margin-right: 15px;
    cursor: pointer;
}

.app-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
}

.app-content::-webkit-scrollbar {
    width: 5px;
}

.app-content::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
}

.app-content::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.3);
    border-radius: 3px;
}

/* Paint app */
#paint-canvas {
    width: 100%;
    height: 300px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 15px;
}

.paint-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

.color-option {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #ddd;
    cursor: pointer;
}

.color-option.active {
    border-color: #555;
    transform: scale(1.1);
}

#clear-canvas {
    padding: 8px;
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.color-wheel-container {
    position: relative;
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.color-wheel-indicator {
    position: absolute;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    pointer-events: none;
    transform: translate(-50%, -50%);
}

.color-wheel {
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.brush-size-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 15px;
}

.brush-size-container label {
    margin-bottom: 10px;
}

.brush-size-container input[type="range"] {
    width: 200px;
}

/* Calculator app */
.calculator {
    background-color: #222;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.calculator-display {
    background-color: #333;
    color: white;
    font-size: 2.5rem;
    text-align: right;
    padding: 20px 15px;
    height: 80px;
    overflow: hidden;
}

.calculator-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background-color: #555;
}

.calc-btn {
    height: 50px;
    border: none;
    font-size: 1.2rem;
    background-color: #3a3a3a;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
}

.calc-btn:active {
    background-color: #505050;
}

.operator {
    background-color: #fd9426;
}

.operator:active {
    background-color: #ffb366;
}

.clear, .backspace {
    background-color: #a5a5a5;
    color: #000;
}

.equals {
    background-color: #fd9426;
}

.zero {
    grid-column: span 2;
}

/* Settings app */
.settings-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:checked + .slider:before {
    transform: translateX(24px);
}

.slider.round {
    border-radius: 28px;
}

.slider.round:before {
    border-radius: 50%;
}

.about-btn {
    background-color: #2196F3;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    font-style: italic;
    cursor: pointer;
}

/* Wallpaper app */
.wallpaper-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 10px;
}

.wallpaper-option {
    position: relative;
    aspect-ratio: 9/16;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.2s, border-color 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.wallpaper-option:active {
    transform: scale(0.95);
}

.wallpaper-option.active {
    border-color: #2196F3;
}

.custom-wallpaper-upload {
    grid-column: 1 / -1;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 12px;
    text-align: center;
}

.custom-wallpaper-upload label {
    display: block;
    padding: 10px;
    background: #2196F3;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 10px;
}

.custom-wallpaper-upload input {
    display: none;
}

/* Dark mode */
body.dark-mode {
    background-color: #121212;
}

body.dark-mode .app-screen {
    background-color: #1e1e1e;
    color: #fff;
}

body.dark-mode .app-header {
    background-color: #2d2d2d;
    border-bottom: 1px solid #3d3d3d;
}

body.dark-mode .setting-item {
    background-color: #2d2d2d;
    color: #fff;
}

.factory-reset {
    background-color: #ffebee;
}

.danger-btn {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.danger-btn:hover {
    background-color: #d32f2f;
}

body.dark-mode .factory-reset {
    background-color: #4a1515;
}

/* Searchie App Styles */
.searchie-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.search-box {
    display: flex;
    padding: 10px;
    gap: 5px;
    position: relative;
}

#search-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    font-size: 16px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#search-button {
    padding: 0 15px;
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 18px;
}

.search-results {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.search-info {
    font-size: 14px;
    color: #777;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

.search-result {
    margin-bottom: 20px;
    padding: 10px;
    border-radius: 8px;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-result:hover {
    background-color: #f9f9f9;
}

.search-result h3 {
    margin: 0 0 5px 0;
    color: #1a73e8;
}

.result-url {
    display: block;
    color: #00802b;
    font-size: 14px;
    text-decoration: none;
    margin-bottom: 8px;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #777;
}

.error {
    text-align: center;
    padding: 20px;
    color: #d32f2f;
}

.search-result-details {
    position: absolute;
    top: 0;
    left: 100%;
    width: 100%;
    height: 100%;
    background: white;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px;
    overflow-y: auto;
}

.search-result-details.active {
    transform: translateX(-100%);
}

body.dark-mode .search-result-details {
    background: #1e1e1e;
    color: #fff;
}

.result-content {
    padding: 15px;
    line-height: 1.6;
}

.result-header {
    margin-bottom: 20px;
}

.result-header h2 {
    margin-bottom: 10px;
    color: #1a73e8;
}

body.dark-mode .result-header h2 {
    color: #64b5f6;
}

/* Shopper App Styles */
.shopper-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.shopper-banner {
    background: linear-gradient(to right, #4facfe, #00f2fe);
    color: white;
    padding: 15px;
    text-align: center;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding-bottom: 70px;
}

.product-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.product-item:active {
    transform: scale(0.97);
}

.product-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.product-info {
    padding: 10px;
}

.product-name {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 5px;
}

.product-price {
    color: #e53935;
    font-weight: bold;
}

.cart-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #2196F3;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    border: none;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e53935;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.product-detail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 10;
    transform: translateX(100%);
    transition: transform 0.3s;
    padding: 15px;
    overflow-y: auto;
}

.product-detail.active {
    transform: translateX(0);
}

.product-detail-image {
    width: 100%;
    height: 200px;
    object-fit: contain;
    margin-bottom: 15px;
    background: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-actions {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 10px;
    margin-top: 15px;
}

.add-to-cart {
    background: #2196F3;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 4px;
    font-weight: bold;
}

.buy-now {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 4px;
    font-weight: bold;
}

/* WebSIM Store App Styles */
.webstore-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.store-categories {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.category-btn {
    border: none;
    background: #f1f1f1;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    white-space: nowrap;
}

.category-btn.active {
    background: #2196F3;
    color: white;
}

.store-search {
    display: flex;
    margin-bottom: 15px;
}

.store-search input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
}

.store-search button {
    border: none;
    background: #2196F3;
    color: white;
    padding: 0 15px;
    border-radius: 0 4px 4px 0;
}

.store-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 0;
    margin: 0;
    background: none;
    border-radius: 0;
}

.store-app-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
}

.store-app-item:active {
    transform: scale(0.97);
}

.store-app-icon {
    width: 80px;
    height: 80px;
    object-fit: cover;
    margin: 15px auto;
    border-radius: 15px;
}

.store-app-info {
    padding: 10px 15px;
    background: #f9f9f9;
    flex: 1;
}

.store-app-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.store-app-rating {
    color: #FFC107;
    margin-bottom: 5px;
}

.store-app-price, .app-installed {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.store-app-price {
    background: #E3F2FD;
    color: #2196F3;
}

.app-installed {
    background: #E8F5E9;
    color: #4CAF50;
}

.app-details {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 10;
    transform: translateX(100%);
    transition: transform 0.3s;
    padding: 15px;
    overflow-y: auto;
}

.app-details.active {
    transform: translateX(0);
}

.app-detail-header {
    display: flex;
    margin-bottom: 20px;
}

.app-detail-header img {
    width: 80px;
    height: 80px;
    border-radius: 15px;
    margin-right: 15px;
}

.app-detail-info {
    flex: 1;
}

.app-screenshots {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 10px 0;
    margin-bottom: 15px;
}

.app-screenshot {
    height: 150px;
    min-width: 100px;
    border-radius: 8px;
    object-fit: cover;
}

.install-button {
    background: #2196F3;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 4px;
    font-weight: bold;
    margin-top: 15px;
    display: block;
    width: 100%;
}

.installed-button {
    background: #4CAF50;
    color: white;
}

/* Dark mode for Shopper and WebSIM Store */
body.dark-mode .shopper-container .product-item,
body.dark-mode .shopper-container .product-detail,
body.dark-mode .webstore-container .store-app-item {
    background-color: #2d2d2d;
    color: #fff;
}

body.dark-mode .store-app-info {
    background: #1e1e1e;
}

body.dark-mode .store-categories {
    border-bottom-color: #444;
}

body.dark-mode .category-btn {
    background: #3d3d3d;
    color: #ddd;
}

body.dark-mode .category-btn.active {
    background: #2196F3;
    color: white;
}

body.dark-mode .app-detail-description,
body.dark-mode .product-description {
    color: #bbb;
}

/* Messages App Styles */
.messages-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
}

#messages-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.messages-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.message {
    margin: 5px;
    padding: 10px;
    border-radius: 15px;
    max-width: 80%;
}

.message.sent {
    background: #2196F3;
    color: white;
    align-self: flex-end;
}

.message.received {
    background: #e9e9e9;
    align-self: flex-start;
}

.message-input {
    display: flex;
    padding: 10px;
    gap: 10px;
    background: white;
    border-top: 1px solid #ddd;
}

#message-text {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
}

#send-message {
    padding: 10px 20px;
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
}

/* Chatty App Styles */
.chatty-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chatty-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chatty-message {
    padding: 10px;
    border-radius: 15px;
    max-width: 80%;
    word-wrap: break-word;
}

.chatty-message.user {
    background: #2196F3;
    color: white;
    align-self: flex-end;
}

.chatty-message.bot {
    background: #e9e9e9;
    align-self: flex-start;
}

.chatty-message img {
    max-width: 100%;
    border-radius: 8px;
    margin-top: 10px;
}

.chatty-input {
    display: flex;
    padding: 10px;
    gap: 10px;
    background: white;
    border-top: 1px solid #ddd;
}

#chatty-text {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
}

#send-chatty {
    padding: 10px 20px;
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
}

/* Mobile adjustments for messages and chatty */
@media (max-width: 600px) {
    .message-input,
    .chatty-input {
        position: sticky;
        bottom: 0;
        background: white;
    }
    
    .messages-list,
    .chatty-messages {
        padding-bottom: 60px;
    }
}

/* Mobile Device Adjustments */
@media (max-width: 600px) {
    body.mobile-device .device {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
        transform: none;
        max-width: none;
        max-height: none;
    }

    body.mobile-device .device-container {
        width: 100%;
        height: 100%;
        perspective: none;
    }

    body.mobile-device .device:hover {
        transform: none;
    }
}

/* Tablet specific adjustments */
@media (min-width: 601px) and (max-width: 1024px) {
    body.tablet-device .device {
        width: 100%;
        height: 100vh;
        transform: none;
    }
}

/* Add media queries for device-specific styling */
@media (max-width: 600px), (max-height: 800px) {
    .device {
        width: 80vw;  
        height: 80vh;
        transform: scale(0.9);
    }

    .app-grid {
        gap: 10px;  
        padding: 20px 10px;
    }

    .app {
        transform: scale(0.9);  
    }

    .modal-content {
        width: 90%;  
        max-height: 80%;
        overflow-y: auto;
    }

    .modal-content h2 {
        font-size: 1.2em;  
    }
}

/* Snake Game and Minesweeper Styles */
.snake-control {
    width: 40px;
    height: 40px;
    border: none;
    background: #4CAF50;
    color: white;
    font-size: 20px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.snake-control:active {
    background: #388E3C;
    transform: scale(0.95);
}

.bounce {
    animation: bounce-effect 0.5s;
}

@keyframes bounce-effect {
    0%, 100% {transform: scale(1);}
    50% {transform: scale(1.2);}
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
}

.modal-content button {
    margin: 10px;
    padding: 10px 20px;
    font-size: 1.2em;
    border: none;
    border-radius: 5px;
    background: #2196F3;
    color: white;
    cursor: pointer;
}

.recent-apps-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.recent-apps-content {
    background: white;
    width: 90%;
    max-width: 400px;
    border-radius: 15px;
    overflow: hidden;
    max-height: 70%;
    display: flex;
    flex-direction: column;
}

.recent-apps-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #f0f0f0;
    border-bottom: 1px solid #ddd;
}

.recent-apps-header h2 {
    margin: 0;
    font-size: 18px;
}

.clear-all-btn {
    background: #f44336;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
}

.recent-apps-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.recent-app-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: white;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
}

.recent-app-item:hover {
    background-color: #f5f5f5;
}

.remove-app-btn {
    background: #f44336;
    color: white;
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

body.dark-mode .recent-apps-content {
    background-color: #2d2d2d;
    color: white;
}

body.dark-mode .recent-apps-header {
    background-color: #1e1e1e;
    border-bottom-color: #3d3d3d;
}

body.dark-mode .recent-app-item {
    background-color: #1e1e1e;
    border-bottom-color: #3d3d3d;
}

body.dark-mode .recent-app-item:hover {
    background-color: #2a2a2a;
}

.direct-answer {
    background-color: #e6f2ff;
    border-left: 4px solid #2196F3;
    margin-bottom: 15px;
}

body.dark-mode .direct-answer {
    background-color: #1a3f5c;
    border-left-color: #64b5f6;
}

.lock-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: center;
    align-items: center;
}

.lock-screen-wallpaper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/background.jpg');
    background-size: cover;
    background-position: center;
    z-index: -1;
}

.lock-screen-content {
    text-align: center;
    color: white;
    z-index: 1;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.lock-time {
    font-size: 4rem;
    font-weight: 300;
    margin-bottom: 10px;
}

.lock-date {
    font-size: 1.2rem;
    opacity: 0.8;
}

.swipe-up-indicator {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: white;
    opacity: 0.7;
}

.swipe-arrow {
    font-size: 2rem;
    animation: bounce 1.5s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    10%, 30%, 50%, 70%, 90% {transform: translateY(-20px);}
    20%, 40%, 60%, 80% {transform: translateY(-10px);}
}

#passcode-screen {
    backdrop-filter: none;
    background-color: transparent;
}

.passcode-container {
    position: relative;
    width: 350px;
    background-color: rgba(30, 30, 30, 0.8);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 10;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.lock-time {
    color: white;
    font-size: 3rem;
    margin-bottom: 10px;
}

.lock-date {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    margin-bottom: 30px;
}

.passcode-header {
    margin-bottom: 30px;
}

.passcode-header h2 {
    color: white;
    margin-bottom: 10px;
}

.passcode-header p {
    color: #ff9800;
    font-size: 0.9rem;
}

.passcode-display {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.passcode-dots {
    display: flex;
    gap: 15px;
}

.dot {
    width: 20px;
    height: 20px;
    background-color: #444;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.dot.filled {
    background-color: #2196F3;
}

.passcode-keypad {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.keypad-row {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.keypad-btn {
    width: 70px;
    height: 70px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.keypad-btn:active {
    background-color: #444;
}

.keypad-btn.delete {
    background-color: #f44336;
    color: white;
}

.keypad-btn.emergency {
    background-color: #ff9800;
    color: white;
    font-size: 0.9rem;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(10px); }
}

.passcode-screen.shake {
    animation: shake 0.5s;
}

/* Dark mode adjustments for Searchie */
body.dark-mode .search-result {
    background: #2d2d2d;
}

body.dark-mode .search-result h3 {
    color: #64b5f6;
}

body.dark-mode .result-url {
    color: #66bb6a;
}

body.dark-mode .search-info {
    color: #aaa;
    border-bottom-color: #444;
}

body.dark-mode .search-result:hover {
    background-color: #333;
}

/* Notepad App Styles */
.notepad-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.notepad-title {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.notepad-text {
    flex: 1;
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: none;
}

.notepad-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.notepad-actions button {
    flex: 1;
    padding: 10px;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.saved-notes-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
}

.saved-note {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.saved-note:last-child {
    border-bottom: none;
}

.saved-note .load-note {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

/* Dark mode styles for Notepad */
body.dark-mode .notepad-title,
body.dark-mode .notepad-text {
    background-color: #2d2d2d;
    color: #fff;
    border-color: #444;
}

body.dark-mode .saved-notes-list {
    background-color: #1e1e1e;
    border-color: #444;
}

body.dark-mode .saved-note {
    border-bottom-color: #333;
}