/* Personal OS - Desktop-themed Personal Bio Website
 * style.css
 */

/* ============ Top Navigation Dropdown ============ */
#top-nav-dropdown {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
}

#dropdown-toggle {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    background-color: rgba(15, 15, 15, 0.8);
    color: #ffffff;
    border: 1px solid #333333;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(3px);
    transition: all 0.2s ease;
    cursor: pointer;
}

#dropdown-toggle:hover {
    background-color: #333333;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(50, 50, 50, 0.5);
}

#dropdown-toggle i {
    margin-right: 8px;
}

#dropdown-content {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 5px;
    min-width: 180px; /* Increased width to prevent text cutoff */
    background-color: rgba(25, 25, 25, 0.9);
    border: 1px solid #333333;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    display: none;
    z-index: 1001;
}

#top-nav-dropdown.active #dropdown-content {
    display: block;
    animation: fadeIn 0.2s ease;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s ease;
    white-space: nowrap;
    width: 100%;
    box-sizing: border-box;
}

.dropdown-item:hover {
    background-color: rgba(50, 50, 50, 0.7);
}

.dropdown-item i {
    margin-right: 10px;
    width: 16px;
    text-align: center;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============ Music Player ============ */
#music-player {
    position: fixed;
    bottom: 110px;
    right: 20px;
    z-index: 9500;
    display: none;
    transition: all 0.3s ease;
    width: 300px;
    height: 150px;
}

#visualizer-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    z-index: -1;
    pointer-events: auto;
}

#music-controls {
    position: relative;
    border-radius: 10px;
    padding: 10px;
    width: 300px;
    color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
}

.music-info {
    margin-bottom: 10px;
    text-align: center;
    padding: 0 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#music-title {
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#music-artist {
    font-size: 0.8rem;
    opacity: 0.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.controls-buttons {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.controls-buttons button {
    background: none;
    border: none;
    color: white;
    font-size: 1rem;
    padding: 8px 12px;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    margin: 0 5px;
}

.controls-buttons button:hover {
    color: #444444;
    transform: scale(1.1);
}

#play-button {
    font-size: 1.3rem;
}

#shuffle-button.active {
    color: #444444;
}

.volume-container {
    display: flex;
    align-items: center;
    padding: 0 5px;
}

#volume-icon {
    margin-right: 10px;
    font-size: 0.9rem;
}

#volume-slider {
    flex: 1;
    height: 4px;
    appearance: none;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.3);
    outline: none;
}

#volume-slider::-webkit-slider-thumb {
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    transition: background 0.2s ease;
}

#volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    transition: background 0.2s ease;
    border: none;
}

#volume-slider::-webkit-slider-thumb:hover,
#volume-slider::-moz-range-thumb:hover {
    background: #444444;
}

/* ============ XIII Overlay ============ */
#xiii-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    cursor: pointer;
    user-select: none;
    transition: opacity 1s ease-in-out;
}

.xiii-content {
    font-size: 10rem;
    font-weight: bold;
    color: #fff;
    font-family: 'Times New Roman', serif;
    letter-spacing: 10px;
    animation: pulse 2s infinite;
}

.click-instruction {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 2rem;
    font-family: 'Segoe UI', sans-serif;
    animation: fadeInOut 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.6; transform: scale(0.98); }
    50% { opacity: 1; transform: scale(1); }
    100% { opacity: 0.6; transform: scale(0.98); }
}

@keyframes fadeInOut {
    0% { opacity: 0.3; }
    50% { opacity: 1; }
    100% { opacity: 0.3; }
}

/* ============ Animated Background Effects ============ */
#matrix-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    opacity: 0.15;
    pointer-events: none;
}

#matrix-effect canvas, #bg-video, #bg-gif {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

#particle-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    opacity: 0.4;
    pointer-events: none;
}

/* Particle elements */
.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: float 15s linear infinite;
}

.particle-white {
    background-color: rgba(255, 255, 255, 0.7);
}

.particle-black {
    background-color: rgba(0, 0, 0, 0.7);
}

@keyframes float {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
    }
    25% {
        transform: translateY(-30px) translateX(15px) rotate(90deg);
    }
    50% {
        transform: translateY(-15px) translateX(30px) rotate(180deg);
    }
    75% {
        transform: translateY(-5px) translateX(15px) rotate(270deg);
    }
    100% {
        transform: translateY(0) translateX(0) rotate(360deg);
    }
}

/* Floating Shapes */
#floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    overflow: hidden;
    pointer-events: none;
}

.floating-shape {
    position: absolute;
    pointer-events: none;
    animation: floatShape 30s linear infinite;
}

.floating-shape.circle {
    border-radius: 50%;
}

.floating-shape.square {
    border-radius: 4px;
}

.floating-shape.triangle {
    width: 0 !important;
    height: 0 !important;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-bottom: 25px solid rgba(255, 255, 255, 0.1);
    background-color: transparent !important;
}

.floating-shape.diamond {
    transform: rotate(45deg);
    border-radius: 4px;
}

@keyframes floatShape {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
    }
    33% {
        transform: translateY(-100px) translateX(50px) rotate(120deg);
    }
    66% {
        transform: translateY(50px) translateX(100px) rotate(240deg);
    }
    100% {
        transform: translateY(0) translateX(0) rotate(360deg);
    }
}

