/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'MS Sans Serif', sans-serif;
    font-size: 11px;
    background: #008080;
    height: 100vh;
    overflow: hidden;
    cursor: default;
    user-select: none;
}

/* ===== DESKTOP & ICONS ===== */
.desktop {
    position: relative;
    width: 100vw;
    height: calc(100vh - 30px);
    padding: 10px;
}

.desktop-icon {
    position: absolute;
    width: 75px;
    height: 75px;
    padding: 5px;
    text-align: center;
    color: white;
    text-shadow: 1px 1px 1px black;
    cursor: pointer;
}

.desktop-icon img {
    width: 48px;
    height: 48px;
    display: block;
    margin: 0 auto 5px;
}

.desktop-icon span {
    display: block;
    font-size: 11px;
    word-wrap: break-word;
}

.desktop-icon:hover {
    background: rgba(0,0,128,0.3);
    border: 1px dotted #fff;
}

/* ===== DESKTOP WEATHER TEXT ===== */
.weather-text {
    position: fixed !important;
    top: 10px !important;
    right: 10px !important;
    left: auto !important;
    color: white;
    text-shadow: 1px 1px 2px black;
    font-family: 'MS Sans Serif', sans-serif;
    font-size: 19px;
    line-height: 1.4;
    cursor: move;
    user-select: none;
    text-align: left;
    white-space: nowrap;
    z-index: 100;
    text-transform: capitalize;
}

.weather-location {
    font-weight: bold;
    font-size: 12px;
    margin-bottom: 2px;
}

.weather-temp {
    font-size: 11px;
    margin-bottom: 2px;
}

.weather-condition {
    font-size: 11px;
    margin-bottom: 8px;
    text-transform: capitalize;
}

.weather-forecast-title {
    font-weight: bold;
    font-size: 11px;
    margin-bottom: 3px;
    text-transform: capitalize;
}

.weather-day {
    font-size: 10px;
    margin-bottom: 1px;
    text-transform: capitalize;
}

.weather-loading {
    font-size: 10px;
    color: #ccc;
    text-transform: capitalize;
}

/* ===== TASKBAR ===== */
.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: #c0c0c0;
    border-top: 2px solid #ffffff;
    display: flex;
    align-items: center;
    padding: 2px;
    z-index: 2000;
}

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

.start-button {
    height: 26px;
    padding: 0 10px;
    background: #c0c0c0;
    border: 1px outset #fff;
    font-weight: bold;
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 11px;
    gap: 5px;
}

.start-button:active {
    border-style: inset;
}

.running-apps {
    display: flex;
    gap: 2px;
    margin-left: 5px;
    height: 100%;
}

.app-button {
    height: 24px;
    border: 1px outset #fff;
    padding: 0 10px;
    min-width: 100px;
    max-width: 150px;
    display: flex;
    align-items: center;
    gap: 5px;
    background: #c0c0c0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    font-size: 11px;
}

.app-button:active {
    border-style: inset;
}

.system-tray {
    border: 1px inset #808080;
    padding: 2px 5px;
    margin-right: 2px;
}

/* ===== ENHANCED START MENU ===== */
.start-menu {
    position: fixed;
    background: #c0c0c0;
    border: 1px outset #fff;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.5);
    display: none;
    z-index: 2001;
    padding: 2px;
    bottom: 32px;
    left: 2px;
    width: 250px;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
}

