JSFiddle - React, Tailwind, and code Playground
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>JS-OS Mobile</title>
<style>
/* --- CSS VARIABLES & THEMES --- */
:root {
--bg-image: url('https://images.unsplash.com/photo-1557683316-973673baf926?auto=format&fit=crop&w=400&q=80');
--accent-color: #007AFF;
--text-color: #ffffff;
--glass: rgba(255, 255, 255, 0.2);
--font-family: 'Segoe UI', sans-serif;
--os-font: 'Segoe UI', sans-serif;
}
/* SPECIAL FEATURE: Retro Theme */
body.retro-mode {
--accent-color: #00ff00;
--text-color: #00ff00;
--glass: rgba(0, 40, 0, 0.8);
--os-font: 'Courier New', monospace;
filter: contrast(1.2) brightness(0.8) sepia(0.5);
}
/* --- RESET & BASE --- */
* { box-sizing: border-box; margin: 0; padding: 0; user-select: none; }
body {
background: #222;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
font-family: var(--os-font);
}
/* --- PHONE HARDWARE SIMULATION --- */
#phone-frame {
width: 360px;
height: 740px;
background: #000;
border-radius: 40px;
border: 12px solid #333;
position: relative;
overflow: hidden;
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}
#notch {
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%);
width: 150px;
height: 25px;
background: #333;
border-bottom-left-radius: 15px;
border-bottom-right-radius: 15px;
z-index: 100;
...