/* Windows 95/98 Theme */
:root {
    --win95-gray: #c0c0c0;
    --win95-dark-gray: #808080;
    --win95-light-gray: #dfdfdf;
    --win95-darkest: #000000;
    --win95-white: #ffffff;
    --win95-blue: #000080;
    --win95-blue-title: #0000aa;
    --win95-teal: #008080;
    --win95-border-light: #ffffff;
    --win95-border-dark: #808080;
    --win95-border-darkest: #000000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'VT323', 'MS Sans Serif', Arial, sans-serif;
    overflow: hidden;
    cursor: default;
    user-select: none;
}

/* Desktop */
.desktop {
    width: 100vw;
    height: 100vh;
    background: var(--win95-teal);
    position: relative;
    overflow: hidden;
}

/* Tiled Background Pattern */
.desktop::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(0,0,0,.02) 35px, rgba(0,0,0,.02) 70px);
    pointer-events: none;
}

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

.desktop-icon {
    width: 80px;
    text-align: center;
    cursor: pointer;
    padding: 5px;
}

.desktop-icon:active {
    filter: brightness(0.9);
}

.icon-image {
    font-size: 48px;
    margin-bottom: 5px;
    filter: drop-shadow(1px 1px 0 rgba(0,0,0,0.3));
}

.icon-label {
    color: white;
    font-size: 14px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    word-wrap: break-word;
}

/* Taskbar */
.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: var(--win95-gray);
    border-top: 2px solid var(--win95-border-light);
    display: flex;
    align-items: center;
    padding: 2px 4px;
    z-index: 10000;
}

