:root {
    --bg-url: url('https://images.unsplash.com/photo-1620641788421-7a1c342ea42e?ixlib=rb-1.2.1&auto=format&fit=crop&w=1920&q=80');
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-blur: blur(20px);
    --text-color: #ffffff;
    --accent-color: #4facfe;
    --accent-hover: #00f2fe;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
body, html { height: 100%; width: 100%; overflow: hidden; background: #000; }

.desktop {
    width: 100%;
    height: 100vh;
    background: var(--bg-url) no-repeat center center fixed;
    background-size: cover;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: background-image 0.5s ease;
}

/* Icons */
.desktop-icons { padding: 20px; display: grid; grid-template-columns: repeat(auto-fill, 100px); grid-gap: 20px; flex-grow: 1; }
.icon { width: 90px; height: 110px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; transition: all 0.3s ease; border-radius: 12px; padding: 5px; }
.icon:hover { background: rgba(255, 255, 255, 0.15); transform: scale(1.05); }
.icon-img { width: 60px; height: 60px; background: linear-gradient(135deg, var(--accent-color), var(--accent-hover)); border-radius: 15px; display: flex; align-items: center; justify-content: center; font-size: 28px; color: white; margin-bottom: 8px; box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2); }
.icon span { color: white; font-size: 13px; font-weight: 500; text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); text-align: center; }

