@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

body {
    background-color: #c0c0c0;
    font-family: 'Tahoma', sans-serif;
    margin: 0;
    padding: 0;
    background-image: url('win95_disks.png'); /* your Win95 disks wallpaper */
    background-repeat: repeat;
    background-attachment: fixed;
}

/* Top bar Assbook */
.top-bar {
    background: linear-gradient(to right, #000080, #1084d0);
    color: white;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #000;
}

.top-bar-title {
    font-weight: bold;
    font-size: 16px;
}

.top-bar-links a {
    color: white;
    text-decoration: none;
    margin-left: 10px;
    font-size: 14px;
}

.top-bar-links a:hover {
    text-decoration: underline;
}

/* Profile window */
.window {
    width: 500px;
    margin: 20px auto;
    background: #ece9d8;
    border: 2px solid #000;
    box-shadow: 3px 3px #808080;
}

.title-bar {
    background: linear-gradient(to right, #000080, #1084d0);
    color: white;
    padding: 4px 8px;
    font-weight: bold;
    font-size: 14px;
    border-bottom: 2px solid #000;
}

.content {
    padding: 15px;
}

.profile {
    display: flex;
    align-items: flex-start;
}

.avatar img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border: 2px solid #000;
    margin-right: 15px;
    border-radius: 0px;
}

.info h1 {
    margin: 0;
    font-size: 18px;
    color: #000080;
}

.info p {
    margin: 5px 0 10px 0;
}

/* Buttons */
.links {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.btn {
    display: inline-block;
    background: #d4d0c8;
    border: 2px solid #808080;
    padding: 4px 8px;
    color: black;
    text-decoration: none;
    font-size: 14px;
    box-shadow: inset -2px -2px #fff, inset 2px 2px #404040;
}

.btn:hover {
    background: #c0c0c0;
}

/* Powered by */
.powered {
    text-align: center;
    margin: 30px 0px 10px 10px;
    width: 500px;
    margin: 20px auto;
    background: #ece9d8;
    border: 2px solid #000;
    box-shadow: 3px 3px #808080;
}

.powered img {
    vertical-align: middle;
    margin: 1px 5px;
    height: 30px;
    border-radius: 5px;
}

/* Window buttons */
.window-buttons {
    margin-left: auto;
    display: flex;
    gap: 2px;
}

.win-btn {
    background: #d4d0c8;
    border: 1px solid #808080;
    font-family: 'Tahoma', sans-serif;
    font-size: 12px;
    width: 20px;
    height: 20px;
    line-height: 16px;
    text-align: center;
    padding: 0;
    cursor: pointer;
    box-shadow: inset -2px -2px #fff, inset 2px 2px #404040;
    font-weight: bold;
}

.win-btn:hover {
    background: #c0c0c0;
}

.title-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
/* BSOD */
#bsod {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0000aa;
    color: #c0c0c0;
    font-family: 'Lucida Console', 'Courier New', monospace;
    box-sizing: border-box;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    text-align: left;
}

#bsod.active {
    display: flex;
}

.bsod-content {
    max-width: 800px;
}

/* Серый прямоугольник с надписью Windows */
.bsod-header {
    text-align: center;
    margin-bottom: 20px;
}

.bsod-windows {
    background: #c0c0c0;
    color: #0000aa;
    padding: 5px 15px;
    font-weight: bold;
    font-size: 24px;
}

/* Кнопка Reload как мигающий курсор */
#reload-btn {
    background: #c0c0c0;
    color: #0000aa;
    border: none;
    padding: 4px 12px;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    animation: blink-cursor 1s steps(1) infinite;
    margin-top: 15px;
}

/* Мигающая анимация как у курсора */
@keyframes blink-cursor {
    50% { opacity: 0; }
}
/* Анимация появления BSOD */
@keyframes crt-flash {
    0% {
        transform: scaleY(0.05) scaleX(0);
        filter: brightness(400%);
    }
    40% {
        transform: scaleY(0.05) scaleX(1);
        filter: brightness(200%);
    }
    60% {
        transform: scaleY(1) scaleX(1);
        filter: brightness(150%);
    }
    100% {
        transform: scaleY(1) scaleX(1);
        filter: brightness(100%);
    }
}