.start-button {
    height: 32px;
    padding: 0 8px;
    background: var(--win95-gray);
    border: 2px outset var(--win95-gray);
    font-family: 'VT323', Arial;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.start-button img {
    width: 20px;
    height: 20px;
}

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

.taskbar-divider {
    width: 2px;
    height: 32px;
    background: var(--win95-border-dark);
    margin: 0 4px;
}

.taskbar-items {
    flex: 1;
    display: flex;
    gap: 4px;
    overflow-x: auto;
}

.taskbar-item {
    height: 32px;
    padding: 0 12px;
    background: var(--win95-gray);
    border: 2px outset var(--win95-gray);
    display: flex;
    align-items: center;
    font-size: 14px;
    cursor: pointer;
    max-width: 200px;
    overflow: hidden;
    white-space: nowrap;
}

.taskbar-item.active {
    border-style: inset;
}

.system-tray {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 8px;
    border: 1px inset var(--win95-gray);
    height: 28px;
    margin-left: 4px;
}

.clock {
    font-size: 14px;
    min-width: 60px;
    text-align: center;
}

.dialup-indicator {
    font-size: 18px;
    cursor: pointer;
    animation: dialupBlink 1s infinite;
}

@keyframes dialupBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

/* Windows */
.window {
    position: absolute;
    background: var(--win95-gray);
    border: 2px outset var(--win95-gray);
    box-shadow: 2px 2px 8px rgba(0,0,0,0.3);
    min-width: 400px;
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.window.draggable {
    cursor: move;
}

.window-title-bar {
    background: linear-gradient(90deg, var(--win95-blue) 0%, var(--win95-blue-title) 100%);
    color: white;
    padding: 3px 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: bold;
    cursor: move;
}

.window-title {
    flex: 1;
    padding-left: 5px;
}

.window-controls {
    display: flex;
    gap: 2px;
}

.window-button {
    width: 20px;
    height: 20px;
    background: var(--win95-gray);
    border: 2px outset var(--win95-gray);
    font-family: 'VT323', Arial;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

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

.window-button.close:hover {
    background: #ff0000;
    color: white;
}

.window-menubar {
    background: var(--win95-gray);
    border-bottom: 1px solid var(--win95-border-dark);
    padding: 3px 8px;
    display: flex;
    gap: 15px;
    font-size: 14px;
}

.window-menubar span {
    cursor: pointer;
    padding: 2px 8px;
}

.window-menubar span:hover {
    background: var(--win95-blue);
    color: white;
}

.window-content {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: white;
}

/* Dial-up Connection Window */
.dialup-connection {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
}

.dialup-content {
    background: var(--win95-gray) !important;
    min-width: 400px;
}

.dialup-animation {
    text-align: center;
    padding: 20px;
}

.dialup-modem {
    margin: 20px auto;
    width: 200px;
    height: 60px;
    background: #333;
    border: 3px outset #555;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modem-lights {
    display: flex;
    gap: 15px;
}

.light {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #1a1a1a;
    border: 2px inset #000;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.5);
}

.light.active {
    background: #00ff00;
    box-shadow: 0 0 10px #00ff00, inset 0 0 5px rgba(255,255,255,0.5);
    animation: lightBlink 0.5s infinite;
}

@keyframes lightBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.dialup-status {
    font-size: 16px;
    margin: 15px 0;
    min-height: 24px;
}

.progress-bar {
    width: 100%;
    height: 24px;
    background: white;
    border: 2px inset var(--win95-gray);
    margin: 15px 0;
}

.progress-fill {
    height: 100%;
    background: var(--win95-blue);
    width: 0%;
    transition: width 0.3s ease;
}

.dialup-messages {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    text-align: left;
    padding: 10px;
    background: white;
    border: 2px inset var(--win95-gray);
    height: 120px;
    overflow-y: auto;
}

.dialup-messages div {
    margin: 2px 0;
}

/* Guest Info Section */
.guest-info {
    text-align: center;
}

.guest-info h2 {
    color: var(--win95-blue);
    margin-bottom: 15px;
    font-size: 28px;
}

.guest-info p {
    margin: 10px 0;
    font-size: 18px;
    line-height: 1.6;
}

.guest-name {
    font-size: 24px;
    color: var(--win95-blue-title);
    font-weight: bold;
    margin: 15px 0;
}

/* Windows 95 Style Elements */
.win95-button {
    background: var(--win95-gray);
    border: 2px outset var(--win95-gray);
    padding: 8px 20px;
    font-family: 'VT323', Arial;
    font-size: 16px;
    cursor: pointer;
    margin: 10px 5px;
}

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

.win95-hr {
    border: none;
    border-top: 1px solid var(--win95-border-dark);
    border-bottom: 1px solid var(--win95-border-light);
    margin: 15px 0;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.info-table td {
    padding: 8px;
    font-size: 16px;
}

.info-table td:first-child {
    width: 30%;
    color: var(--win95-blue);
}

/* QR Code Section */
.qr-section {
    text-align: center;
    margin-top: 20px;
}

.qr-section h3 {
    color: var(--win95-blue);
    margin-bottom: 10px;
}

#qrcode {
    display: inline-block;
    padding: 15px;
    background: white;
    border: 3px outset var(--win95-gray);
    margin: 15px 0;
}

/* Notepad Style */
.notepad-content {
    background: white !important;
    font-family: 'Courier New', monospace;
    padding: 10px;
}

.notepad-text {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Explorer/Gallery Style */
.explorer-content {
    background: white !important;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    padding: 10px;
}

.thumbnail {
    text-align: center;
    cursor: pointer;
    padding: 10px;
    border: 2px solid transparent;
}

.thumbnail:hover {
    background: var(--win95-blue);
    border: 2px dotted white;
}

.thumbnail img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border: 2px inset var(--win95-gray);
}

.thumbnail-label {
    margin-top: 5px;
    font-size: 12px;
    color: var(--win95-blue-title);
}

.thumbnail:hover .thumbnail-label {
    color: white;
}

/* Scrollbar Styling (Windows 95 style) */
::-webkit-scrollbar {
    width: 18px;
    height: 18px;
}

::-webkit-scrollbar-track {
    background: var(--win95-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--win95-light-gray);
    border: 2px outset var(--win95-gray);
}

::-webkit-scrollbar-thumb:active {
    border-style: inset;
}

::-webkit-scrollbar-corner {
    background: var(--win95-gray);
}

/* Responsive */
@media (max-width: 768px) {
    .window {
        min-width: 90vw;
        max-width: 95vw;
        left: 50% !important;
        transform: translateX(-50%);
    }
    
    .desktop-icons {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .desktop-icon {
        width: 70px;
    }
    
    .icon-image {
        font-size: 36px;
    }
    
    .icon-label {
        font-size: 12px;
    }
    
    .image-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

/* Cursor */
body {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="white" stroke="black" stroke-width="1" d="M3 3 L3 21 L9 15 L13 21 L15 20 L11 14 L18 14 Z"/></svg>'), auto;
}

button, .desktop-icon {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="white" stroke="black" stroke-width="1" d="M8 3 L8 11 L4 8 L3 9 L10 16 L11 16 L11 8 L15 11 L16 10 Z M8 17 L16 17 L16 18 L8 18 Z"/></svg>'), pointer;
}
