/* Windows CSS - Windows XP Style */

/* Windows Container */
#windows-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: var(--taskbar-height);
    pointer-events: none;
}

#windows-container > * {
    pointer-events: auto;
}

/* Window Styles */
.window {
    position: absolute;
    background: #ECE9D8;
    border: 1px solid #0054E3;
    border-radius: 6px 6px 0 0;
    box-shadow: 
        0 0 0 1px #003C74,
        2px 2px 5px rgba(0, 0, 0, 0.3),
        inset 1px 1px 0 rgba(255, 255, 255, 0.5);
    display: flex;
    flex-direction: column;
    min-width: 200px;
    min-height: 150px;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.2s, transform 0.2s;
}

.window.active {
    z-index: 1000;
}

.window.active .title-bar {
    background: linear-gradient(
        to bottom,
        #0058E6 0%,
        #3A93FF 3%,
        #288DFF 6%,
        #127CE7 10%,
        #036FE2 88%,
        #0262D9 90%,
        #003FC7 100%
    );
}

.window.maximized {
    border-radius: 0;
    box-shadow: none;
}

/* Title Bar */
.title-bar {
    background: linear-gradient(
        to bottom,
        #7B9FC4 0%,
        #6B8FB5 3%,
        #5A7FA6 6%,
        #4A6F96 10%,
        #3A5F86 88%,
        #2A4F76 90%,
        #1A3F66 100%
    );
    color: white;
    padding: 3px 4px;
    border-radius: 5px 5px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
    cursor: default;
    font-size: 13px;
    font-weight: bold;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

.window.maximized .title-bar {
    border-radius: 0;
}

.title-bar-text {
    display: flex;
    align-items: center;
    flex: 1;
    overflow: hidden;
}

.title-bar-text span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.title-bar-icon {
    width: 16px;
    height: 16px;
    margin-right: 4px;
    flex-shrink: 0;
}

/* Title Bar Controls */
.title-bar-controls {
    display: flex;
    gap: 2px;
    margin-left: 8px;
}

.title-bar-controls button {
    width: 21px;
    height: 21px;
    border: 1px solid #316AC5;
    border-radius: 0;
    position: relative;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(
        to bottom,
        #C6D5F0 0%,
        #8BB4E8 50%,
        #5592D7 100%
    );
    box-shadow: none;
}

.title-bar-controls button:hover {
    background: linear-gradient(
        to bottom,
        #D6E5FF 0%,
        #9BC4F8 50%,
        #65A2E7 100%
    );
    border-color: #2A5BB8;
}

.title-bar-controls button:active {
    background: linear-gradient(
        to bottom,
        #7BA7E3 0%,
        #4D85CA 50%,
        #2D6CB8 100%
    );
    border-color: #1A4A9A;
}

/* Window Control Icons */
.minimize-btn::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: url('../images/Windows XP High Resolution Icon Pack/Windows XP Icons/Minimize.png') no-repeat center;
    background-size: 16px 16px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.maximize-btn::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: url('../images/Windows XP High Resolution Icon Pack/Windows XP Icons/Maximize.png') no-repeat center;
    background-size: 16px 16px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.window.maximized .maximize-btn::before {
    background: url('../images/Windows XP High Resolution Icon Pack/Windows XP Icons/Restore.png') no-repeat center;
    background-size: 16px 16px;
}

.close-btn::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: url('../images/Windows XP High Resolution Icon Pack/Windows XP Icons/Exit.png') no-repeat center;
    background-size: 16px 16px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.close-btn:hover {
    background: linear-gradient(
        to bottom,
        #F5D6D6 0%,
        #F0A4A4 50%,
        #E81123 100%
    ) !important;
    border-color: #C20E20 !important;
}

.close-btn:active {
    background: linear-gradient(
        to bottom,
        #D40E20 0%,
        #B00A1A 50%,
        #900815 100%
    ) !important;
    border-color: #800710 !important;
}


/* Window Body */
.window-body {
    flex: 1;
    background: white;
    overflow: auto;
    position: relative;
}

/* Menu Bar */
.menu-bar {
    background: #ECE9D8;
    border-bottom: 1px solid #D4D0C8;
    display: flex;
    padding: 2px 0;
    font-size: 11px;
}

.menu-item {
    padding: 4px 8px;
    cursor: pointer;
    user-select: none;
}

.menu-item:hover {
    background: #316AC5;
    color: white;
}

/* Status Bar */
.status-bar {
    background: #ECE9D8;
    border-top: 1px solid #D4D0C8;
    padding: 2px 4px;
    font-size: 11px;
    display: flex;
    gap: 10px;
}

.status-bar span {
    padding: 0 4px;
    border-left: 1px solid #D4D0C8;
}

.status-bar span:first-child {
    border-left: none;
}

/* Toolbar */
.toolbar {
    background: #ECE9D8;
    border-bottom: 1px solid #D4D0C8;
    padding: 4px;
    display: flex;
    gap: 4px;
}

.toolbar button {
    padding: 4px 8px;
    font-size: 11px;
}

/* Form Controls */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 11px;
}

