* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    background: #000;
}

/* Boot Screen */
.boot-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s;
}

.boot-logo {
    text-align: center;
}

.windows-logo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
}

.logo-square {
    background: #00d4ff;
    animation: pulse 1.5s ease-in-out infinite;
}

.logo-square:nth-child(1) { animation-delay: 0s; }
.logo-square:nth-child(2) { animation-delay: 0.2s; }
.logo-square:nth-child(3) { animation-delay: 0.4s; }
.logo-square:nth-child(4) { animation-delay: 0.6s; }

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 212, 255, 0.2);
    border-top-color: #00d4ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(400%); }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-8px); }
    20%, 40%, 60%, 80% { transform: translateX(8px); }
}

/* Login Screen */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9000;
    overflow: hidden;
}

.login-screen.unlocking .lock-wallpaper {
    animation: slideUpWallpaper 0.6s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
}

.login-screen.unlocking .lock-screen-info {
    animation: fadeOut 0.4s forwards;
}

.login-screen.unlocking .login-container {
    animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s forwards;
}

.lock-wallpaper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5)),
                url('https://c4.wallpaperflare.com/wallpaper/358/411/696/bleach-samurai-sword-urahara-kisuke-wallpaper-preview.jpg');
    background-size: cover;
    background-position: center;
    z-index: 1;
    transition: filter 0.3s ease;
}

.lock-wallpaper.blurred {
    filter: blur(20px) brightness(0.7);
}

.login-screen::after {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    z-index: 1;
    animation: fadeInOut 2s infinite;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

@keyframes slideUpWallpaper {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-100%);
    }
}

@keyframes fadeInBlur {
    from {
        opacity: 0;
        filter: blur(0px);
    }
    to {
        opacity: 1;
        filter: blur(20px);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes floatUp {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(-30px);
    }
}

.login-container {
    text-align: center;
    color: #fff;
    position: relative;
    z-index: 4;
    display: none;
    opacity: 0;
    transform: scale(0.9);
    padding: 50px;
    transition: all 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.login-container.show {
    display: block;
    opacity: 1;
    transform: scale(1);
}

.lock-screen-info {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    cursor: pointer;
    z-index: 3;
    animation: floatUp 3s ease-in-out infinite;
    transition: all 0.3s ease;
}

.lock-screen-info:hover {
    transform: scale(1.02);
}

.lock-screen-time {
    font-size: 140px;
    font-weight: 100;
    line-height: 1;
    margin-bottom: 15px;
    letter-spacing: -4px;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    font-family: 'Segoe UI Light', 'Segoe UI', sans-serif;
}

.lock-screen-date {
    font-size: 32px;
    font-weight: 300;
    opacity: 0.95;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
    letter-spacing: 0.5px;
}

.user-profile {
    margin-bottom: 30px;
}

.user-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px;
    font-size: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.user-name {
    font-size: 32px;
    font-weight: 300;
}

.password-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}

.password-input {
    padding: 15px 20px;
    font-size: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: #fff;
    width: 250px;
    outline: none;
    transition: all 0.3s;
}

.password-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.password-input:focus {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.15);
}

.login-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
}

.login-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.login-hint {
    font-size: 14px;
    opacity: 0.8;
}

.login-progress {
    text-align: center;
    margin-top: 20px;
}

.progress-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 15px;
}

.login-progress p {
    font-size: 14px;
    opacity: 0.9;
}

.login-footer {
    position: absolute;
    bottom: 30px;
    right: 30px;
    color: #fff;
    text-align: right;
    z-index: 1;
}

.footer-icons {
    font-size: 18px;
    margin-bottom: 10px;
}

.footer-icons i {
    margin-left: 15px;
}

.datetime {
    font-size: 14px;
    opacity: 0.9;
}

/* Desktop */
.desktop {
    width: 100%;
    height: 100%;
    background: url('https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?w=1920&h=1080&fit=crop') center/cover;
    background-size: cover;
    background-position: center;
    display: none;
    position: relative;
    transition: opacity 0.5s;
}

.desktop::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    pointer-events: none;
}

