* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    user-select: none;
}

body,
html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: black;
}

#fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    cursor: pointer;
}

.overlay-content {
    text-align: center;
}

.overlay-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.cta-button {
    background: #007aff;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.4);
}

.cta-button:hover {
    background: #0063ce;
    transform: scale(1.05);
}

.cta-button:active {
    transform: scale(0.98);
}

.desktop {
    width: 100%;
    height: 100%;
    background: url('/static/images/wallpaper.png') no-repeat center center fixed;
    background-size: cover;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Menu Bar */
.menu-bar {
    height: 30px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    font-size: 13px;
    color: white;
    font-weight: 500;
    z-index: 1000;
}

.left-section {
    display: flex;
    align-items: center;
}

.menu-item {
    padding: 0 10px;
    height: 100%;
    display: flex;
    align-items: center;
    cursor: default;
    position: relative;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.3);
}

.menu-item .dropdown {
    display: none;
    position: absolute;
    top: 30px;
    left: 0;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    padding: 5px;
    min-width: 200px;
    z-index: 2000;
}

.menu-item.active .dropdown {
    display: block;
}

.dropdown div {
    padding: 3px 15px;
    border-radius: 4px;
    color: #333;
    font-size: 13px;
}

.dropdown div:hover {
    background: #007aff;
    color: white;
}

.dropdown hr {
    border: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin: 5px 0;
}

.apple-logo-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    /* Ensure it's white if the source is black */
}

.app-name {
    font-weight: 700;
}

/* Desktop Icons */
.desktop-icons {
    position: absolute;
    top: 50px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.icon {
    width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: transform 0.2s;
}

.icon img {
    width: 60px;
    height: 60px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    border-radius: 12px;
}

.icon span {
    color: white;
    font-size: 12px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    text-align: center;
}

.icon:hover {
    transform: scale(1.05);
}

/* Dock */
.dock-container {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
}

.dock {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 0.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 8px;
    display: flex;
    align-items: flex-end;
    gap: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.dock-item {
    width: 50px;
    height: 50px;
    transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
    cursor: pointer;
    position: relative;
}

.dock-item img {
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

.dock-item:hover {
    transform: scale(1.5) translateY(-10px);
    margin: 0 10px;
}

.dock-item .tooltip {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.dock-item:hover .tooltip {
    opacity: 1;
}

/* Windows */
.window {
    position: absolute;
    width: 600px;
    height: 400px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: openWindow 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes openWindow {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.window-header {
    height: 40px;
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: move;
}

.window-controls {
    position: absolute;
    left: 15px;
    display: flex;
    gap: 8px;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
}

.close {
    background: #ff5f56;
}

.minimize {
    background: #ffbd2e;
}

.maximize {
    background: #27c93f;
}

.window-title {
    font-size: 14px;
    font-weight: 600;
    color: #444;
}

.window-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    font-size: 14px;
    color: #333;
}

/* Safari/Browser Styling */
.safari-browser {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.safari-toolbar {
    height: 40px;
    background: #f1f1f1;
    display: flex;
    align-items: center;
    padding: 0 10px;
    gap: 10px;
    border-bottom: 1px solid #ccc;
}

.safari-toolbar input {
    flex: 1;
    padding: 4px 12px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 13px;
    background: white;
}

.safari-content {
    flex: 1;
    background: white;
}

.safari-content iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Minesweeper Styling */
.minesweeper-window {
    width: 340px !important;
    height: 440px !important;
}

.minesweeper-game {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.minesweeper-stats {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 10px;
    background: #ddd;
    border-radius: 4px;
    font-family: monospace;
    font-weight: bold;
}

.minesweeper-grid {
    display: grid;
    grid-template-columns: repeat(10, 30px);
    grid-template-rows: repeat(10, 30px);
    gap: 1px;
    background: #999;
    border: 2px solid #555;
    margin: 0 auto;
}

.cell {
    width: 30px;
    height: 30px;
    background: #ccc;
    border: 3px outset #eee;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    cursor: pointer;
    font-family: monospace;
}

.cell.revealed {
    border: 1px solid #999;
    background: #bbb;
}

.cell.mine {
    background: red;
}

.cell.flag::after {
    content: '🚩';
}

/* FreeCell Styling */
.freecell-window {
    width: 850px !important;
    height: 600px !important;
}

.freecell-game {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #2e7d32;
    padding: 20px;
    border-radius: 8px;
    color: white;
}

.freecell-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.freecell-slots,
.freecell-foundations {
    display: flex;
    gap: 10px;
}

.slot,
.foundation,
.tableau-pile {
    width: 80px;
    height: 120px;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    position: relative;
}

.freecell-tableau {
    display: flex;
    justify-content: space-between;
}

.card {
    width: 80px;
    height: 120px;
    background: white;
    border-radius: 8px;
    border: 1px solid #ccc;
    position: absolute;
    color: black;
    display: flex;
    flex-direction: column;
    padding: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    font-weight: bold;
}

.card.red {
    color: #d32f2f;
}

.card.black {
    color: #1a1a1a;
}

.card .card-rank {
    font-size: 16px;
    margin: 0;
}

.card .card-suit {
    font-size: 20px;
    align-self: center;
    margin-top: 15px;
}