/* Весь старый CSS остаётся, добавляем только новый класс для браузера */
:root {
    --bg: #0f0a1a; --glass: rgba(20, 10, 30, 0.8); --accent: #b366ff; --accent2: #ff66b2;
    --text: #f0e6ff; --border: rgba(150, 80, 255, 0.4); --neon-glow: 0 0 25px rgba(180, 100, 255, 0.6);
    --taskbar-height: 42px; --topbar-height: 32px;
}
* { margin:0; padding:0; box-sizing:border-box; }
body {
    font-family: 'Nunito', sans-serif; background: var(--bg); height: 100vh; overflow: hidden;
    user-select: none; display: flex; flex-direction: column; transition: background 0.8s ease;
}
.bg-orbs { position: fixed; top:0; left:0; width:100%; height:100%; z-index:0; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.5; animation: orbPulse 4s ease-in-out infinite alternate; }
.orb-1 { width: 400px; height: 400px; background: #7b2fff; left: -5%; top: 30%; }
.orb-2 { width: 350px; height: 350px; background: #ff2d95; right: 10%; top: 60%; }
.orb-3 { width: 500px; height: 500px; background: #5f27cd; left: 50%; top: 10%; }
.orb-4 { width: 300px; height: 300px; background: #ff6b6b; right: 30%; bottom: 20%; }
@keyframes orbPulse { 0% { transform: scale(1); opacity: 0.4; } 100% { transform: scale(1.15); opacity: 0.7; } }
#login-overlay { position: fixed; top:0; left:0; width:100%; height:100%; background: rgba(0,0,0,0.9); backdrop-filter: blur(20px); display: flex; align-items: center; justify-content: center; z-index: 9999; flex-direction: column; }
.login-box { background: rgba(30,20,40,0.8); backdrop-filter: blur(30px); border: 1px solid var(--border); border-radius: 24px; padding: 40px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,0.5); color: white; z-index: 2; }
.login-avatar { width: 90px; height: 90px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent2)); display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; font-size: 40px; box-shadow: 0 0 30px var(--accent); }
.login-box input { width: 100%; padding: 14px 20px; border-radius: 40px; border: 1px solid var(--border); background: rgba(255,255,255,0.1); color: white; font-size: 1.2rem; outline: none; text-align: center; margin: 15px 0; }
.login-box button { background: var(--accent); color: white; border: none; padding: 14px 50px; border-radius: 40px; font-weight: 700; font-size: 1.2rem; cursor: pointer; transition: 0.2s; box-shadow: 0 0 20px var(--accent2); }
.login-box button:hover { background: var(--accent2); }
#matrix-canvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.top-panel { height: var(--topbar-height); background: rgba(0,0,0,0.85); display: flex; align-items: center; padding: 0 12px; z-index: 200; color: white; font-size: 0.85rem; border-bottom: 1px solid var(--border); backdrop-filter: blur(10px); }
.top-panel .app-menu-btn { cursor: pointer; padding: 4px 12px; border-radius: 4px; display: flex; align-items: center; gap: 4px; }
.top-panel .app-menu-btn:hover { background: rgba(255,255,255,0.15); }
.panel-separator { flex: 1; }
.panel-indicators { display: flex; align-items: center; gap: 12px; }
.workspace-switcher { display: flex; gap: 4px; margin: 0 10px; }
.workspace-btn { width: 20px; height: 20px; border-radius: 4px; background: rgba(255,255,255,0.2); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 12px; color: white; }
.workspace-btn.active { background: var(--accent); }
.app-menu { position: fixed; top: var(--topbar-height); left: 0; width: 340px; background: rgba(0,0,0,0.92); backdrop-filter: blur(20px); border: 1px solid var(--border); border-radius: 0 0 16px 16px; z-index: 500; display: none; padding: 8px; color: white; max-height: 70vh; overflow-y: auto; box-shadow: 0 20px 40px rgba(0,0,0,0.6); }
.app-menu.open { display: block; }
.menu-search { width: 100%; padding: 10px 16px; border-radius: 20px; border: 1px solid var(--border); background: rgba(255,255,255,0.1); color: white; margin-bottom: 10px; outline: none; }
.app-menu-category { font-weight: 700; color: var(--accent); margin: 8px 0 4px; padding: 4px 8px; font-size: 0.8rem; text-transform: uppercase; }
.app-menu-item { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 8px; cursor: pointer; color: white; transition: 0.2s; }
.app-menu-item:hover { background: var(--accent); }
.desktop { flex:1; position:relative; z-index:0; padding: 10px; overflow: hidden; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 20px; }
.desktop-icon { display: flex; flex-direction: column; align-items: center; width: 84px; cursor: pointer; transition: 0.2s; padding: 5px; border-radius: 12px; }
.desktop-icon:hover { background: rgba(255,255,255,0.1); }
.desktop-icon .material-icons { font-size: 40px; color: var(--accent); }
.desktop-icon span { color: var(--text); margin-top: 4px; font-size: 0.8rem; text-align: center; word-break: break-word; }
.window { position: absolute; background: var(--glass); backdrop-filter: blur(25px); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,0.3), var(--neon-glow); min-width: 300px; max-width: 95%; display: flex; flex-direction: column; animation: winOpen 0.25s ease; transition: box-shadow 0.2s; }
.window.focused { box-shadow: 0 15px 50px rgba(180,100,255,0.4), 0 0 30px var(--accent); }
@keyframes winOpen { from { opacity:0; transform:scale(0.9); } }
.window-header { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px; background: rgba(255,255,255,0.05); cursor: move; border-radius: 16px 16px 0 0; }
.window-title { color: var(--accent); font-weight: 700; display: flex; align-items: center; gap: 8px; }
.window-controls { display: flex; gap: 8px; }
.win-btn { width: 14px; height: 14px; border-radius: 50%; cursor: pointer; transition: 0.2s; }
.win-btn.min { background: #f1c40f; } .win-btn.max { background: #2ecc71; } .win-btn.close { background: #e74c3c; }
.win-btn:hover { transform: scale(1.3); }
.window-body { padding: 16px; color: var(--text); flex:1; overflow: auto; }
.taskbar { height: var(--taskbar-height); background: var(--glass); backdrop-filter: blur(25px); border-top: 1px solid var(--border); display: flex; align-items: center; padding: 0 12px; gap: 8px; z-index: 200; }
.taskbar-items { display: flex; gap: 6px; flex:1; overflow-x: auto; }
.taskbar-item { display: flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 20px; background: rgba(255,255,255,0.2); cursor: pointer; font-weight: 700; color: var(--text); white-space: nowrap; }
.taskbar-item.active { background: var(--accent); color: white; }
.clock { margin-left: auto; color: white; }
.context-menu { position: fixed; background: var(--glass); backdrop-filter: blur(20px); border: 1px solid var(--border); border-radius: 12px; padding: 8px 0; z-index: 800; min-width: 200px; color: var(--text); }
.context-menu div { padding: 10px 20px; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.context-menu div:hover { background: var(--accent); border-radius: 8px; margin: 0 4px; }
.notification { position: fixed; bottom: 80px; right: 20px; background: var(--accent); color: white; padding: 12px 24px; border-radius: 30px; z-index: 1000; animation: slideIn 0.3s ease; box-shadow: 0 0 20px var(--accent); }
@keyframes slideIn { from { transform: translateX(100px); opacity: 0; } }
.project-card:hover { background: rgba(255,255,255,0.1) !important; box-shadow: 0 0 25px rgba(180,100,255,0.4) !important; transform: translateY(-5px); }

/* Универсальные стили для ВСЕХ кнопок */
button {
    font-family: inherit; cursor: pointer; transition: all 0.2s;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    border: none; outline: none;
}
button:active { transform: scale(0.96); }

.os-btn, .editor-btn, .browser-btn, .calculator button, .settings button, .profile button, .files-content button, .desktop-icon button, .window-body button {
    background: var(--accent); color: white; border: none;
    padding: 8px 18px; border-radius: 20px; font-weight: 700;
    box-shadow: 0 0 12px var(--accent2), 0 0 25px rgba(180,100,255,0.3);
    margin: 4px; font-size: 0.9rem;
}
.os-btn:hover, .editor-btn:hover, .browser-btn:hover, .calculator button:hover, .settings button:hover, .profile button:hover, .files-content button:hover, .desktop-icon button:hover, .window-body button:hover {
    background: var(--accent2);
    box-shadow: 0 0 20px var(--accent2), 0 0 40px var(--accent);
}

/* Для кнопок калькулятора */
.calculator button {
    padding: 12px; font-size: 1.1rem; border-radius: 12px; margin: 2px;
}
.calculator button:nth-child(4n) { background: #ff66b2; }
.calculator button.clear { background: #e74c3c; }
.calculator button.ok { background: #2ecc71; }

/* Модалки */
.custom-modal-overlay {
    position: fixed; top:0; left:0; width:100%; height:100%;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(8px);
    z-index: 2000; display: flex; align-items: center; justify-content: center;
}
.custom-modal {
    background: rgba(20, 10, 30, 0.95); backdrop-filter: blur(25px);
    border: 1px solid var(--border); border-radius: 24px;
    padding: 30px; max-width: 450px; width: 90%;
    color: var(--text); box-shadow: 0 0 40px var(--accent2);
    animation: modalAppear 0.3s ease;
}
.custom-modal h2 { color: var(--accent); margin-bottom: 15px; font-size: 1.3rem; }
.custom-modal input { width: 100%; padding: 12px 20px; border-radius: 30px; border: 1px solid var(--border); background: rgba(255,255,255,0.1); color: white; outline: none; margin-bottom: 20px; font-size: 1rem; }
.custom-modal .btn-group { display: flex; gap: 12px; justify-content: flex-end; }
.custom-modal button {
    padding: 10px 25px; border-radius: 30px; border: none; font-weight: 700; font-size: 0.95rem;
    background: var(--accent); color: white;
    box-shadow: 0 0 15px var(--accent2);
}
.custom-modal button.cancel { background: rgba(255,255,255,0.2); box-shadow: none; }
.custom-modal button:hover { background: var(--accent2); }
@keyframes modalAppear { from { opacity:0; transform: scale(0.8); } to { opacity:1; transform: scale(1); } }

/* Терминал */
.kitty-tabs { display: flex; gap: 2px; padding: 4px 8px; background: rgba(0,0,0,0.3); border-radius: 8px 8px 0 0; }
.kitty-tab { padding: 4px 12px; border-radius: 8px 8px 0 0; background: rgba(255,255,255,0.1); cursor: pointer; color: #ccc; font-size: 0.9rem; }
.kitty-tab.active { background: rgba(0,0,0,0.6); color: var(--accent); }
.kitty-body { background: transparent; color: #33ff33; font-family: 'Source Code Pro', monospace; padding: 8px; min-height: 150px; max-height: 400px; overflow-y: auto; font-size: 0.9rem; white-space: pre-wrap; }
.kitty-input { width: 100%; background: transparent; border: none; color: #33ff33; font-family: inherit; font-size: 1rem; outline: none; padding: 4px 8px; margin-top: 5px; }

/* Браузер */
.browser-toolbar { display: flex; flex-direction: column; gap: 5px; background: rgba(0,0,0,0.3); padding: 8px; }
.browser-url-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.browser-url-input { flex: 1; padding: 8px 16px; border-radius: 20px; border: 1px solid var(--border); background: rgba(255,255,255,0.1); color: white; font-size: 0.95rem; min-width: 200px; }
.browser-btn { background: var(--accent); color: white; border: none; padding: 8px 16px; border-radius: 20px; cursor: pointer; display: flex; align-items: center; gap: 4px; }
.browser-btn:hover { background: var(--accent2); }
.browser-tabs { display: flex; gap: 4px; margin-top: 5px; flex-wrap: wrap; }
.browser-tab { padding: 6px 12px; background: rgba(255,255,255,0.1); border-radius: 8px; cursor: pointer; display: flex; align-items: center; gap: 4px; font-size: 0.85rem; }
.browser-tab.active { background: var(--accent); }

/* Исправление размеров окна браузера */
.browser-window .window-body {
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
}
.browser-window .browser-frame {
    flex: 1 !important;
    height: 100% !important;
    min-height: 0 !important;
    border-radius: 0 0 16px 16px;
}
