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

body {
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#desktop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: all 0.3s ease;
    overflow: hidden;
}

#notes-container {
    position: relative;
    width: 100%;
    height: calc(100% - 40px);
}

.sticky-note {
    position: absolute;
    min-width: 200px;
    max-width: 320px;
    background: #ffeb3b;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    transition: box-shadow 0.2s ease;
    z-index: 100;
}

.sticky-note:hover {
    box-shadow: 0 12px 24px rgba(0,0,0,0.3);
}

.sticky-note.pinned {
    box-shadow: 0 0 0 3px #ff6b6b, 0 8px 16px rgba(0,0,0,0.2);
    z-index: 1000;
}

.note-header {
    padding: 8px;
    background: rgba(0,0,0,0.1);
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: flex-end;
    cursor: move;
}

.note-controls {
    display: flex;
    gap: 8px;
}

.note-controls span {
    cursor: pointer;
    font-size: 18px;
    transition: transform 0.1s;
}

.note-controls span:hover {
    transform: scale(1.1);
}

/* Para que el texto no se pegue a la imagen */
.note-content {
    overflow: auto;
}

.note-content[contenteditable="true"] {
    outline: none;
    cursor: text;
}

/* Miniaturas de imágenes - 1/4 del tamaño de la nota */
.link-preview-image {
    float: left;
    width: 25%;
    margin: 4px 8px 4px 0;
    border-radius: 6px;
    overflow: hidden;
    background: rgba(0,0,0,0.05);
}

.link-preview-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Miniaturas de YouTube - ancho completo */
.link-preview-video {
    clear: both;
    margin: 8px 0;
    border-radius: 6px;
    overflow: hidden;
    width: 100%;
}

.link-preview-video iframe {
    width: 100%;
    height: 180px;
    border: none;
}




#taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 20px;
    z-index: 10000;
}

#system-tray {
    position: relative;
}

#tray-icon {
    color: white;
    cursor: pointer;
    font-size: 24px;
    transition: transform 0.2s;
}

#tray-icon:hover {
    transform: scale(1.1);
}

.context-menu {
    position: absolute;
    bottom: 40px;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    min-width: 180px;
    z-index: 10001;
}

.context-menu .menu-item {
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 14px;
}

.context-menu .menu-item:hover {
    background: #f0f0f0;
}

.hidden {
    display: none;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20000;
}

.modal-content {
    background: white;
    padding: 24px;
    border-radius: 12px;
    min-width: 300px;
    position: relative;
}

.resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    cursor: nw-resize;
    background: linear-gradient(135deg, transparent 50%, rgba(0,0,0,0.2) 50%);
    border-radius: 0 0 8px 0;
}

/* Texto dentro de notas */
.note-content a {
    color: #0066cc;
    text-decoration: underline;
    word-break: break-all;
}

.note-content br {
    margin-bottom: 4px;
}