/* Cursor Trail */
#cursor-trail {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-trail-dot {
    position: absolute;
    width: 5px;
    height: 5px;
    background-color: rgba(225, 240, 253, 0.7);
    border-radius: 50%;
    pointer-events: none;
    transition: opacity 0.5s ease;
    z-index: 9999;
}

/* Glitch Effect */
#glitch-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9998;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.1s ease;
}

#glitch-overlay.active {
    opacity: 1;
}

.glitch-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: rgba(48, 49, 49, 0.8);
    box-shadow: 0 0 10px rgba(59, 59, 59, 0.8);
    animation: glitch-horizontal 0.2s ease infinite;
}

@keyframes glitch-horizontal {
    0% {
        transform: translateX(-5px);
    }
    25% {
        transform: translateX(5px);
    }
    50% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
    100% {
        transform: translateX(-5px);
    }
}

/* Digital Circuit Effect */
#digital-circuit {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.1;
    overflow: hidden;
}

.circuit-node {
    position: absolute;
    width: 6px;
    height: 6px;
    background-color: #444444;
    border-radius: 50%;
    animation: pulse-node 5s infinite;
    box-shadow: 0 0 8px rgba(0, 120, 215, 0.8);
}

.circuit-line {
    position: absolute;
    height: 1px;
    background-color: rgba(0, 120, 215, 0.6);
    transform-origin: 0 0;
    animation: pulse-line 6s infinite;
}

@keyframes pulse-node {
    0%, 100% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.5);
        opacity: 1;
    }
}

@keyframes pulse-line {
    0%, 100% {
        opacity: 0.3;
        box-shadow: 0 0 0px rgba(0, 120, 215, 0);
    }
    25% {
        opacity: 0.8;
        box-shadow: 0 0 5px rgba(0, 120, 215, 0.8);
    }
    50% {
        opacity: 0.3;
        box-shadow: 0 0 0px rgba(0, 120, 215, 0);
    }
    75% {
        opacity: 0.8;
        box-shadow: 0 0 5px rgba(0, 120, 215, 0.8);
    }
}

/* Scan Lines Effect */
#scan-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0),
        rgba(0, 0, 0, 0),
        rgba(0, 0, 0, 0),
        rgba(0, 0, 0, 0.03),
        rgba(0, 0, 0, 0.03) 1px
    );
    z-index: 9997;
    pointer-events: none;
    opacity: 0.5;
    animation: scan-animation 8s linear infinite;
}

@keyframes scan-animation {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 0 100px;
    }
}

/* Loading Bar Animations */
#system-loader {
    position: fixed;
    bottom: 45px;
    right: 15px;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    padding: 8px 12px;
    width: 240px;
    z-index: 9000;
    color: white;
    font-size: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.loading-bar {
    background-color: rgba(255, 255, 255, 0.1);
    height: 6px;
    width: 100%;
    border-radius: 3px;
    margin-bottom: 5px;
    overflow: hidden;
}

.loading-progress {
    height: 100%;
    background-color: #444444;
    width: 0%;
    border-radius: 3px;
    transition: width 0.5s ease, background-color 0.5s ease;
    box-shadow: 0 0 10px rgba(0, 116, 217, 0.5);
}

.loading-text {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    opacity: 0.8;
}

.loading-percent {
    font-weight: bold;
}

/* Window Loading Bar */
.window-loading-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: linear-gradient(to right, #444444, #333333);
    transition: width 0.5s ease, opacity 0.3s ease;
    z-index: 1000;
    box-shadow: 0 0 10px rgba(0, 120, 215, 0.8);
}

/* Weather Effects */
#weather-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9996;
    overflow: hidden;
}

/* Rain Animation */
.rain-drop {
    position: absolute;
    width: 1px;
    height: 15px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.7));
    animation: rain-fall linear infinite;
    opacity: 0.5;
}

@keyframes rain-fall {
    0% {
        transform: translateY(-20px);
    }
    100% {
        transform: translateY(calc(100vh + 20px));
    }
}

/* Snow Animation */
.snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

.snow-flake {
    position: absolute;
    width: 4px;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    animation: snow-fall linear infinite;
    opacity: 0.8;
    box-shadow: 0 0 3px rgba(255, 255, 255, 0.3);
}

@keyframes snow-fall {
    0% {
        transform: translateY(-20px) translateX(0) rotate(0deg);
    }
    25% {
        transform: translateY(25vh) translateX(15px) rotate(45deg);
    }
    50% {
        transform: translateY(50vh) translateX(-15px) rotate(90deg);
    }
    75% {
        transform: translateY(75vh) translateX(15px) rotate(135deg);
    }
    100% {
        transform: translateY(calc(100vh + 20px)) translateX(0) rotate(180deg);
    }
}

/* Falling Leaves Animation */
.falling-leaf {
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: #ffffff;
    border-radius: 3px;
    animation: leaf-fall linear infinite;
    opacity: 0.5;
    transform: rotate(45deg);
}

@keyframes leaf-fall {
    0% {
        transform: translateY(-20px) translateX(0) rotate(45deg);
    }
    25% {
        transform: translateY(25vh) translateX(30px) rotate(90deg);
    }
    50% {
        transform: translateY(50vh) translateX(-30px) rotate(135deg);
    }
    75% {
        transform: translateY(75vh) translateX(30px) rotate(180deg);
    }
    100% {
        transform: translateY(calc(100vh + 20px)) translateX(0) rotate(225deg);
    }
}

