.window {
    position: absolute;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    user-select: none;
    transition: box-shadow 0.2s ease, opacity 0.15s ease;
}

.window.active-window {
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
    border-color: rgba(74, 93, 78, 0.3);
}

.window.maximized {
    top: 32px !important;
    left: 0 !important;
    width: 100vw !important;
    height: calc(100vh - 32px - 80px) !important;
    border-radius: 0;
}

.window-header {
    height: 38px;
    background: rgba(240, 242, 245, 0.85);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    padding: 0 14px;
    cursor: grab;
    position: relative;
}

.window-title {
    flex: 1;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark, #1e293b);
    pointer-events: none;
}

.window-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    z-index: 2;
}

.win-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    padding: 0;
}

.win-close {
    background: #ef4444;
}

.win-minimize {
    background: #f59e0b;
}

.win-maximize {
    background: #10b981;
}

.window-body {
    flex: 1;
    overflow: auto;
    position: relative;
}

.calc-container {
    padding: 18px;
    background: rgba(248, 249, 250, 0.96);
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-sizing: border-box;
}

/* Screen */
.calc-screen {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    padding: 14px 16px;
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 80px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.calc-history {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    min-height: 18px;
}

.calc-main {
    font-family: var(--font-mono);
    font-size: 26px;
    font-weight: 700;
    color: var(--text-dark);
    word-break: break-all;
}

/* Keypad Grid */
.calc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    flex: 1;
}

.calc-btn {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.calc-btn:hover {
    background: var(--olive-light);
    transform: translateY(-2px);
    border-color: rgba(74, 93, 78, 0.2);
}

.calc-btn:active {
    transform: translateY(0);
}

/* Button Variants */
.calc-btn.op {
    background: #f1f5f9;
    color: var(--olive-primary);
}

.calc-btn.action {
    background: #fef2f2;
    color: #dc2626;
}

.calc-btn.equals {
    background: var(--olive-primary);
    color: #ffffff;
    font-weight: 700;
}

.calc-btn.equals:hover {
    background: var(--olive-hover);
}

.folder-svg {
    width: 20px;
    height: 20px;
    object-fit: contain;
    pointer-events: none;
}

.gallery-container {
    display: flex;
    height: 100%;
    background: rgba(248, 249, 250, 0.96);
    position: relative;
}

.gallery-sidebar {
    width: 200px;
    background: #ffffff;
    border-right: 1px solid rgba(0, 0, 0, 0.06);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gallery-sidebar-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.gallery-folder-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    background: #fafafa;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s ease;
}

.gallery-folder-btn:hover {
    background: var(--olive-light);
    border-color: rgba(74, 93, 78, 0.2);
}

.gallery-folder-btn.active {
    background: var(--olive-light);
    border-color: var(--olive-primary);
}

.folder-icon {
    font-size: 18px;
}

.folder-info {
    display: flex;
    flex-direction: column;
}

.folder-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
}

.folder-count {
    font-size: 11px;
    color: var(--text-muted);
}

.gallery-main {
    flex: 1;
    padding: 18px;
    overflow-y: auto;
}

.gallery-grid {
    column-count: 3;
    column-gap: 14px;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 14px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease(0.16, 1, 0.3, 1);
}

.calc-screen:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
}

.gallery-lightbox {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(12px);
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    transition: opacity 0.2s ease;
}

.gallery-lightbox.hidden {
    opacity: 0;
    pointer-events: none;
}

#lightbox-img {
    max-width: 90%;
    max-height: 80%;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    object-fit: contain;
}

.lighbox-caption {
    margin-top: 12px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-mono);
}

.lightbox-close-btn {
    position: absolute;
    top: 16px;
    right: 20px;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
}

.lightbox-close-btn:hover {
    color: #f87171;
}

.folder-svg {
    width: 20px;
    height: 20px;
    object-fit: contain;
    pointer-events: none;
}

.player-container {
    display: flex;
    height: 100%;
    background: rgba(248, 249, 250, 0.95);
    color: var(--text-dark);
}

.player-main {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-right: 1px solid rgba(0, 0, 0, 0.06);
}

.album-art-wrap {
    width: 140px;
    height: 140px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    margin-bottom: 16px;
}

.album-art-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.track-meta {
    text-align: center;
    margin-bottom: 16px;
}

.track-meta h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
}

.track-meta p {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.progress-wrap {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    margin-bottom: 16px;
}

.progress-wrap input[type="range"] {
    flex: 1;
    accent-color: var(--olive-primary);
    cursor: pointer;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ctrl-btn {
    background: var(--olive-light);
    border: none;
    color: var(--olive-primary);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.ctrl-btn:hover {
    background: var(--olive-primary);
    color: #fff;
    transform: scale(1.08);
}

.play-btn {
    width: 48px;
    height: 48px;
    font-size: 18px;
    background: var(--olive-primary);
    color: #fff;
}

.player-playlist {
    width: 240px;
    padding: 18px;
    overflow-y: auto;
    background: #ffffff;
}

.player-playlist h4 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

#playlist-list {
    list-style: none;
}

.playlist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.playlist-item:hover {
    background: var(--olive-light);
}

.playlist-item.active {
    background: var(--olive-light);
    color: var(--olive-primary);
    font-weight: 700;
}

.track-num {
    font-family: var(--font-mono);
    font-size: 11px;
    opacity: 0.5;
}

.player-svg {
    width: 18px;
    height: 18px;
    object-fit: contain;
    pointer-events: none;
}

.terminal-container {
    background: #121614;
    color: #e2e8f0;
    font-family: var(--font-mono);
    font-size: 13px;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 16px;
    line-height: 1.6;
}

.terminal-output {
    flex: 1;
    overflow-y: auto;
}

.term-line {
    margin-bottom: 6px;
}

.term-line.highlight {
    color: #82a088;
    font-weight: bold;
}

.term-line.success {
    color: #4ade80;
}

.term-line.info {
    color: #94a3b8;
}

.term-line.user-cmd {
    color: #f1f5f9;
    font-weight: bold;
}

.term-line.error {
    color: #f87171;
}

.terminal-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.terminal-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.terminal-input-row .prompt {
    color: #4a5d4e;
    font-weight: bold;
}

.term-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-family: var(--font-mono);
    font-size: 13px;
}