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

/* Hide system cursor and show custom cursor only on devices with a mouse */
@media (pointer: fine) {
    *, *::before, *::after, button, a, input, textarea, img {
        cursor: none !important;
    }
}

body {
    background-color: #1a1a1a;
    background-image: url('./assets/wallpaper.jpeg');
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center;
    font-family: 'MS Sans Serif', Arial, sans-serif;
    padding: 20px;
    overflow-y: auto;
    min-height: 100vh;
    cursor: none;
}

.container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 950px;
    margin: 0 auto;
    justify-items: center;
    position: relative;
    z-index: 1;
}

.window {
    width: 450px;
}

.language-selector {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 1000;
}

.language-selector select {
    padding: 5px 10px;
    font-size: 12px;
    border: 2px solid;
    border-color: #dfdfdf #808080 #808080 #dfdfdf;
    background-color: #c0c0c0;
    cursor: pointer;
    font-family: 'MS Sans Serif', Arial, sans-serif;
}

.window {
    flex-shrink: 0;
}

/* Profile Window Styling */
.profile-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px;
}

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

.profile-image img {
    width: 150px;
    height: 150px;
    border: 2px solid #dfdfdf;
    border-right: 2px solid #808080;
    border-bottom: 2px solid #808080;
    padding: 2px;
    background-color: #c0c0c0;
}

.profile-info {
    width: 100%;
}

.profile-info h2 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #000080;
}

.profile-info p {
    font-size: 13px;
    margin: 5px 0;
    color: #000000;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-top: 15px;
}

.profile-btn {
    padding: 4px 12px;
    font-size: 12px;
    cursor: pointer;
    width: 100%;
    transition: all 0.1s;
}

.profile-btn:hover {
    transform: translateY(1px);
}

/* Skills Tree View */
.tree-view {
    list-style: none;
    padding-left: 0;
}

.tree-view li {
    margin: 5px 0;
}

.tree-view details {
    margin-left: 10px;
}

.tree-view summary {
    cursor: pointer;
    user-select: none;
    font-weight: bold;
    color: #000080;
    padding: 5px;
}

.tree-view summary:hover {
    background-color: #000080;
    color: #ffffff;
}

.tree-view ul {
    list-style: none;
    padding-left: 20px;
    margin: 5px 0;
}

.tree-view ul li {
    margin: 3px 0;
    color: #000000;
    padding: 3px 5px;
}

.tree-view ul li:hover {
    background-color: #dfdfdf;
}

/* Comments Section */
.form-group {
    margin-bottom: 10px;
}

.form-group label {
    display: block;
    margin-bottom: 3px;
    font-size: 12px;
    color: #000080;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 4px;
    font-family: 'MS Sans Serif', Arial, sans-serif;
    font-size: 12px;
}

.comments-list {
    height: 280px;
    overflow-y: auto;
    border: 2px solid;
    border-color: #dfdfdf #808080 #808080 #dfdfdf;
    background-color: #ffffff;
    padding: 8px;
}

.comment-item {
    margin-bottom: 8px;
    padding: 6px;
    background-color: #f0f0f0;
    border: 1px solid #c0c0c0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.comment-nick {
    font-weight: bold;
    color: #000080;
    margin-bottom: 2px;
    font-size: 11px;
}

.comment-text {
    color: #000000;
    font-size: 11px;
    line-height: 1.3;
    word-wrap: break-word;
    margin-bottom: 2px;
}

.comment-time {
    font-size: 10px;
    color: #808080;
    margin-bottom: 3px;
}

.comment-footer {
    display: flex;
    gap: 5px;
    align-items: center;
}

.comment-delete-btn {
    font-size: 10px;
    padding: 2px 4px !important;
    height: auto;
    min-height: 18px;
}

.comment-you-badge {
    font-size: 9px;
    color: #008080;
    font-weight: bold;
}

.user-limit-warning {
    background-color: #ffffcc;
    border: 2px solid;
    border-color: #dfdfdf #808080 #808080 #dfdfdf;
    padding: 8px;
    margin-bottom: 10px;
    font-size: 11px;
    color: #000000;
}

.user-limit-warning strong {
    color: #ff0000;
}