/* Enhanced Window Animations */
.window-transition {
    transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease !important;
}

.window.visible {
    animation: window-appear 0.4s forwards;
}

@keyframes window-appear {
    0% {
        transform: scale(0.95);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.window.closing {
    animation: window-fade-out 0.3s forwards;
}

@keyframes window-fade-out {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0.95);
        opacity: 0;
    }
}

.window.minimized {
    animation: window-minimize 0.3s forwards;
}

@keyframes window-minimize {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0.8);
        opacity: 0;
    }
}

.animated-control {
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.animated-control:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

.animated-control:hover:before {
    width: 40px;
    height: 40px;
}

.icon-pulse {
    animation: icon-pulse 3s infinite;
}

@keyframes icon-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    box-shadow: 0 0 10px 2px rgba(0, 150, 255, 0.5);
    pointer-events: none;
}

.glow-line {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, transparent, #444444, transparent);
    animation: glow-line-move 8s linear infinite;
    z-index: 2;
    opacity: 0.3;
    pointer-events: none;
}

@keyframes glow-line-move {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100vw); }
}

.circle-pulse {
    position: absolute;
    border-radius: 50%;
    border: 2px solid #444444;
    opacity: 0;
    pointer-events: none;
    animation: circle-pulse 5s ease-out infinite;
}

@keyframes circle-pulse {
    0% { transform: scale(0); opacity: 0.6; }
    100% { transform: scale(20); opacity: 0; }
}

@keyframes float-up {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(-1000px) rotate(720deg); opacity: 0; }
}

/* ============ General Styles & Reset ============ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #000;
    color: #333;
}

/* ============ Desktop Environment ============ */
#desktop {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #000; /* Fallback background */
    transition: background-color 0.5s;
}

#desktop-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

#bg-video, #bg-gif {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    object-fit: cover;
    z-index: 1;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(20, 20, 20, 0.7), rgba(40, 40, 40, 0.7));
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 2;
}

/* ============ Centered Desktop GIF ============ */
#desktop-center-gif {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
    pointer-events: none; /* Allows clicking through the GIF */
}

#desktop-center-gif img {
    max-width: 300px;
    max-height: 300px;
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.3));
}

/* ============ Desktop Icons ============ */
#desktop-icons {
    position: absolute;
    top: 15px;
    left: 15px;
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    grid-gap: 20px;
    z-index: 50;
}

.desktop-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    padding: 5px;
    border-radius: 5px;
}

.desktop-icon i {
    font-size: 2.5rem;
    margin-bottom: 5px;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.desktop-icon span {
    color: #fff;
    font-size: 0.75rem;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
}

.desktop-icon:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.desktop-icon:active {
    transform: scale(0.95);
}

/* ============ Windows ============ */
.window {
    position: absolute;
    background-color: rgba(30, 30, 30, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    min-width: 400px;
    min-height: 300px;
    max-width: calc(100% - 40px);
    max-height: calc(100% - 80px); /* Account for taskbar and some padding */
    display: none;
    overflow: hidden;
    resize: both;
    backdrop-filter: blur(15px);
    -webkit-backpack-filter: blur(15px);
    transition: all 0.3s ease;
    z-index: 100;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
}

.window.active {
    z-index: 1000;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.window.visible {
    display: block;
    opacity: 1;
    transform: scale(1);
    pointer-events: all;
    border: 1px solid #555;
}

.window.maximized {
    top: 0 !important;
    left: 0 !important;
    width: calc(100% - 2px) !important; /* Subtract border width */
    height: calc(100% - 42px) !important; /* Account for taskbar and border */
    border-radius: 0;
    max-width: calc(100% - 2px) !important;
    max-height: calc(100% - 42px) !important;
}

.window.minimized {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

/* Window Header */
.window-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: linear-gradient(to right, #1a1a1a, #2a2a2a);
    color: white;
    border-radius: 6px 6px 0 0;
    cursor: move;
}

.window-title {
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.window-icon {
    margin-right: 8px;
    font-size: 1rem;
}

.window-controls {
    display: flex;
}

.window-controls button {
    background: none;
    border: none;
    color: white;
    font-size: 0.8rem;
    margin-left: 5px;
    cursor: pointer;
    width: 24px;
    height: 24px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.window-controls button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.window-close:hover {
    background-color: #555555 !important;
}

/* Window Body */
.window-body {
    flex: 1;
    padding: 15px;
    overflow: auto;
    background: #222;
    color: #e0e0e0;
    position: relative;
}

/* About Window Specific Styles */
#about-window {
    min-height: 550px; /* Increased minimum height to fit all content */
    width: 700px; /* Set a wider width for better content display */
}

.about-content {
    height: 100%;
    width: 100%;
}

/* Contact Window Specific Styles */
#contact-window {
    width: 450px;
    min-height: 400px;
}

.contact-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.contact-content h2 {
    margin-top: 0;
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.5rem;
    color: #ffffff;
}

.discord-form-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #36393f;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.discord-form-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background-color: #202225;
    border-bottom: 1px solid #111;
}

.discord-form-header i {
    color: #7289da;
    font-size: 1.3rem;
    margin-right: 10px;
}

.discord-form-header span {
    color: #ffffff;
    font-size: 0.9rem;
}

.discord-form {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.discord-form .form-group {
    margin-bottom: 15px;
}

.discord-form label {
    display: block;
    margin-bottom: 6px;
    color: #dcddde;
    font-size: 0.9rem;
}

.discord-form input,
.discord-form textarea {
    width: 100%;
    padding: 10px;
    background-color: #40444b;
    border: none;
    border-radius: 4px;
    color: #dcddde;
    font-size: 0.9rem;
    resize: none;
}

.discord-form input:focus,
.discord-form textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px #7289da;
}

.form-actions {
    display: flex;
    flex-direction: column;
    margin-top: 10px;
}

.send-btn {
    padding: 10px 16px;
    background-color: #7289da;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.send-btn:hover {
    background-color: #5b73c7;
}

.send-btn:active {
    background-color: #4a61b9;
}

.status-message {
    margin-top: 10px;
    text-align: center;
    font-size: 0.85rem;
    height: 20px;
}

.status-message.success {
    color: #43b581;
}

.status-message.error {
    color: #f04747;
}

.status-message.loading {
    color: #7289da;
}

/* Window Status Bar */
.window-statusbar {
    display: flex;
    padding: 4px 10px;
    background-color: #1a1a1a;
    border-top: 1px solid #333;
    font-size: 0.75rem;
    color: #aaa;
}

/* ============ Taskbar ============ */
#taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 38px;
    background-color: rgba(25, 25, 25, 0.8);
    border-top: 1px solid rgba(60, 60, 60, 0.8);
    display: flex;
    z-index: 9999;
    justify-content: space-between;
}

#start-button {
    display: flex;
    align-items: center;
    padding: 0 15px;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
}

#start-button:hover {
    background-color: rgba(40, 40, 40, 1);
}