/* Taskbar */
.taskbar { height: 50px; width: 100%; background: rgba(20, 20, 30, 0.8); backdrop-filter: var(--glass-blur); border-top: 1px solid var(--glass-border); display: flex; align-items: center; justify-content: space-between; padding: 0 15px; position: absolute; bottom: 0; z-index: 1000; }
.start-btn { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; font-size: 22px; color: white; cursor: pointer; border-radius: 8px; transition: 0.2s; }
.start-btn:hover { background: rgba(255, 255, 255, 0.1); color: var(--accent-hover); }
.running-apps { flex-grow: 1; display: flex; align-items: center; padding-left: 20px; }
.score-widget { color: #f1c40f; display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; background: rgba(0,0,0,0.2); padding: 5px 12px; border-radius: 20px; }
.system-tray { display: flex; align-items: center; gap: 20px; color: white; }
.tray-icons { display: flex; gap: 15px; font-size: 14px; opacity: 0.8; }
.clock { font-size: 14px; font-weight: 600; min-width: 80px; text-align: right; }

/* Start Menu */
.start-menu { position: absolute; bottom: -600px; left: 50%; transform: translateX(-50%); width: 600px; height: 550px; background: rgba(20, 20, 30, 0.9); backdrop-filter: blur(30px); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 15px; z-index: 2000; display: flex; flex-direction: column; transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6); padding: 24px; opacity: 0; }
.start-menu.active { bottom: 65px; opacity: 1; }
.search-bar { background: rgba(255, 255, 255, 0.1); border-radius: 8px; padding: 10px 15px; display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.search-bar input { background: none; border: none; color: white; outline: none; flex-grow: 1; }
.app-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; flex-grow: 1; }
.menu-item { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px; border-radius: 12px; cursor: pointer; transition: 0.2s; }
.menu-item:hover { background: rgba(255, 255, 255, 0.1); }
.menu-icon { width: 45px; height: 45px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; color: white; }
.menu-icon.notes { background: linear-gradient(135deg, #f1c40f, #f39c12); }
.menu-icon.calc { background: linear-gradient(135deg, #3498db, #2980b9); }
.menu-icon.todo { background: linear-gradient(135deg, #2ecc71, #27ae60); }
.menu-icon.pomodoro { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.menu-icon.browser { background: linear-gradient(135deg, #9b59b6, #8e44ad); }
.menu-icon.planner { background: linear-gradient(135deg, #e67e22, #d35400); }
.menu-icon.tracker { background: linear-gradient(135deg, #1abc9c, #16a085); }
.menu-icon.settings { background: linear-gradient(135deg, #7f8c8d, #34495e); }
.menu-item span { color: white; font-size: 11px; text-align: center; }

/* Windows */
.app-window { position: absolute; min-width: 450px; min-height: 350px; background: rgba(30, 30, 45, 0.95); backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 12px; box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5); display: flex; flex-direction: column; animation: windowOpen 0.3s cubic-bezier(0.16, 1, 0.3, 1); z-index: 100; overflow: hidden; }
@keyframes windowOpen { from { opacity: 0; transform: scale(0.9) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.window-closing { animation: windowClose 0.2s forwards; }
@keyframes windowClose { to { opacity: 0; transform: scale(0.9); } }
.title-bar { height: 40px; background: rgba(255, 255, 255, 0.05); padding: 0 15px; display: flex; align-items: center; justify-content: space-between; cursor: move; }
.window-title { color: white; font-size: 13px; display: flex; align-items: center; gap: 10px; }
.window-controls { display: flex; gap: 8px; }
.control { width: 12px; height: 12px; border-radius: 50%; cursor: pointer; }
.control.close { background: #ff5f56; }
.control.minimize { background: #ffbd2e; }
.control.maximize { background: #27c93f; }
.window-content { flex-grow: 1; padding: 20px; color: white; overflow-y: auto; }

/* App Content Styles */
.notes-app textarea { width: 100%; height: 250px; background: transparent; border: none; color: white; outline: none; font-size: 15px; resize: none; }
.calc-display { background: rgba(0,0,0,0.3); padding: 15px; border-radius: 8px; text-align: right; font-size: 24px; margin-bottom: 10px; }
.calc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.btn { padding: 12px; border-radius: 8px; border: none; background: rgba(255,255,255,0.1); color: white; cursor: pointer; }
.timer-display { font-size: 60px; text-align: center; margin: 20px 0; font-weight: 700; }
.timer-controls { display: flex; justify-content: center; gap: 10px; }
.todo-input-group { display: flex; gap: 8px; margin-bottom: 15px; }
#todo-list { list-style: none; }
.todo-item { display: flex; align-items: center; gap: 10px; padding: 8px; background: rgba(255,255,255,0.05); margin-bottom: 5px; border-radius: 5px; }
.todo-item.completed span { text-decoration: line-through; opacity: 0.5; }
.notification { position: fixed; top: 20px; right: 20px; background: rgba(40,44,52,0.9); padding: 15px; border-radius: 10px; color: white; width: 300px; display: flex; gap: 15px; animation: notifyIn 0.5s forwards; z-index: 10000; }
@keyframes notifyIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.fade-out { opacity: 0; transform: translateX(100%); transition: 0.5s; }
.wallpaper-app { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wp-thumb { border-radius: 8px; border: 2px solid transparent; cursor: pointer; overflow: hidden; height: 80px; }
.wp-thumb:hover { border-color: var(--accent-color); }
.wp-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Browser App Upgrade */
.browser-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    background: #1a1a2e;
}

.browser-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: linear-gradient(180deg, #2d2d44 0%, #1f1f35 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-btns {
    display: flex;
    gap: 4px;
}

.nav-btn {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}


.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}


.address-bar {
    flex-grow: 1;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    display: flex;
    align-items: center;
    padding: 6px 14px;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: border-color 0.2s ease;
}


.address-bar:focus-within {
    border-color: var(--accent-color, #6c5ce7);
}

.security-icon {
    font-size: 11px;
    color: #00d9a5;
}

.address-bar input {
    background: none;
    border: none;
    color: #fff;
    font-size: 13px;
    width: 100%;
    outline: none;
    font-family: 'Inter', sans-serif;
}

.address-bar input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.go-btn {
    background: var(--accent-color, #6c5ce7);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    color: white;
    cursor: pointer;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}


.go-btn:hover {
    background: #5849c4;
    transform: scale(1.05);
}

.browser-content {
    flex-grow: 1;
    position: relative;
    background: #fff;
}

#browser-iframe {
    width: 100%;
    height: 100%;
    background: #fff;
    display: none;
    border: none;
}

.browser-welcome {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
}

.welcome-content {
    text-align: center;
    padding: 40px;
}

.globe-icon {
    font-size: 64px;
    color: var(--accent-color, #6c5ce7);
    margin-bottom: 20px;
}

.welcome-content h2 {
    color: #2d3436;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    font-family: 'Inter', sans-serif;
}

.welcome-content p {
    color: #636e72;
    font-size: 14px;
    margin-bottom: 24px;
}

.quick-links {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.quick-link {
    padding: 10px 20px;
    background: white;
    border: 1px solid #dfe6e9;
    border-radius: 20px;
    color: #2d3436;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.quick-link:hover {
    background: var(--accent-color, #6c5ce7);
    color: white;
    border-color: var(--accent-color, #6c5ce7);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

/* Game Styles */
.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    height: 100%;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 300px;
    margin-bottom: 15px;
    color: white;
    font-family: 'Inter', sans-serif;
}

.game-header span {
    font-size: 14px;
    font-weight: 500;
}

.game-header button {
    padding: 6px 14px;
    background: var(--accent-color, #6c5ce7);
    border: none;
    border-radius: 15px;
    color: white;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.game-header button:hover {
    background: #5849c4;
    transform: scale(1.05);
}

.game-controls {
    margin-top: 15px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    font-family: 'Inter', sans-serif;
}

/* Snake Game */
#snake-canvas {
    border: 2px solid rgba(108, 92, 231, 0.5);
    border-radius: 8px;
    background: #1a1a2e;
}

/* Tic Tac Toe */
.ttt-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px;
    border-radius: 10px;
}

.ttt-cell {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.ttt-cell:hover {
    background: rgba(255, 255, 255, 0.15);
}

.ttt-cell.player-x {
    color: #00d9a5;
}

.ttt-cell.player-o {
    color: #e74c3c;
}

/* Menu Icon for Games */
.menu-icon.game {
    background: linear-gradient(135deg, #e17055, #d63031);
}