/* Responsive Design */
@media (max-width: 1000px) {
    .container {
        grid-template-columns: 1fr;
        max-width: 500px;
    }

    .window {
        width: 100% !important;
        max-width: 500px;
    }
}

@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    .container {
        grid-template-columns: 1fr;
        gap: 15px;
        max-width: 100%;
    }

    .window {
        width: 100% !important;
        max-width: 100%;
    }

    .projects-container {
        height: 250px;
    }

    .comments-list {
        height: 250px;
    }
}

/* Fieldset styling */
fieldset {
    border: 2px solid;
    border-color: #dfdfdf #808080 #808080 #dfdfdf;
    padding: 10px;
    margin-bottom: 10px;
    background-color: #c0c0c0;
}

legend {
    background-color: #c0c0c0;
    padding: 0 4px;
    font-weight: bold;
    font-size: 12px;
    color: #000080;
}

/* Scrollbar styling for comments */
#commentsList::-webkit-scrollbar {
    width: 16px;
}

#commentsList::-webkit-scrollbar-track {
    background: #c0c0c0;
    border: 1px solid #dfdfdf;
}

#commentsList::-webkit-scrollbar-thumb {
    background: #dfdfdf;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
}

#commentsList::-webkit-scrollbar-thumb:hover {
    background: #e8e8e8;
}

/* Scrollbar for body */
::-webkit-scrollbar {
    width: 16px;
}

::-webkit-scrollbar-track {
    background: #008080;
}

::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border: 2px solid;
    border-color: #dfdfdf #808080 #808080 #dfdfdf;
}

::-webkit-scrollbar-thumb:hover {
    background: #dfdfdf;
}

/* Projects Section */
.projects-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 600px;
    overflow-y: auto;
    border: 2px solid;
    border-color: #dfdfdf #808080 #808080 #dfdfdf;
    background-color: #ffffff;
    padding: 8px;
}