#start-button i {
    margin-right: 8px;
    font-size: 1.2rem;
}

#taskbar-items {
    flex: 1;
    display: flex;
    height: 100%;
    margin: 0 10px;
    overflow: hidden;
}

.taskbar-item {
    display: flex;
    align-items: center;
    padding: 0 10px;
    margin-right: 5px;
    height: 34px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.taskbar-item.active {
    background-color: rgba(255, 255, 255, 0.25);
}

.taskbar-item:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.taskbar-item i {
    margin-right: 8px;
}

#system-tray {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-right: 10px;
}

.social-icons {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: 10px;
    z-index: 9999;
    position: relative;
}

.social-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    transition: all 0.2s ease;
    position: relative;
    cursor: pointer;
    margin: 0 4px;
}

.social-icon i {
    font-size: 22px;
    color: #fff;
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.6);
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
}

.tiktok-dropdown {
    position: relative;
}

.tiktok-accounts {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(30, 30, 30, 0.95);
    border: 1px solid #444;
    border-radius: 5px;
    padding: 8px 0;
    width: 140px;
    display: none;
    flex-direction: column;
    z-index: 99999;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
    pointer-events: none;
}

.tiktok-dropdown:hover .tiktok-accounts,
.tiktok-accounts.visible {
    display: flex;
    pointer-events: auto;
}

.tiktok-account {
    padding: 8px 10px;
    transition: background-color 0.2s;
    font-weight: 500;
}

.tiktok-accounts::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #444;
}

.tiktok-accounts a {
    color: #fff;
    padding: 6px 10px;
    font-size: 12px;
    text-decoration: none;
    transition: background-color 0.2s ease;
    text-align: center;
}

.tiktok-accounts a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

#discord-status {
    position: relative;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
}

.status-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: gray;
}

.status-indicator.online {
    background-color: #57F287;
}

.status-indicator.idle {
    background-color: #f0f0f0;
}

.status-indicator.dnd {
    background-color: #f04747;
}

.status-indicator.offline {
    background-color: #747f8d;
}

#time-display {
font-size: 0.8rem;
}

/* ============ Start Menu ============ */
#start-menu {
position: absolute;
bottom: 40px;
left: 0;
width: 300px;
background-color: rgba(30, 30, 30, 0.95);
border-radius: 6px 6px 0 0;
box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.4);
color: white;
z-index: 9100;
display: none;
transform: translateY(20px);
opacity: 0;
transition: transform 0.3s, opacity 0.3s;
}

#start-menu.visible {
display: block;
transform: translateY(0);
opacity: 1;
}

.start-menu-header {
display: flex;
align-items: center;
padding: 15px;
background-color: rgba(40, 40, 40, 0.4);
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 6px 6px 0 0;
    padding: 15px;
    background-color: rgba(40, 40, 40, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px 6px 0 0;
}

.start-menu-header i {
    margin-right: 15px;
}

.user-info h3 {
    font-size: 1.1rem;
    margin-bottom: 3px;
}

.user-info p {
    font-size: 0.8rem;
    opacity: 0.7;
}

.start-menu-items {
    padding: 15px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.menu-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.menu-item i {
    width: 25px;
    text-align: center;
    margin-right: 15px;
    font-size: 1.1rem;
}

.start-menu-footer {
    padding: 10px 15px;
    border-top: 1px solid #18191c;
}

.no-activity {
    padding: 15px;
    text-align: center;
    color: #72767d;
    font-size: 0.9rem;
    background-color: #202225;
    border-radius: 8px;
    border: 1px solid #18191c;
}

.power-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 0;
}

.power-option i {
    width: 25px;
    text-align: center;
    margin-right: 15px;
    color: #555555;
}

/* ============ Discord Panel ============ */
#discord-panel {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    width: 320px;
    background-color: #2f3136; /* Darker Discord background */
    border-radius: 8px;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.5);
    color: #dcddde; /* Discord text color */
    z-index: 9999;
    border: 1px solid #202225;
    overflow: hidden;
}