/* Taskbar */
.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 48px;
    background: rgba(20, 20, 20, 0.9);
    backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8px;
    z-index: 1000;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.taskbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.start-btn {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.start-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.windows-icon {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    width: 20px;
    height: 20px;
}

.icon-square {
    background: #00d4ff;
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 6px 12px;
    gap: 8px;
    min-width: 240px;
}

.search-box i {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.search-box input {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 14px;
    outline: none;
    width: 100%;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.taskbar-apps {
    display: flex;
    gap: 4px;
}

.taskbar-app {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative;
    transition: background 0.2s;
    color: #fff;
    font-size: 18px;
}

.taskbar-app:hover {
    background: rgba(255, 255, 255, 0.15);
}

.taskbar-app.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: #00d4ff;
    border-radius: 2px 2px 0 0;
}

.taskbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.system-tray {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-size: 14px;
    padding: 0 8px;
}

.system-tray i {
    cursor: pointer;
    transition: color 0.2s;
}

.system-tray i:hover {
    color: #00d4ff;
}

.clock {
    color: #fff;
    text-align: right;
    font-size: 12px;
    padding: 0 8px;
    cursor: pointer;
    transition: background 0.2s;
    border-radius: 4px;
    line-height: 1.3;
}

.clock:hover {
    background: rgba(255, 255, 255, 0.1);
}

.clock .time {
    font-weight: 600;
}

.clock .date {
    opacity: 0.8;
}

/* Start Menu */
.start-menu {
    position: fixed;
    bottom: 56px;
    left: 8px;
    width: 600px;
    height: 680px;
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(40px);
    border-radius: 12px;
    display: none;
    z-index: 2000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform-origin: bottom left;
}

.start-menu.opening {
    animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.start-menu.closing {
    animation: slideDown 0.2s cubic-bezier(0.7, 0, 0.84, 0);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
}

.start-menu-content {
    padding: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.start-header {
    margin-bottom: 24px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-size: 16px;
}

.user-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 212, 255, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
}

.pinned-apps {
    flex: 1;
    overflow-y: auto;
}

.pinned-apps h3 {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    opacity: 0.8;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.app-tile {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #fff;
}

.app-tile:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.app-tile i {
    font-size: 32px;
    margin-bottom: 8px;
    color: #00d4ff;
}

.app-tile span {
    display: block;
    font-size: 13px;
}

.start-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.power-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
}

.power-btn:hover {
    background: rgba(255, 77, 77, 0.3);
}

/* Desktop Icons */
.desktop-icons {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.desktop-icon {
    width: 80px;
    text-align: center;
    cursor: pointer;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    transition: all 0.2s;
}

.desktop-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.desktop-icon i {
    font-size: 40px;
    margin-bottom: 8px;
    display: block;
}

.desktop-icon span {
    font-size: 13px;
    display: block;
}

/* Windows */
.window {
    position: absolute;
    background: rgba(245, 245, 245, 0.98);
    backdrop-filter: blur(50px);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 1px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    min-width: 400px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.2s, transform 0.2s;
}

.window.show {
    opacity: 1;
    transform: scale(1);
}

.window.closing {
    animation: windowClose 0.2s forwards;
}

@keyframes windowClose {
    to {
        opacity: 0;
        transform: scale(0.9);
    }
}

.window.maximized {
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: calc(100% - 48px) !important;
    border-radius: 0;
}

.window-titlebar {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(240, 240, 240, 0.8) 100%);
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    user-select: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.window-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1a1a1a;
    font-size: 13px;
    font-weight: 400;
}

.window-title i {
    color: #0078d4;
    font-size: 16px;
}

.window-controls {
    display: flex;
    gap: 12px;
}

.window-controls button {
    width: 46px;
    height: 32px;
    background: transparent;
    border: none;
    color: #1a1a1a;
    cursor: pointer;
    font-size: 10px;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.window-controls button:hover {
    background: rgba(0, 0, 0, 0.05);
}

.window-controls .close-btn:hover {
    background: #e81123;
    color: #fff;
}

.window-content {
    flex: 1;
    padding: 0;
    overflow: auto;
    color: #1a1a1a;
    background: #fff;
}

/* Control Panels */
.control-panel {
    position: fixed;
    bottom: 60px;
    right: 8px;
    width: 360px;
    background: rgba(30, 30, 30, 0.98);
    backdrop-filter: blur(40px);
    border-radius: 12px;
    display: none;
    z-index: 2000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideUp 0.2s ease-out;
}

.panel-content {
    padding: 20px;
}

.panel-header {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #fff;
    margin-bottom: 10px;
}

.volume-control input[type="range"] {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
}

.volume-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: #00d4ff;
    border-radius: 50%;
    cursor: pointer;
}

.volume-control input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #00d4ff;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.volume-percentage {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    text-align: center;
}

.network-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.network-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    color: #fff;
    border: 1px solid transparent;
    position: relative;
}

.network-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
    border-color: rgba(0, 212, 255, 0.2);
}

.network-item.active {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(0, 180, 255, 0.1));
    border: 1px solid rgba(0, 212, 255, 0.4);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.2);
}

.network-item > div {
    flex: 1;
}

.network-name {
    font-size: 14px;
    margin-bottom: 4px;
}

.network-status {
    font-size: 12px;
    opacity: 0.6;
}

#calendar {
    margin-top: 15px;
    color: #fff;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-top: 10px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

.calendar-day:hover {
    background: rgba(255, 255, 255, 0.1);
}

.calendar-day.today {
    background: #00d4ff;
    color: #000;
    font-weight: 600;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 8px;
    text-align: center;
    font-weight: 600;
    opacity: 0.7;
    font-size: 12px;
}

/* Context Menu */
.context-menu {
    position: fixed;
    background: rgba(30, 30, 30, 0.98);
    backdrop-filter: blur(40px);
    border-radius: 8px;
    padding: 6px;
    display: none;
    z-index: 9999;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 200px;
}

.context-item {
    padding: 10px 14px;
    color: #fff;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    transition: background 0.2s;
}

.context-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.context-item i {
    width: 16px;
    text-align: center;
    opacity: 0.7;
}

.context-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 6px 0;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
    background-clip: padding-box;
}

/* Responsive */
@media (max-width: 768px) {
    .start-menu {
        width: calc(100% - 16px);
        height: 600px;
    }
    
    .apps-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .control-panel {
        width: calc(100% - 16px);
        right: 8px;
    }
}