.form-control {
    width: 100%;
    padding: 4px;
    border: 1px solid #7F9DB9;
    background: white;
    font-family: 'Tahoma', sans-serif;
    font-size: 11px;
}

.form-control:focus {
    outline: 1px solid #0054E3;
    outline-offset: -1px;
}

textarea.form-control {
    resize: vertical;
}

/* Buttons */
.submit-btn,
.view-btn,
.filter-btn {
    background: linear-gradient(
        to bottom,
        #FFFFFF 0%,
        #ECE9D8 100%
    );
    border: 1px solid #003C74;
    border-radius: 3px;
    padding: 4px 12px;
    font-size: 11px;
    cursor: pointer;
    min-width: 75px;
}

.submit-btn:hover,
.view-btn:hover,
.filter-btn:hover {
    background: linear-gradient(
        to bottom,
        #FFFFFF 0%,
        #E3E0D0 100%
    );
}

.submit-btn:active,
.view-btn:active,
.filter-btn:active {
    background: linear-gradient(
        to bottom,
        #E3E0D0 0%,
        #FFFFFF 100%
    );
}

.filter-btn.active {
    background: #316AC5;
    color: white;
    border-color: #316AC5;
}

/* Tabs */
.skills-tabs,
.tabs {
    display: flex;
    border-bottom: 1px solid #D4D0C8;
    background: #ECE9D8;
}

.tab-btn {
    padding: 6px 12px;
    background: none;
    border: 1px solid transparent;
    border-bottom: none;
    cursor: pointer;
    font-size: 11px;
    margin-bottom: -1px;
}

.tab-btn:hover {
    background: #F1EFE2;
}

.tab-btn.active {
    background: white;
    border-color: #D4D0C8;
    border-bottom-color: white;
}

.tab-content {
    display: none;
    padding: 15px;
}

.tab-content.active {
    display: block;
}

/* Skill Bars */
.skill-item {
    margin-bottom: 10px;
}

.skill-name {
    display: block;
    margin-bottom: 4px;
    font-size: 11px;
}

.skill-bar {
    height: 16px;
    background: #ECE9D8;
    border: 1px solid #7F9DB9;
    position: relative;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(
        to bottom,
        #4A94F6 0%,
        #316AC5 100%
    );
    transition: width 0.5s ease;
}

/* Framework Grid */
.framework-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.framework-card {
    padding: 10px;
    text-align: center;
    background: #ECE9D8;
    border: 1px solid #D4D0C8;
    border-radius: 3px;
    font-size: 11px;
    cursor: pointer;
}

.framework-card:hover {
    background: #316AC5;
    color: white;
    border-color: #316AC5;
}

/* Social Links */
.social-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.social-link {
    color: #0054E3;
    text-decoration: none;
    font-size: 11px;
}

.social-link:hover {
    text-decoration: underline;
}