/* Always display the Discord panel */
#discord-panel {
    display: block;
}

.window-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #222;
    padding: 8px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: move;
}

.discord-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background-color: #202225;
    border-bottom: 1px solid #18191c;
    border-radius: 8px 8px 0 0;
}

.discord-header h3 {
    font-size: 1rem;
    color: #fff;
    display: flex;
    align-items: center;
}

.discord-header h3 i {
    color: #7289da;
    margin-right: 8px;
}

/* Discord profile link */
.discord-footer {
    text-align: center;
    padding: 12px 0;
    border-top: 1px solid #18191c;
    background-color: #202225;
}

.discord-profile-link {
    color: #5865f2;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s;
    padding: 5px 10px;
    border-radius: 3px;
    background-color: #292b2f;
}

.discord-profile-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

.discord-profile-link i {
    margin-right: 6px;
    font-size: 0.8rem;
}

.discord-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background-color: #2f3136;
}

.discord-user {
    display: flex;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #18191c;
}

.discord-badges {
    display: flex;
    margin-top: 5px;
    flex-wrap: wrap;
}

.discord-badge {
    width: 22px;
    height: 22px;
    margin-right: 4px;
    position: relative;
    border-radius: 3px;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.discord-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.discord-custom-status {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #18191c;
    background-color: #2f3136;
}

.custom-status-emoji {
    margin-right: 10px;
    font-size: 1.3rem;
    min-width: 24px;
    text-align: center;
}

.custom-status-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #dcddde;
    font-size: 0.9rem;
}

.discord-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    margin-right: 15px;
    border: 4px solid #202225;
    background-color: #202225;
}

.discord-username {
    font-weight: 600;
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.discord-tag {
    color: #b9bbbe;
    font-weight: normal;
    font-size: 0.9rem;
}

.discord-status {
    display: flex;
    align-items: center;
}

.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.status-dot.online {
    background-color: #43b581;
}

.status-dot.idle {
    background-color: #faa61a;
}

.status-dot.dnd {
    background-color: #f04747;
}

.status-dot.offline {
    background-color: #747f8d;
}

.status-text {
    color: #b9bbbe;
    font-size: 0.9rem;
}

.discord-activities {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.activity-item {
    background-color: #202225;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    gap: 12px;
    align-items: center;
    border: 1px solid #18191c;
}

.activity-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background-color: #18191c;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.activity-image img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
}

.activity-image i {
    font-size: 24px;
    color: #7289da;
}

.activity-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
}

.activity-name {
    font-weight: 600;
    font-size: 1rem;
    color: #dcddde;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-state,
.activity-details-text {
    font-size: 0.9rem;
    color: #b9bbbe;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-time {
    font-size: 0.8rem;
    color: #72767d;
    margin-top: 2px;
}

.activity-header {
    font-size: 0.75rem;
    color: #72767d;
    margin-bottom: 10px;
    font-weight: 700;
}

.game-info {
    display: flex;
    align-items: center;
    background-color: #40444b;
    border-radius: 4px;
    padding: 10px;
}

.game-icon {
    width: 40px;
    height: 40px;
    border-radius: 5px;
    margin-right: 10px;
    background-color: #2f3136;
}

.game-details {
    flex: 1;
}

.game-name {
    font-weight: 600;
    color: #fff;
    margin-bottom: 3px;
}

.game-status {
    color: #b9bbbe;
    font-size: 0.85rem;
    margin-bottom: 3px;
}

.game-time {
    color: #72767d;
    font-size: 0.8rem;
}

/* ============ About Window Styles ============ */
#about-window {
    width: 700px;
    height: 600px;
    top: 80px;
    left: 100px;
}

.about-content {
    display: flex;
    flex-direction: column;
    color: #e0e0e0;
}

.profile-container {
    text-align: center;
    margin-bottom: 20px;
    background-color: #333;
    padding: 20px;
    border-radius: 10px;
}

.profile-avatar {
    margin-bottom: 15px;
}

.profile-avatar img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid #444444;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.profile-avatar img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.profile-container h1 {
    margin-bottom: 5px;
    color: #333;
}

.tagline {
    color: #666;
    font-style: italic;
}

.about-text {
    background-color: #333;
    padding: 20px;
    border-radius: 10px;
    color: #e0e0e0;
}

.about-text h2 {
    margin-bottom: 15px;
    color: #444444;
}

.about-text p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #e0e0e0;
}

.quick-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    background-color: #2a2a2a;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

.stat {
    text-align: center;
    padding: 15px;
    background-color: #333;
    border-radius: 6px;
    width: 32%;
}

.stat i {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: #444444;
}