#bsod.active {
    display: flex;
    animation: crt-flash 0.4s ease-out;
}

#error-window {
    width: 300px;
    background: #ece9d8;
    border: 2px solid #000;
    box-shadow: 3px 3px #808080;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
}

#error-window .title-bar {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    background: linear-gradient(to right, #000080, #1084d0);
    border-bottom: 2px solid #000;
}

#error-window .title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: bold;
    font-size: 14px;
    color: white;
}

#error-window .window-buttons {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.flash {
    animation: error-flash 0.5s;
}
#error-window .title-bar.inactive {
    background: #808080;
}

.title-bar.inactive {
    background: #808080 !important;
}

.open-animation {
    animation: error-open 0.2s ease-out forwards;
}

.close-animation {
    animation: error-close 0.15s ease-in forwards;
}

@keyframes error-open {
    0% { transform: translate(-50%, -50%) scale(0.7); opacity: 0; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

@keyframes error-close {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(0.7); opacity: 0; }
}

@keyframes error-flash {
    0%, 100% { opacity: 100%}
    50% { opacity: 50%}
}
#error-window .content {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
}

#error-window .content img {
    flex-shrink: 0;
}

#error-window .content p {
    margin: 0;
    flex: 1;
}

#error-window .btn.ok-btn {
    display: block;
    margin-left: auto;
    margin-top: 10px;
}

.sidebar {
    position: relative;
    top: 0;
    left: 0;
    width: 220px;
    height: auto;
    background: #ece9d8;
    border: 2px solid #000;
    box-shadow: 3px 0px #808080;
    display: flex;
    flex-direction: column;
    font-family: 'Tahoma', sans-serif;
    z-index: 999;
    float: left;
    min-height: 100vh; /* чтобы тянулось по высоте */
}

.sidebar .title-bar {
    background: linear-gradient(to right, #000080, #1084d0);
    color: white;
    padding: 4px 6px;
    font-weight: bold;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #000;
}

.sidebar .window-buttons {
    display: flex;
    gap: 2px;
}

.sidebar .win-btn {
    background: #d4d0c8;
    border: 1px solid #808080;
    font-size: 12px;
    width: 20px;
    height: 20px;
    line-height: 16px;
    text-align: center;
    padding: 0;
    cursor: pointer;
    box-shadow: inset -2px -2px #fff, inset 2px 2px #404040;
    font-weight: bold;
}

.sidebar .win-btn:hover {
    background: #c0c0c0;
}

.sidebar-content {
    padding: 6px;
    overflow-y: auto;
}

.section {
    margin-bottom: 10px;
}

.section-title {
    background: #000080;
    color: white;
    font-size: 12px;
    padding: 2px 5px;
    font-weight: bold;
    margin-bottom: 3px;
}

.section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.section li {
    margin-bottom: 2px;
}

.section a {
    display: block;
    background: #d4d0c8;
    padding: 3px 5px;
    border: 2px solid #808080;
    box-shadow: inset -2px -2px #fff, inset 2px 2px #404040;
    color: black;
    font-size: 12px;
    text-decoration: none;
}

.section a:hover {
    background: #c0c0c0;
}

.main-content {
    margin-left: 220px; /* ширина сайдбара */
    padding: 0px;
}

/* 🔹 Стили для неактивных панелей */
.top-bar.inactive {
    background: linear-gradient(to right, #b5b5b5, #9b9b9b);
    color: #666;
}

.top-bar.inactive a {
    color: #666 !important;
    pointer-events: none; /* отключаем клики */
}

.sidebar.inactive {
    background: #b5b5b5;
    color: #666;
}

.sidebar.inactive a {
    color: #666 !important;
    pointer-events: none;
}

/* 🔹 Делаем кнопки "Win98" серыми в неактивном состоянии */
.sidebar.inactive .btn,
.top-bar.inactive .btn {
    background: #c3c3c3;
    color: #666;
    border: 2px solid #9b9b9b;
    pointer-events: none;
}
.lang-switcher {
    margin-left: auto;
    padding: 2px 5px;
}

.lang-switcher select {
    background: #c3c3c3;
    border: 2px solid #9b9b9b;
    font-family: "MS Sans Serif", sans-serif;
    font-size: 12px;
    padding: 2px;
    outline: none;
}