/* PDF Viewer */
.resume-viewer,
.pdf-viewer {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.pdf-toolbar {
    background: #ECE9D8;
    border-bottom: 1px solid #D4D0C8;
    padding: 4px;
    display: flex;
    gap: 4px;
}

.pdf-btn {
    padding: 4px 8px;
    font-size: 11px;
    background: none;
    border: 1px solid transparent;
    cursor: pointer;
}

.pdf-btn:hover {
    background: #F1EFE2;
    border-color: #D4D0C8;
}

.pdf-frame {
    flex: 1;
    border: none;
    background: white;
}

/* IE Browser */
.ie-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ie-toolbar {
    background: #ECE9D8;
    border-bottom: 1px solid #D4D0C8;
    padding: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ie-btn {
    padding: 4px 8px;
    font-size: 16px;
    background: none;
    border: 1px solid transparent;
    cursor: pointer;
    min-width: 30px;
}

.ie-btn:hover {
    background: #F1EFE2;
    border-color: #D4D0C8;
}

.ie-address-bar {
    flex: 1;
    padding: 4px;
    border: 1px solid #7F9DB9;
    font-size: 11px;
}

.ie-frame {
    flex: 1;
    border: none;
    background: white;
}

/* Media Player */
.media-player-content {
    background: black;
    color: white;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.player-screen {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.visualizer {
    width: 300px;
    height: 100px;
    background: linear-gradient(
        to bottom,
        #00FF00 0%,
        #00AA00 50%,
        #005500 100%
    );
    opacity: 0.5;
}

.player-controls {
    background: #333;
    padding: 10px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.player-btn {
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.player-info {
    background: #222;
    padding: 10px;
    text-align: center;
    font-size: 12px;
}

/* Paint */
.paint-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.paint-toolbar {
    background: #ECE9D8;
    border-bottom: 1px solid #D4D0C8;
    padding: 4px;
    display: flex;
    gap: 4px;
}

.tool-btn {
    width: 30px;
    height: 30px;
    font-size: 16px;
    background: none;
    border: 1px solid transparent;
    cursor: pointer;
}

.tool-btn:hover {
    background: #F1EFE2;
    border-color: #D4D0C8;
}

.tool-btn.active {
    background: #316AC5;
    border-color: #316AC5;
}

.paint-colors {
    background: #ECE9D8;
    border-bottom: 1px solid #D4D0C8;
    padding: 4px;
    display: flex;
    gap: 4px;
}

.color-swatch {
    width: 20px;
    height: 20px;
    border: 1px solid #000;
    cursor: pointer;
}

.color-swatch:hover {
    border-width: 2px;
}

.paint-canvas {
    flex: 1;
    background: white;
    cursor: crosshair;
}

/* Minesweeper */
.minesweeper-content {
    background: #C0C0C0;
    padding: 10px;
}

.game-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #BDBDBD;
    border: 2px inset #DFDFDF;
    padding: 5px;
    margin-bottom: 10px;
}

.mine-counter,
.timer {
    background: black;
    color: red;
    font-family: 'Digital', monospace;
    font-size: 20px;
    padding: 2px 5px;
    min-width: 40px;
    text-align: center;
}

.new-game-btn {
    font-size: 20px;
    background: #C0C0C0;
    border: 2px outset #DFDFDF;
    cursor: pointer;
    padding: 2px 5px;
}

.new-game-btn:active {
    border-style: inset;
}

.game-board {
    background: #BDBDBD;
    border: 3px inset #DFDFDF;
    display: inline-block;
}

/* Solitaire */
.solitaire-content {
    background: #008000;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.solitaire-toolbar {
    background: #ECE9D8;
    border-bottom: 1px solid #D4D0C8;
    padding: 4px;
}

.solitaire-board {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-placeholder {
    font-size: 48px;
    color: rgba(255, 255, 255, 0.3);
}

/* Recycle Bin */
.recycle-bin-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.file-list {
    flex: 1;
    padding: 20px;
    overflow: auto;
}

.empty-message {
    text-align: center;
    color: #666;
    margin-top: 50px;
}

.empty-message img {
    width: 64px;
    height: 64px;
    opacity: 0.5;
    margin-bottom: 10px;
}

/* Animations */
@keyframes window-open {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes window-close {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.9);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .window {
        max-width: 100vw;
        max-height: calc(100vh - var(--taskbar-height));
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .control-panel-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}