.stat span {
    font-size: 0.9rem;
    display: block;
    color: #e0e0e0;
}

/* ============ Projects Window Styles ============ */
.projects-content h2 {
    margin-bottom: 20px;
    color: #444444;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.project-card {
    background: #333;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.project-icon {
    width: 50px;
    height: 50px;
    background-color: #444444;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-bottom: 15px;
}

.project-card h3 {
    color: #333;
    margin-bottom: 10px;
}

.project-card p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.project-tags span {
    background-color: #f0f5ff;
    color: #444444;
    font-size: 0.8rem;
    padding: 3px 8px;
    border-radius: 25px;
    margin-right: 5px;
    margin-bottom: 5px;
}

.project-link {
    display: inline-block;
    padding: 8px 12px;
    background-color: #444444;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.project-link:hover {
    background-color: #333333;
}

/* ============ Skills Window Styles ============ */
.skills-content h2 {
    margin-bottom: 20px;
    color: #444444;
}

.skills-tabs {
    display: flex;
    margin-bottom: 20px;
    background-color: #333;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.tab-btn {
    flex: 1;
    padding: 10px;
    text-align: center;
    border: none;
    background: none;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 0.9rem;
    color: #555;
}

.tab-btn.active {
    background-color: #444444;
    color: white;
}

.tab-content {
    display: none;
    background-color: #333;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

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

.skill-item {
    margin-bottom: 15px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.skill-name {
    font-weight: 600;
    color: #333;
}

.skill-percentage {
    color: #444444;
}

.skill-bar {
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background-color: #444444;
    border-radius: 4px;
    transition: width 1s;
}

/* ============ Contact Window Styles ============ */
#contact-window {
    width: 650px;
    height: 550px;
    top: 100px;
    left: 150px;
}
.contact-content {
    display: flex;
    color: #e0e0e0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.contact-form {
    flex: 1;
    padding-right: 20px;
    background-color: #333;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

input, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    background-color: #333;
    color: #e0e0e0;
}

textarea {
    height: 100px;
    resize: vertical;
}

.send-btn {
    padding: 10px 20px;
    background-color: #333;
    color: white;
    border: 1px solid #555;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.send-btn:hover {
    background-color: #444;
}

.contact-info {
    flex: 1;
    padding-left: 20px;
    border-left: 1px solid #333;
    background-color: #333;
    padding: 20px;
    border-radius: 6px;
    color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.contact-item i {
    font-size: 1.2rem;
    margin-right: 15px;
    width: 20px;
    text-align: center;
}

.social-links {
    display: flex;
    margin-top: auto;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin-right: 10px;
    color: white;
    font-size: 1.2rem;
    transition: background-color 0.2s;
}

.social-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* ============ Gallery Window Styles ============ */
.gallery-content h2 {
    margin-bottom: 20px;
    color: #444444;
}

.gallery-view {
    display: flex;
    gap: 20px;
    height: calc(100% - 60px);
}

.gallery-sidebar {
    width: 150px;
    background-color: #333;
    border-radius: 6px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.gallery-folder {
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 5px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.gallery-folder.active {
    background-color: #666666;
    color: #444444;
}

.gallery-folder:hover {
    background-color: #f8f9fa;
}

.gallery-folder i {
    margin-right: 10px;
    color: #444444;
}

.gallery-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    padding: 15px;
    background-color: #333;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.gallery-item {
    height: 120px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item-placeholder {
    width: 100%;
    height: 100%;
    background-color: #f0f0f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #aaa;
}

.gallery-item-placeholder i {
    font-size: 2rem;
    margin-bottom: 8px;
}


/* ============ Site Attribution ============ */
#site-watermark {
    position: fixed;
    bottom: 45px;
    left: 8px;
    font-size: 9px;
    color: rgba(255, 255, 255, 0.4);
    z-index: 10;
    pointer-events: none;
    user-select: none;
    font-family: monospace;
    opacity: 0.7;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
}

/* This uses a technique to make the text harder to extract from code */
#site-watermark::before {
    content: attr(data-p1) attr(data-p2);
    position: relative;
    display: inline-block;
}

/* Additional protection to make it harder to find in the code */
@media not all and (min-width: 0px) {
    #site-watermark {
        display: none !important;
    }
}

/* ============ Discord Server Invite Pop-out ============ */
#discord-invite-popup {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 9999;
    font-family: 'Segoe UI', sans-serif;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.discord-invite-toggle {
    display: flex;
    align-items: center;
    background-color: #333333;
    color: white;
    padding: 12px 20px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    user-select: none;
    animation: pulse-discord 2s infinite ease-in-out;
}

.discord-invite-toggle:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(88, 101, 242, 0.3);
}

.discord-invite-toggle i {
    font-size: 20px;
    margin-right: 10px;
}

.discord-invite-content {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 300px;
    background-color: #36393f;
    border-radius: 8px;
    overflow: hidden;
    transform-origin: top right;
    transform: scale(0.95);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

#discord-invite-popup.active .discord-invite-content {
    transform: scale(1);
    opacity: 1;
    pointer-events: auto;
}

.discord-invite-header {
    display: flex;
    align-items: center;
    padding: 16px;
    background-color: #2f3136;
    position: relative;
}

