win / styles /main.css
igorvkarpov's picture
Upload 24 files
cdf0905 verified
/* Основные сбросы стилей */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
:root {
--taskbar-height: 40px;
--taskbar-bg: #202020;
--start-menu-bg: #2d2d2d;
--window-header-bg: #1f1f1f;
--window-border: #0078d7;
--window-bg: #fff;
--hover-color: #333;
--active-program-bg: #3a3a3a;
--desktop-bg: #004275;
}
body {
width: 100%;
height: 100vh;
overflow: hidden;
background-color: var(--desktop-bg);
background-image: url('../images/windows10-bg.jpg');
background-size: cover;
background-position: center;
position: relative;
}
/* Стили для рабочего стола */
#windows-container {
width: 100%;
height: calc(100vh - var(--taskbar-height));
position: relative;
overflow: hidden;
}
/* Иконки на рабочем столе */
.desktop-icon {
width: 80px;
height: 90px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-start;
padding: 10px;
margin: 10px;
color: #fff;
text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
position: relative;
cursor: pointer;
text-align: center;
font-size: 12px;
}
.desktop-icon img {
width: 40px;
height: 40px;
margin-bottom: 5px;
}
.desktop-icon:hover {
background-color: rgba(255, 255, 255, 0.1);
}
/* Стили для панели задач */
#taskbar {
width: 100%;
height: var(--taskbar-height);
background-color: var(--taskbar-bg);
position: fixed;
bottom: 0;
display: flex;
align-items: center;
z-index: 1000;
}
#start-button {
height: 100%;
width: 48px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
background-color: rgba(0, 120, 215, 0.7);
transition: background-color 0.2s ease;
}
#start-button img {
width: 24px;
height: 24px;
}
#start-button:hover {
background-color: rgba(0, 120, 215, 1);
}
/* Добавляем активное состояние для кнопки Пуск */
#start-button.active {
background-color: rgba(0, 120, 215, 1);
}
#taskbar-programs {
display: flex;
height: 100%;
}
.taskbar-program {
height: 100%;
padding: 0 10px;
min-width: 40px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
border-bottom: 2px solid transparent;
}
.taskbar-program img {
width: 24px;
height: 24px;
}
.taskbar-program:hover {
background-color: var(--hover-color);
}
.taskbar-program.active {
background-color: var(--active-program-bg);
border-bottom: 2px solid #0078d7;
}
/* Стили для меню "Пуск" */
#start-menu {
position: absolute;
bottom: var(--taskbar-height);
left: 0;
width: 350px;
height: 500px;
background-color: var(--start-menu-bg);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
z-index: 9999;
color: #fff;
transform: translateY(100%);
opacity: 0;
pointer-events: none;
display: flex;
flex-direction: column;
transition: transform 0.3s ease, opacity 0.3s ease;
visibility: hidden;
}
#start-menu.active {
transform: translateY(0);
opacity: 1;
pointer-events: auto;
visibility: visible;
}
#start-menu-header {
padding: 15px;
display: flex;
align-items: center;
}
#start-menu-header img {
width: 30px;
height: 30px;
border-radius: 50%;
margin-right: 10px;
}
#start-menu-apps {
flex: 1;
overflow-y: auto;
padding: 10px;
display: flex;
flex-wrap: wrap;
align-content: flex-start;
}
.start-menu-app {
width: 90px;
height: 90px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin: 5px;
padding: 10px;
cursor: pointer;
text-align: center;
font-size: 12px;
}
.start-menu-app img {
width: 32px;
height: 32px;
margin-bottom: 5px;
}
.start-menu-app:hover {
background-color: var(--hover-color);
}
/* Стили для окон программ */
.window {
position: absolute;
min-width: 300px;
min-height: 200px;
background-color: var(--window-bg);
border: 1px solid var(--window-border);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
display: flex;
flex-direction: column;
z-index: 100;
resize: both;
overflow: hidden;
}
.window.minimized {
display: none;
}
.window.active {
z-index: 101;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}
/* Стили для окна в полноэкранном режиме */
.window.maximized {
width: 100% !important;
height: calc(100vh - var(--taskbar-height)) !important;
top: 0 !important;
left: 0 !important;
border-radius: 0;
resize: none;
border: none;
}
.window-header {
background-color: var(--window-header-bg);
color: #fff;
padding: 5px 10px;
display: flex;
align-items: center;
justify-content: space-between;
cursor: move;
}
/* Изменение курсора при наведении на заголовок окна (указывает на возможность двойного клика) */
.window.maximized .window-header {
cursor: default;
}
.window-title {
display: flex;
align-items: center;
}
.window-title img {
width: 16px;
height: 16px;
margin-right: 5px;
}
.window-controls {
display: flex;
}
.window-control {
width: 14px;
height: 14px;
margin-left: 10px;
display: flex;
align-items: center;
justify-content: center;
font-size: 10px;
cursor: pointer;
}
.window-control:hover {
background-color: var(--hover-color);
}
.window-control.minimize:hover {
background-color: #0078d7;
}
.window-control.maximize:hover {
background-color: #00a65a;
}
.window-control.close:hover {
background-color: #d9534f;
}
.window-content {
flex: 1;
padding-bottom: 20px;
/*overflow: auto;*/
}
/* Адаптивные стили */
@media (max-width: 768px) {
:root {
--taskbar-height: 50px;
}
#start-menu {
width: 100%;
height: 70vh;
}
.desktop-icon {
width: 70px;
height: 80px;
}
}
@media (max-width: 480px) {
.desktop-icon {
width: 60px;
height: 70px;
font-size: 10px;
}
.window {
min-width: 90%;
min-height: 300px;
width: 90% !important;
left: 5% !important;
}
}