/* RESET */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* BOOT SCREEN */
#boot-screen {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, #1a1a1a 0%, #000 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    animation: boot-fadeout 0.8s ease forwards;
    animation-delay: 1.4s;
}

.boot-center {
    text-align: center;
    animation: boot-fadein 0.8s ease;
}

.boot-logo {
    font-size: 42px;
    font-weight: 600;
    color: white;
    letter-spacing: 2px;
    margin-bottom: 30px;
    text-shadow: 0 0 12px rgba(255,255,255,0.4);
    animation: boot-glow 2s infinite ease-in-out;
}

.boot-loader {
    width: 120px;
    height: 4px;
    background: rgba(255,255,255,0.15);
    border-radius: 4px;
    overflow: hidden;
    margin: 0 auto;
    position: relative;
}

.boot-loader::before {
    content: "";
    position: absolute;
    inset: 0;
    width: 40%;
    background: white;
    border-radius: 4px;
    animation: boot-load 1.2s infinite ease-in-out;
}

/* Boot animations */
@keyframes boot-load {
    0% { left: -40%; }
    50% { left: 60%; }
    100% { left: 120%; }
}

@keyframes boot-glow {
    0%, 100% { text-shadow: 0 0 12px rgba(255,255,255,0.4); }
    50% { text-shadow: 0 0 22px rgba(255,255,255,0.8); }
}

@keyframes boot-fadein {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes boot-fadeout {
    to { opacity: 0; visibility: hidden; }
}

/* SHELL */
#dtnos-shell {
    position: fixed;
    inset: 0;
    background: url('wallpaper.jpg') center/cover no-repeat;
    display: flex;
    flex-direction: column;
}

/* TOPBAR */
#topbar {
    height: 24px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
}

/* DESKTOP */
#desktop {
    flex: 1;
    position: relative;
}

/* DOCK */
#dock {
    height: 80px;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: flex-end;
    gap: 22px;
    padding: 0 20px 10px 20px;
    justify-content: center;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.dock-icon img {
    width: 54px;
    height: 54px;
    transition: transform 0.25s;
    cursor: pointer;
    border-radius: 12px;
}

.dock-icon img:hover {
    transform: scale(1.3);
}

/* DOCK BOUNCE */
.dock-bounce {
    animation: dockBounce 0.6s ease;
}

@keyframes dockBounce {
    0%   { transform: translateY(0); }
    30%  { transform: translateY(-18px); }
    60%  { transform: translateY(6px); }
    100% { transform: translateY(0); }
}

/* MINI WINDOWS */
.dock-miniwindow {
    background: rgba(255,255,255,0.15);
    padding: 6px 12px;
    border-radius: 6px;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    margin-left: 10px;
    backdrop-filter: blur(6px);
    transition: background 0.2s, transform 0.2s;
}

.dock-miniwindow:hover {
    background: rgba(255,255,255,0.25);
    transform: scale(1.1);
}

/* WINDOWS */
.window {
    position: absolute;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.2);
    box-shadow:
        0 8px 20px rgba(0,0,0,0.25),
        0 2px 6px rgba(0,0,0,0.15);
}

/* TITLEBAR */
.window-titlebar {
    height: 28px;
    background: #ececec;
    display: flex;
    align-items: center;
    padding-left: 10px;
    cursor: move;
}

.window-controls {
    display: flex;
    gap: 8px;
}

.window-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
}

.window-btn.close  { background: #ff5f57; }
.window-btn.min    { background: #ffbd2e; }
.window-btn.max    { background: #28c840; }

.window-title {
    margin-left: 10px;
    font-size: 13px;
    color: #333;
}

/* CONTENT AREA */
.window-content {
    position: absolute;
    top: 28px;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

.window-content iframe {
    width: 100%;
    height: 100%;
    border: 0;
    overflow: hidden;
}

/* RESIZE HANDLES */
.resize-right {
    position: absolute;
    right: 0;
    top: 0;
    width: 6px;
    height: 100%;
    cursor: ew-resize;
}

.resize-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 6px;
    cursor: ns-resize;
}

.resize-corner {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 14px;
    height: 14px;
    cursor: nwse-resize;
}

/* SAVE POPUP */
.save-popup {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
}

.popup-window {
    background: #fff;
    padding: 20px;
    width: 320px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.popup-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.popup-text {
    font-size: 14px;
    margin-bottom: 20px;
}

.popup-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.popup-buttons button {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
    background: #e6e6e6;
    cursor: pointer;
}

.popup-buttons button:hover {
    background: #dcdcdc;
}

.dock-miniicon img {
    width: 32px;
    height: 32px;
    opacity: 0.7;
    transition: opacity 0.2s, transform 0.2s;
    cursor: pointer;
}

.dock-miniicon img:hover {
    opacity: 1;
    transform: scale(1.15);
}
/* MINI ICON WITH GLOW */
.dock-miniicon {
    position: relative;
}

.dock-miniicon img {
    width: 32px;
    height: 32px;
    opacity: 0.8;
    transition: opacity 0.2s, transform 0.2s;
    cursor: pointer;
    border-radius: 8px;
}

/* Glow ring */
.dock-miniicon::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: #4af;
    border-radius: 50%;
    box-shadow: 0 0 8px #4af;
    opacity: 1;
    transition: opacity 0.2s;
}

/* Hover effect */
.dock-miniicon img:hover {
    opacity: 1;
    transform: scale(1.15);
}
/* MINI ICON ANIMATION */
.dock-miniicon {
    position: relative;
    animation: miniIconAppear 0.35s ease-out;
}

@keyframes miniIconAppear {
    0% {
        opacity: 0;
        transform: scale(0.6) translateY(10px);
    }
    60% {
        opacity: 1;
        transform: scale(1.15) translateY(0);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}
