/* Main Styles - Windows 95 Theme */
:root {
    --primary-bg: #c0c0c0;
    --window-bg: #c0c0c0;
    --title-bar-bg: linear-gradient(to right, #000080, #1084d0);
    --border-raised: #fff #808080 #808080 #fff;
    --border-sunken: #808080 #fff #fff #808080;
    --text-primary: #000;
    --text-light: #fff;
    --accent-blue: #000080;
    --font-family: 'Share Tech Mono', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-family);
    user-select: none;
}

body {
    background: #1a1a1a url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="%23222222"/><path d="M0,0 L100,100 M100,0 L0,100" stroke="%23333" stroke-width="1"/></svg>');
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    color: var(--text-primary);
}

/* Mobile-specific body styles */
@media (max-width: 768px) {
    body {
        overflow: auto;
        height: auto;
        min-height: 100vh;
        padding: 10px;
        align-items: flex-start;
    }
}

/* Desktop Icons */
.desktop-icons {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.desktop-icon {
    position: absolute;
    width: 80px;
    padding: 10px 5px;
    text-align: center;
    color: var(--text-light);
    text-shadow: 1px 1px 1px #000;
    cursor: pointer;
    transition: color 0.2s ease;
    pointer-events: auto;
}

.desktop-icon:hover {
    color: #ffcc00;
}

.desktop-icon i {
    font-size: 2.5rem;
    margin-bottom: 5px;
    display: block;
}

.desktop-icon span {
    font-size: 0.8rem;
    display: block;
}

/* Main Window */
.window {
    width: 90vmin;
    height: 80vmin;
    max-width: 900px;
    background: var(--window-bg);
    border: 2px solid #000;
    box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 10;
    transition: all 0.3s ease;
}

.window.fullscreen {
    width: 100%;
    height: 100%;
    max-width: none;
    border: none;
    box-shadow: none;
}

.window.minimized {
    transform: scale(0.1);
    opacity: 0.3;
}

/* Title Bar */
.title-bar {
    background: var(--title-bar-bg);
    color: var(--text-light);
    padding: 0.6rem 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    font-weight: bold;
    border-bottom: 2px solid #000;
    letter-spacing: 1px;
    cursor: move;
}

.title-bar-text {
    font-size: 1.1rem;
    margin: 0;
}

.title-bar-controls {
    display: flex;
    gap: 0.4rem;
}

.window-button {
    width: 1.6rem;
    height: 1.6rem;
    background: var(--window-bg);
    border: 1px solid;
    border-color: var(--border-raised);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s ease;
}

.window-button:hover {
    background: #a0a0a0;
}

.window-button:active {
    border-color: var(--border-sunken);
}

.minimize-btn {
    background: #008080;
    color: var(--text-light);
}

/* Menu Bar */
.menu-bar {
    background: var(--window-bg);
    padding: 0.3rem;
    border-bottom: 1px solid #808080;
    display: flex;
    font-size: 0.85rem;
    font-weight: bold;
}

.menu-item {
    padding: 0.3rem 1rem;
    cursor: pointer;
    border-right: 1px solid #808080;
    transition: all 0.2s ease;
}

.menu-item:last-child {
    border-right: none;
}

.menu-item:hover {
    background: var(--accent-blue);
    color: var(--text-light);
}

/* Content Grid */
.content-grid {
    background: #fff;
    flex: 1;
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 1.5rem;
    place-items: center;
}

/* Icons */
.icon {
    width: 100%;
    height: 100%;
    max-width: 240px;
    max-height: 240px;
    background: var(--window-bg);
    border: 2px solid;
    border-color: var(--border-sunken);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.2);
    text-align: center;
    padding: 1rem;
    text-decoration: none;
    color: inherit;
}

.icon:hover {
    background: #e0e0e0;
    transform: translateY(-4px);
    box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.2);
    border-color: var(--border-raised);
}

.icon:active {
    transform: translateY(-2px);
    border-color: var(--border-sunken);
}

.icon-image {
    width: 80px;
    height: 80px;
    background: var(--accent-blue);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.2rem;
    font-size: 2.2rem;
    color: var(--text-light);
    border: 2px solid #000;
}

.icon-label {
    font-weight: bold;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-primary);
}

.icon-preview {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border: 2px solid #000;
    padding: 0.6rem 1rem;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    font-weight: bold;
    white-space: nowrap;
    color: var(--text-primary);
    z-index: 100;
}

.icon:hover .icon-preview {
    opacity: 1;
}

/* Status Bar */
.status-bar {
    background: var(--window-bg);
    padding: 0.4rem 0.8rem;
    border-top: 1px solid #808080;
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: bold;
}

.status-item {
    display: flex;
    align-items: center;
}

/* Footer */
.awge-footer {
    position: fixed;
    bottom: 20px;
    left: 0;
    width: 100%;
    text-align: center;
    color: #808080;
    font-size: 0.9rem;
    z-index: 2;
}

.awge-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.awge-links a {
    color: #a0a0a0;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s ease;
}

.awge-links a:hover {
    color: var(--accent-blue);
    text-decoration: underline;
}

/* Page Container */
.page-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 100;
    display: none;
    overflow-y: auto;
}

.page-container.active {
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .window {
        width: 95vw;
        height: auto;
        min-height: 80vh;
        max-height: 90vh;
        position: relative;
        margin: 1rem auto;
    }
    
    .content-grid {
        padding: 1rem;
        gap: 1rem;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
        min-height: auto;
    }
    
    .icon {
        max-width: none;
        max-height: 120px;
        padding: 0.8rem;
    }
    
    .icon-image {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        margin-bottom: 0.8rem;
    }
    
    .icon-label {
        font-size: 0.9rem;
    }
    
    /* Hide desktop icons on mobile */
    .desktop-icons {
        display: none;
    }
    
    /* Adjust footer for mobile */
    .awge-footer {
        position: relative;
        margin-top: 2rem;
        padding: 1rem;
    }
    
    .awge-links {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    /* Media player adjustments */
    .media-player {
        position: relative;
        bottom: auto;
        right: auto;
        width: 100%;
        margin: 1rem 0;
    }
}

@media (max-width: 480px) {
    body {
        padding: 5px;
    }
    
    .window {
        width: 100%;
        height: auto;
        min-height: 70vh;
        margin: 0.5rem 0;
        border-radius: 5px;
    }
    
    .title-bar {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .title-bar-text {
        font-size: 0.9rem;
    }
    
    .window-button {
        width: 1.2rem;
        height: 1.2rem;
        font-size: 0.7rem;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 0.8rem;
        padding: 0.8rem;
    }
    
    .icon {
        max-height: 100px;
        padding: 0.6rem;
    }
    
    .icon-image {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        margin-bottom: 0.6rem;
    }
    
    .icon-label {
        font-size: 0.8rem;
    }
    
    .menu-bar {
        padding: 0.2rem;
        font-size: 0.75rem;
    }
    
    .menu-item {
        padding: 0.2rem 0.5rem;
    }
    
    .status-bar {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
    
    /* Enable touch scrolling */
    .window {
        -webkit-overflow-scrolling: touch;
        overflow-y: auto;
    }
}