/* === Global Reset === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #0a0a1a;
    color: #e0e0e0;
    font-family: 'Segoe UI', 'Helvetica', sans-serif;
    overflow: hidden;
    height: 100vh;
    cursor: default;
}

/* === Desktop === */
.desktop {
    width: 100vw;
    height: 100vh;
    position: fixed;
    background: url('../img/wallpaper.jpg') no-repeat center center;
    background-size: cover;
}

/* === Windows === */
.window {
    position: absolute;
    left: 100px;
    top: 100px;
    width: 400px;
    height: 300px;
    background: rgba(20, 40, 80, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(74, 109, 167, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    box-shadow:
    0 0 15px rgba(0, 78, 255, 0.3),
    inset 0 0 20px rgba(255, 255, 255, 0.1),
    inset 0 0 30px rgba(74, 109, 167, 0.2);
    display: none;
    overflow: hidden;
    z-index: 10;
    min-width: 200px;
    min-height: 150px;
}

.title-bar {
    background: linear-gradient(to right,
                                rgba(30, 80, 160, 0.8),
                                rgba(70, 130, 220, 0.8)
    );
    padding: 5px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    user-select: none;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.close-btn {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.content {
    padding: 15px;
    height: calc(100% - 30px);
    overflow: auto;
}

.resize-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    right: 0;
    bottom: 0;
    background: rgba(74, 109, 167, 0.5);
    cursor: nwse-resize;
    z-index: 11;
}

/* === Icons === */
.icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
    margin: 20px;
    color: white;
    text-shadow: 1px 1px 2px black;
    cursor: pointer;
    position: absolute;
}

.icon img {
    width: 48px;
    height: 48px;
    margin-bottom: 5px;
}

.icon:hover {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

/* === Start Menu === */
.start-orb {
    position: fixed;
    bottom: 5px;
    left: 10px;
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, #4CAF50, #2E7D32);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.7);
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.start-orb:hover {
    background: radial-gradient(circle, #6bb9f0, #1e88e5);
}

.start-menu {
    position: fixed;
    bottom: 50px;
    left: 10px;
    width: 200px;
    background: rgba(20, 40, 80, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(74, 109, 167, 0.5);
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 1000;
    overflow: hidden;
}

.start-menu-header {
    padding: 10px;
    background: linear-gradient(to right,
                                rgba(30, 80, 160, 0.8),
                                rgba(70, 130, 220, 0.8)
    );
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

.start-menu-header img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.start-menu-items {
    padding: 10px;
}

.start-menu-items a {
    display: block;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 3px;
}

.start-menu-items a:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* === Taskbar === */
.taskbar {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 40px;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    z-index: 900;
}

.system-tray {
    color: white;
    margin-right: 20px;
    font-size: 14px;
}

/* === Login Screen === */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center,
                                #0a0a2a,
                                #000013
    );
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.login-window {
    background: rgba(20, 40, 80, 0.9);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    width: 300px;
    border: 1px solid rgba(74, 109, 167, 0.7);
    box-shadow:
    0 0 30px rgba(0, 78, 255, 0.4),
    inset 0 0 20px rgba(74, 109, 167, 0.3);
}

.user-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.login-window h1 {
    margin-bottom: 20px;
    color: white;
}

.login-window input {
    display: block;
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #4a6da7;
    color: white;
    border-radius: 3px;
}

.login-window button {
    background: linear-gradient(to bottom,
                                rgba(60, 150, 250, 0.9),
                                rgba(20, 80, 160, 0.9)
    );
    border: none;
    color: white;
    padding: 10px 20px;
    margin-top: 15px;
    border-radius: 3px;
    cursor: pointer;
    width: 100%;
}

.login-window button:hover {
    background: linear-gradient(to bottom,
                                rgba(90, 180, 255, 0.9),
                                rgba(40, 100, 200, 0.9)
    );
}

/* === Network Popup === */
.network-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9998;
    font-family: 'Courier New', monospace;
}

.network-content {
    text-align: center;
    color: lime;
    max-width: 500px;
    padding: 20px;
}

.network-content h1 {
    margin-bottom: 20px;
    font-size: 24px;
}

.network-content progress {
    width: 100%;
    height: 20px;
    margin: 20px 0;
    background-color: #111;
    border: 1px solid #4a6da7;
}

.network-content progress::-webkit-progress-bar {
    background-color: #111;
}

.network-content progress::-webkit-progress-value {
    background: linear-gradient(to right, #1e88e5, #6bb9f0);
}

/* === Glitch Effects === */
.glitch-text:hover {
    text-shadow:
    1px 0 #ff3366,
    -1px 0 #33ccff,
    0 0 8px rgba(255, 51, 102, 0.5);
    animation: glitch 0.3s infinite alternate;
}

@keyframes glitch {
    0% { transform: translate(1px, 0); }
    25% { transform: translate(-1px, 1px); }
    50% { opacity: 0.8; }
    100% { transform: translate(0, -1px); }
}

/* === CRT Scanlines (Lain Vibe) === */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        to bottom,
        transparent,
        transparent 1px,
        rgba(0, 255, 255, 0.03) 1px,
                                          rgba(0, 255, 255, 0.03) 2px
    );
    pointer-events: none;
    z-index: 9999;
}

/* === Window Reflection (Glass Effect) === */
.window::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 15px;
    background: linear-gradient(to bottom,
                                rgba(255, 255, 255, 0.3),
                                transparent
    );
    pointer-events: none;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

/* === Book App Layout === */
.book-app {
    width: 800px;
    height: 600px;
}

.book-content {
    display: flex;
    height: calc(100% - 30px);
}

.pages-list {
    width: 200px;
    background: rgba(0, 0, 0, 0.2);
    border-right: 1px solid rgba(74, 109, 167, 0.3);
    overflow-y: auto;
    padding: 10px;
}

.page-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.page-item {
    padding: 8px;
    margin-bottom: 5px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.2s;
}

.page-item:hover {
    background: rgba(74, 109, 167, 0.3);
}

.page-item.active {
    background: rgba(74, 109, 167, 0.5);
}

/* Content Styles */
.blog-entry, .album-review, .film-review, .philosophy-note, .portfolio-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.portfolio-item img {
    max-width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 10px;
}

.rating-stars {
    color: gold;
    margin: 5px 0;
}

blockquote {
    border-left: 3px solid #4a6da7;
    padding-left: 15px;
    margin: 15px 0;
    font-style: italic;
    color: #ccc;
}

.loading {
    padding: 20px;
    text-align: center;
    color: #aaa;
    font-style: italic;
}

/* Error message styling */
.error-message {
    color: #ff6b6b;
    padding: 20px;
    border: 1px dashed #ff6b6b;
    margin: 10px;
    border-radius: 3px;
}

/* Image Styles */
.content-image {
  margin: 0 auto 20px;
  max-width: 100%;
  text-align: center;
}

.content-image img {
  max-width: 100%;
  max-height: 300px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.portfolio-item .content-image img {
  max-height: 400px;
}

/* For music album covers */
.album-review .content-image {
  float: left;
  margin-right: 20px;
  margin-bottom: 10px;
  width: 200px;
}

/* For film posters */
.film-review .content-image {
  float: right;
  margin-left: 20px;
  margin-bottom: 10px;
  width: 150px;
}