.server-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    margin-right: 12px;
    background-color: #333333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.server-info h3 {
    margin: 0;
    color: white;
    font-size: 16px;
    font-weight: 600;
}

.server-info p {
    margin: 4px 0 0;
    color: #b9bbbe;
    font-size: 12px;
}

.discord-invite-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: #b9bbbe;
    font-size: 14px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.discord-invite-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.discord-invite-body {
    padding: 16px;
}

.member-count {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    color: #b9bbbe;
    font-size: 14px;
}

.member-count i {
    margin-right: 8px;
}

.join-button {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #333333;
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 10px 0;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.join-button i {
    margin-right: 8px;
}

.join-button:hover {
    background-color: #4752C4;
}

@keyframes pulse-discord {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Discord pop animation */
@keyframes discord-pop {
    0% { transform: scale(0.8); opacity: 0; }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

/* ============ Animations & Effects ============ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes notification {
    0% { transform: translateX(100%); }
    10%, 90% { transform: translateX(0); }
    100% { transform: translateX(100%); }
}

/* ============ Responsive Styles ============ */
@media (max-width: 1024px) {
    /* Adjustments for tablets and smaller screens */
    #music-player {
        bottom: 80px;
        right: 10px;
        width: 280px;
    }
    
    .window {
        max-height: 85vh;
        overflow-y: auto;
    }
    
    #taskbar-items {
        max-width: 60%;
        overflow-x: auto;
    }
    
    #discord-panel {
        width: 280px;
    }
}

@media (max-width: 768px) {
    /* Tablet and large mobile styles */
    .window {
        width: 90vw !important;
        min-width: 300px;
        max-height: 80vh;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
    }
    
    .contact-grid,
    .project-grid {
        grid-template-columns: 1fr;
    }
    
    #desktop-icons {
        top: 10px;
        left: 10px;
        display: flex;
        flex-wrap: wrap;
        width: calc(100% - 20px);
        justify-content: flex-start;
    }
    
    .desktop-icon {
        width: 60px;
        height: 60px;
        margin: 8px;
    }
    
    .desktop-icon i {
        font-size: 1.8rem;
    }
    
    #start-menu {
        width: 250px;
        max-height: 70vh;
        overflow-y: auto;
    }
    
    #notification-panel,
    #discord-panel {
        width: 300px;
        max-height: 60vh;
        overflow-y: auto;
    }
    
    #taskbar {
        height: 45px;
    }
    
    #taskbar-items button {
        padding: 6px 10px;
    }
    
    #clock {
        font-size: 0.8rem;
    }
    
    #music-player {
        bottom: 60px;
        width: 250px;
        height: auto;
    }
    
    .music-controls button {
        padding: 6px;
    }
    
    /* Adjust vertical spacing between windows */
    #windows-container .window + .window {
        margin-top: 15px;
    }
    
    /* Make dropdown more accessible on touch devices */
    #dropdown-toggle {
        padding: 10px 18px;
        font-size: 15px;
    }
    
    .dropdown-item {
        padding: 12px 16px;
        font-size: 15px;
    }
    
    /* Improve touch targets */
    .window-controls button {
        padding: 8px;
        margin-left: 5px;
    }
}

@media (max-width: 576px) {
    /* Small mobile styles */
    body {
        touch-action: manipulation;
    }
    
    .window-title span {
        max-width: 150px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .window-header {
        padding: 8px;
    }
    
    .window-body {
        padding: 10px;
    }
    
    .quick-stats {
        flex-direction: column;
    }
    
    .stat {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .desktop-icon {
        width: 50px;
        height: 50px;
    }
    
    .desktop-icon i {
        font-size: 1.5rem;
    }
    
    .desktop-icon span {
        font-size: 0.65rem;
    }
    
    .gallery-view {
        flex-direction: column;
    }
    
    .gallery-sidebar {
        width: 100%;
        margin-bottom: 15px;
    }
    
    /* Improve form fields on mobile */
    input[type="text"],
    input[type="email"],
    textarea {
        font-size: 16px; /* Prevents iOS zoom on focus */
        padding: 10px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    /* Make buttons more touch-friendly */
    button {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Adjust taskbar for mobile */
    #taskbar {
        height: 40px;
    }
    
    #start-button {
        padding: 8px;
    }
    
    #taskbar-items {
        max-width: 50%;
    }
    
    #taskbar-right {
        padding-right: 6px;
    }
    
    /* Music player adjustments */
    #music-player {
        bottom: 50px;
        right: 8px;
        width: 220px;
    }
    
    .music-info {
        margin-bottom: 6px;
    }
    
    #music-title {
        font-size: 0.8rem;
    }
    
    .controls-buttons button {
        padding: 6px 8px;
        font-size: 0.9rem;
    }
    
    /* XIII overlay adjustments */
    .xiii-content {
        font-size: 6rem;
    }
    
    .click-instruction {
        font-size: 1rem;
    }
    
    /* Adjust Discord panel for mobile */
    #discord-panel {
        width: 250px;
        right: 8px;
    }
    
    .discord-header {
        padding: 8px;
    }
    
    /* Adjust windows for better mobile experience */
    .window {
        width: 95vw !important;
        max-height: 75vh;
    }
    
    /* Improve window dragging on mobile */
    .window-header {
        user-select: none;
        -webkit-user-select: none;
        cursor: move;
        touch-action: none;
    }
}