.project-card {
    border: 2px solid;
    border-color: #dfdfdf #808080 #808080 #dfdfdf;
    background-color: #c0c0c0;
    padding: 10px;
    display: flex;
    flex-direction: column;
    transition: all 0.1s;
    flex-shrink: 0;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.project-title {
    font-weight: bold;
    color: #000080;
    font-size: 12px;
    margin-bottom: 6px;
}

.project-description {
    color: #000000;
    font-size: 11px;
    line-height: 1.3;
    margin-bottom: 6px;
    word-wrap: break-word;
}

.project-status {
    font-size: 11px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.project-status-badge {
    padding: 2px 6px;
    border: 1px solid #808080;
    background-color: #c0c0c0;
    border-radius: 2px;
    font-weight: bold;
}

.status-active {
    background-color: #90EE90;
    color: #004d00;
}

.status-in-progress {
    background-color: #FFD700;
    color: #664d00;
}

.status-completed {
    background-color: #87CEEB;
    color: #004d80;
}

.status-paused {
    background-color: #FFA07A;
    color: #663300;
}

.project-btn {
    padding: 4px 8px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.1s;
    align-self: flex-start;
    color: #000000;
    text-decoration: none;
    display: inline-block;
}

.project-btn:hover {
    transform: translateY(1px);
}

/* Projects container scrollbar */
.projects-container::-webkit-scrollbar {
    width: 16px;
}

.projects-container::-webkit-scrollbar-track {
    background: #c0c0c0;
    border: 1px solid #dfdfdf;
}

.projects-container::-webkit-scrollbar-thumb {
    background: #dfdfdf;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
}

.projects-container::-webkit-scrollbar-thumb:hover {
    background: #e8e8e8;
}

/* Custom Cursor */
.custom-cursor {
    position: fixed;
    width: 32px;
    height: 32px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 192.756 192.756'%3E%3Cg fill-rule='evenodd' clip-rule='evenodd'%3E%3Cpath fill='%23000' d='M72.893 21.956v-6.171h13.028v6.171h7.543v29.485h13.714v6.858h21.258v6.857h13.371v6.857h7.543v6.857h6.855v49.713h-6.855v21.258h-7.543v20.571H72.893v-20.571h-6.515v-14.058H58.15v-14.057h-7.543v-14.4h-7.199v-7.2H36.55V78.87h21.6v6.858h8.228V21.956h6.515z'/%3E%3Cpath fill='%23fff' d='M72.893 149.841v-14.058h-6.515v-14.057H58.15v-14.4h-7.543v-7.2h-7.199V85.728H58.15v7.199h8.228v20.914h6.515V21.956h13.028v63.772h7.543V58.299h13.714v27.429h6.857V65.156h14.401v27.771h7.199V72.013h6.172v6.857h7.543v49.713h-7.543v21.258h-6.172v14.399H78.379v-14.399h-5.486z'/%3E%3C/g%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-16px, -16px);
    display: block;
}

/* Hide custom cursor on mobile (touch devices) */
@media (pointer: coarse) {
    .custom-cursor {
        display: none !important;
    }
}

/* Winamp Player Styles */
.winamp-player {
    width: 280px;
}

.winamp-body {
    background: linear-gradient(180deg, #c0b856 0%, #a89860 5%, #2a2a2a 5%, #2a2a2a 95%, #a89860 95%) !important;
    padding: 0 !important;
    font-family: 'MS Sans Serif', Arial, sans-serif !important;
}

/* Winamp Header Bar */
.winamp-header {
    background: linear-gradient(180deg, #d4c996 0%, #a89860 100%);
    padding: 3px 3px 0 3px;
    font-size: 9px;
    font-weight: bold;
    color: #0a0a0a;
    text-align: center;
    border-bottom: 1px solid #808080;
}

.winamp-display {
    background-color: #000000;
    border: 2px solid;
    border-color: #2a2a2a #606060 #606060 #2a2a2a;
    margin: 6px 3px 3px 3px;
    padding: 5px;
    font-size: 10px;
    color: #00ff00;
    font-weight: bold;
    font-family: 'MS Sans Serif', Arial, sans-serif;
}

.winamp-title {
    height: 12px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    margin-bottom: 1px;
}

.winamp-time {
    font-size: 9px;
    color: #00ff00;
    display: flex;
    justify-content: space-between;
}

.winamp-equalizer {
    display: flex;
    gap: 1px;
    margin: 3px;
    height: 35px;
    justify-content: center;
    align-items: flex-end;
    background-color: #1a1a1a;
    padding: 3px;
    border: 1px solid #404040;
}

.eq-bar {
    width: 3px;
    height: 15px;
    background: linear-gradient(180deg, #00ff00, #00aa00);
    border: 1px solid #005500;
    animation: eq-animation 0.5s ease-in-out infinite alternate;
}

.eq-bar:nth-child(1) { animation-delay: 0s; }
.eq-bar:nth-child(2) { animation-delay: 0.1s; }
.eq-bar:nth-child(3) { animation-delay: 0.2s; }
.eq-bar:nth-child(4) { animation-delay: 0.3s; }
.eq-bar:nth-child(5) { animation-delay: 0.2s; }
.eq-bar:nth-child(6) { animation-delay: 0.1s; }
.eq-bar:nth-child(7) { animation-delay: 0s; }
.eq-bar:nth-child(8) { animation-delay: 0.1s; }

@keyframes eq-animation {
    0% { height: 8px; }
    100% { height: 32px; }
}

.winamp-progress-container {
    margin: 3px;
}

.winamp-progress {
    width: 100%;
    height: 10px;
    -webkit-appearance: none;
    appearance: none;
    background: #5a5a5a;
    border: 1px solid #404040;
    cursor: pointer;
}

.winamp-progress::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: #c0b856;
    border: 1px solid #808080;
    cursor: pointer;
}

.winamp-progress::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #c0b856;
    border: 1px solid #808080;
    cursor: pointer;
}

.winamp-controls {
    display: flex;
    justify-content: center;
    gap: 2px;
    margin: 3px;
    padding-bottom: 3px;
}

.winamp-btn {
    width: 22px;
    height: 18px;
    padding: 1px;
    font-size: 10px;
    border: 2px solid;
    border-color: #d4c996 #505050 #505050 #d4c996;
    background-color: #a89860;
    color: #000000;
    cursor: pointer;
    transition: all 0.05s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.winamp-btn:active {
    border-color: #505050 #d4c996 #d4c996 #505050;
}

.winamp-btn:hover {
    background-color: #b8a870;
}

.winamp-volume-container {
    display: flex;
    align-items: center;
    gap: 3px;
    margin: 0 3px 3px 3px;
    padding: 2px 3px;
    background-color: #3a3a3a;
    border: 1px solid #404040;
}

.winamp-volume-label {
    font-size: 9px;
    color: #c0b856;
    font-weight: bold;
    min-width: 25px;
}

.winamp-volume {
    flex: 1;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: #5a5a5a;
    cursor: pointer;
}

.winamp-volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: #c0b856;
    border: 1px solid #505050;
    cursor: pointer;
}

.winamp-volume::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #c0b856;
    border: 1px solid #505050;
    cursor: pointer;
}

.winamp-playlist {
    border: 1px solid #404040;
    background-color: #1a1a1a;
    max-height: 100px;
    overflow-y: auto;
    margin: 3px;
}

.winamp-playlist-items {
    padding: 0;
}

.winamp-playlist-item {
    padding: 3px 4px;
    font-size: 9px;
    border-bottom: 1px solid #2a2a2a;
    cursor: pointer;
    user-select: none;
    color: #a0a0a0;
}

.winamp-playlist-item:hover {
    background-color: #0a4a7a;
    color: #ffff00;
}

.winamp-playlist-item.active {
    background-color: #0a4a7a;
    color: #ffff00;
    font-weight: bold;
}

.winamp-playlist::-webkit-scrollbar {
    width: 12px;
}

.winamp-playlist::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.winamp-playlist::-webkit-scrollbar-thumb {
    background: #505050;
    border: 1px solid #3a3a3a;
}

/* Bubbles Screensaver */
#bubbles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9998;
    overflow: hidden;
}

.bubble {
    position: absolute;
    pointer-events: none;
    transition: opacity 0.2s ease-out;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
    backdrop-filter: url(#svg-lens);
    -webkit-backdrop-filter: url(#svg-lens);
    border-radius: 50%;
    -webkit-mask-image: radial-gradient(circle, black 98%, transparent 100%);
    mask-image: radial-gradient(circle, black 98%, transparent 100%);
}

/* Fallback for Firefox which doesn't support backdrop-filter: url() */
.is-firefox .bubble {
    backdrop-filter: blur(4px) contrast(1.2) brightness(1.1);
    -webkit-backdrop-filter: blur(4px) contrast(1.2) brightness(1.1);
}

.bubble.popped {
    opacity: 0;
}

/* Disable text selection globally, but keep it for inputs */
body {
    user-select: none;
    -webkit-user-select: none;
}

input, textarea {
    user-select: auto;
    -webkit-user-select: auto;
}

/* Customization UI */
#customization-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

/* Windows Balloon Tooltip */
.win-balloon {
    position: fixed;
    background-color: #ffffe1;
    border: 1px solid #000;
    border-radius: 5px;
    padding: 8px 12px;
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
    font-size: 11px;
    color: #000;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
    z-index: 10000;
    pointer-events: none;
    max-width: 200px;
    transition: opacity 0.3s;
}

.win-balloon::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 20px;
    border-width: 10px 10px 0 0;
    border-style: solid;
    border-color: #ffffe1 transparent transparent transparent;
}

.win-balloon::before {
    content: '';
    position: absolute;
    bottom: -11px;
    left: 19px;
    border-width: 11px 11px 0 0;
    border-style: solid;
    border-color: #000 transparent transparent transparent;
}

#customization-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    z-index: 2000;
}

#customization-modal.hidden {
    display: none;
}

/* Rainbow Skin Animation */
@keyframes rainbow-hue {
    0% { filter: drop-shadow(0 10px 10px rgba(0,0,0,0.3)) hue-rotate(0deg); }
    100% { filter: drop-shadow(0 10px 10px rgba(0,0,0,0.3)) hue-rotate(360deg); }
}

.fa-human.rainbow-skin {
    animation: rainbow-hue 3s linear infinite;
}

.color-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.color-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 10px;
    cursor: pointer;
    text-align: left;
    min-height: 40px;
}

.color-option.active {
    font-weight: bold;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
}

.color-option.locked {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(1);
}

.color-preview {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.gold-bubble {
    filter: sepia(1) saturate(3) hue-rotate(5deg) brightness(1.2) drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
}