.start-menu-header {
    background: linear-gradient(90deg, #000080 0%, #0000ff 100%);
    color: white;
    padding: 8px 12px;
    font-weight: bold;
    font-size: 12px;
    margin: -2px -2px 2px -2px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.start-menu-section {
    border-bottom: 1px solid #808080;
    margin-bottom: 2px;
    padding-bottom: 2px;
}

.start-menu-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.start-menu-item {
    padding: 4px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
}

.start-menu-item:hover {
    background: #000080;
    color: white;
}

.start-menu-item img {
    width: 16px;
    height: 16px;
}

.context-menu {
    position: fixed;
    background: #c0c0c0;
    border: 1px outset #fff;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.5);
    display: none;
    z-index: 2001;
    padding: 2px;
    min-width: 140px;
}

.context-menu-item {
    padding: 6px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.context-menu-item:hover {
    background: #000080;
    color: white;
}

/* ===== MODALS (WINDOWS) ===== */
.modal {
    position: fixed;
    top: 50px;
    left: 100px;
    display: none;
    z-index: 1001;
}

.modal-content {
    background: #c0c0c0;
    border: 1px outset #fff;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
}

.modal-header {
    background: #000080;
    color: white;
    padding: 2px 5px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
}

.modal-close {
    background: #c0c0c0;
    border: 1px outset #fff;
    width: 16px;
    height: 14px;
    font-size: 10px;
    cursor: pointer;
    text-align: center;
    line-height: 12px;
}

.modal-close:active {
    border-style: inset;
}

.modal-body {
    padding: 10px;
}

/* Form Elements */
.form-group {
    margin-bottom: 10px;
}

.form-group label {
    display: block;
    margin-bottom: 2px;
}

.form-group input {
    width: 100%;
    padding: 2px;
    border: 1px inset #808080;
    background: white;
}

.button-group {
    display: flex;
    gap: 5px;
    justify-content: flex-end;
    margin-top: 10px;
}

.button {
    padding: 4px 12px;
    background: #c0c0c0;
    border: 1px outset #fff;
    cursor: pointer;
}

.button:active {
    border-style: inset;
}

/* ===== SOLITAIRE GAME STYLES ===== */
.solitaire-modal-content {
    width: 620px;
    height: 500px;
}

.solitaire-body {
    background-color: #008000;
    padding: 10px;
    height: calc(100% - 20px);
    display: flex;
    flex-direction: column;
}

#solitaire-game-board {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.solitaire-top-piles {
    display: flex;
    justify-content: space-between;
}

.solitaire-stock-waste {
    display: flex;
    gap: 10px;
}

.solitaire-foundations {
    display: flex;
    gap: 10px;
}

.solitaire-tableau-piles {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.pile {
    width: 80px;
    height: 110px;
    border: 1px solid #3c7f3c;
    position: relative;
    border-radius: 5px;
    background: rgba(0,0,0,0.1);
}

.card {
    width: 80px;
    height: 110px;
    position: absolute;
    border: 1px solid black;
    border-radius: 5px;
    background-color: white;
    cursor: pointer;
    box-shadow: 1px 1px 3px rgba(0,0,0,0.3);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.card.back {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 110"><rect width="80" height="110" fill="%23800080"/><rect x="5" y="5" width="70" height="100" fill="none" stroke="%23FFD700" stroke-width="2"/></svg>');
}

/* ===== WEATHER APP STYLES ===== */
.weather-modal-content {
    width: 280px;
}

.weather-app .loading {
    padding: 20px;
    text-align: center;
}

.weather-app .current-weather {
    text-align: center;
    padding: 10px;
    border-bottom: 1px solid #808080;
    margin-bottom: 5px;
}

.weather-app .current-location {
    font-weight: bold;
    font-size: 12px;
}

.weather-app .current-temp {
    font-size: 28px;
    font-weight: bold;
    margin: 5px 0;
}

.weather-app .current-condition {
    text-transform: capitalize;
}

.weather-app .weather-icon {
    font-size: 24px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .desktop-icon {
        width: 60px;
        height: 60px;
    }
    
    .desktop-icon img {
        width: 32px;
        height: 32px;
    }
    
    .modal-content {
        max-width: 90vw;
    }
    
    .solitaire-modal-content {
        width: 90vw;
        height: 80vh;
    }
    
    .pile {
        width: 60px;
        height: 85px;
    }
    
    .card {
        width: 60px;
        height: 85px;
    }
}