/* ============ Quality of Life and Visual Improvements ============ */

/* Email Contact Container Styling */
.email-contact-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 0 24px 0;
    gap: 16px;
    font-size: 1.1rem;
    color: #fff;
    background: rgba(30, 30, 30, 0.85);
    border-radius: 16px;
    box-shadow: 0 6px 32px 0 rgba(0,0,0,0.25);
    margin: 0 auto;
    max-width: 350px;
    transition: box-shadow 0.3s, background 0.3s;
}
.email-contact-container i {
    font-size: 2.5rem;
    color: #3498db;
    margin-bottom: 8px;
}
.email-link {
    color: #2ecc71;
    font-size: 1.2rem;
    font-weight: bold;
    text-decoration: underline;
    transition: color 0.2s;
}
.email-link:hover {
    color: #27ae60;
    text-decoration: none;
}

/* Window polish */
.window {
    background: rgba(24, 24, 28, 0.92);
    border-radius: 18px !important;
    box-shadow: 0 8px 36px 0 rgba(0,0,0,0.28), 0 1.5px 6px 0 rgba(52,152,219,0.04);
    backdrop-filter: blur(8px);
    transition: box-shadow 0.3s, background 0.3s;
    border: 1.5px solid rgba(52,152,219,0.09);
}
.window:focus, .window.active {
    box-shadow: 0 12px 48px 0 rgba(52,152,219,0.22), 0 1.5px 12px 0 rgba(52,152,219,0.08);
    background: rgba(34, 34, 40, 0.97);
}

.window-header, .window-statusbar {
    border-radius: 18px 18px 0 0 !important;
}

/* Smooth transitions */
button, .window, .desktop-icon, .dropdown-item, .music-info, .start-menu, .taskbar {
    transition: all 0.2s cubic-bezier(.4,0,.2,1);
}

/* Desktop/Sidebar Icon polish */
.desktop-icon {
    border-radius: 18px;
    background: rgba(40, 40, 50, 0.35);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(44,62,80,0.04);
    transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
    padding: 10px 0 6px 0;
    margin: 10px auto;
    width: 68px;
    height: 68px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1.5px solid rgba(52,152,219,0.06);
}
.desktop-icon:hover {
    background: rgba(52,152,219,0.15);
    box-shadow: 0 4px 18px rgba(52,152,219,0.18);
    transform: translateY(-2px) scale(1.05);
}
.desktop-icon i {
    font-size: 2rem;
    margin-bottom: 4px;
}
.desktop-icon span {
    font-size: 0.85rem;
    color: #eee;
    text-shadow: 0 1px 2px #222;
}

/* Modern Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    background: rgba(35,35,35,0.2);
}
::-webkit-scrollbar-thumb {
    background: rgba(52,152,219,0.26);
    border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(52,152,219,0.45);
}

/* Start bar and menu polish */
#taskbar, .start-menu {
    background: rgba(24,24,30,0.92) !important;
    backdrop-filter: blur(8px);
    border-top: 1.5px solid rgba(52,152,219,0.10);
    box-shadow: 0 -2px 16px rgba(52,152,219,0.08);
}
#taskbar {
    transition: box-shadow 0.2s, background 0.2s;
}
#taskbar:hover {
    box-shadow: 0 -6px 36px rgba(52,152,219,0.15);
    background: rgba(34,34,40,0.97) !important;
}

/* ============ End QoL/Visual Improvements ============ */

/* Responsive Contact Window - Email Section */
@media (max-width: 600px) {
  .email-contact-container {
    max-width: 98vw;
    padding: 22px 4vw 20px 4vw;
    font-size: 1rem;
  }
  .email-contact-container i {
    font-size: 2rem;
  }
  .email-link {
    font-size: 1rem;
  }
}

/* Focused window highlight */
.window.active, .window:focus {
    box-shadow: 0 16px 48px 0 rgba(52,152,219,0.32), 0 2px 12px 0 rgba(52,152,219,0.15);
    background: rgba(40, 40, 48, 0.99);
    outline: 2px solid #3498db;
    outline-offset: -2px;
}

/* Start bar and menu active/clicked state */
#taskbar:active, .start-menu:active {
    background: rgba(34,34,40,0.99) !important;
    box-shadow: 0 -8px 36px rgba(52,152,219,0.22);
}

/* Ensure pointer events for windows */
.window {
    pointer-events: auto;
}

/* Accessibility: Improve contrast for desktop-icon text */
.desktop-icon span {
    color: #f4f4f4;
    text-shadow: 0 2px 4px #222, 0 0 2px #000;
}


/* Additional breakpoint for very small screens */
@media (max-width: 375px) {
    .desktop-icon {
        width: 45px;
        height: 45px;
        margin: 5px;
    }
    
    .desktop-icon i {
        font-size: 1.3rem;
    }
    
    .desktop-icon span {
        font-size: 0.6rem;
    }
    
    #music-player {
        width: 200px;
    }
    
    .window-controls button {
        padding: 6px;
        margin-left: 2px;
    }
    
    .window-title span {
        max-width: 110px;
    }
    
    #top-nav-dropdown {
        top: 10px;
    }
    
    #dropdown-toggle {
        padding: 8px 12px;
        font-size: 13px;
    }
}
