body{
    background-color: #212121;
    background-size: cover;
    background-repeat: no-repeat;
    padding: 20px;
    color: #fff;
}


.side-panel{
    position:fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 200px;
    background-color: #181818;
    color: white;

    transform: translateX(-200px);
    transition: transform 0.3s ease;
    
    z-index: 1000;
}

.side-panel.open{
    transform: translateX(0);
}

.panel-tab{
    position: absolute;
    right: -30px;
    top: 20px;
    width: 30px;
    height: 30px;
    background: #444;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 0 8px 8px 0;
    text-align: center;
    z-index: 1001;
}

.panel-content {
    padding: 20px;
}

/* each item under the board list*/
.board-item{
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin-bottom: 10px;
    padding: 5px;
}

.board-item:hover{
    background-color: #585454;
    cursor: pointer;
}

.board-item:hover .menu-btn{
    opacity: 1;
}

.board-item:hover .dropdown-item:hover{
    
    background-color: #00bcd4;
}

.board-item.active-note {
    background-color: #3d3d3d;
    border-left: 4px solid #00bcd4;
}

.menu-btn{
    background: none;
    border: none;
    cursor: pointer;
    color: white;

    opacity: 0;
    transition: opacity 0.2s ease;
}


.dropdown {
    display: none;
    position: absolute;
    right: 5px;
    top: 30px;
    background-color: #444;
    border: 1px solid #555;
    z-index: 1000;
    min-width: 120px;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.dropdown.show{
    display: block;
    background-color: #786d6d;
}


.hidden{
    display: none;
}

#notesList li.active-note,
#newNote.active-note{
    background-color: #3d3939;
}

.truncate{
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
    display: inline-block;
}

#statusIndicator{
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #333;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1000;
}

#statusIndicator.active{
    opacity: 1;
}

/* --- Bulletin Board Canvas --- */
#bulletinBoard {
    width: 100%;
    height: 80vh;
    position: relative;
    background-image: radial-gradient(#444 1px, transparent 1px);
    background-size: 30px 30px;
    background-color: #212121;
    border: 2px dashed #444;
    margin-top: 20px;
    overflow: hidden;
    border-radius: 8px;
}

/* --- The Sticky Note --- */
.sticky-note {
    position: absolute;
    width: 200px;
    height: 200px;
    min-width: 150px;
    min-height: 100px;
    max-width: 500px;
    max-height: 500px;

    overflow: hidden;
    resize: both;

    background-color: #fdfd86;
    color: #333;
    padding: 10px;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    border-radius: 2px;
    transition: transform 0.1s ease;
    z-index: 10;
}

.sticky-note:active {
    cursor: grabbing;
    transform: scale(1.02);
    z-index: 1000;
}

/* --- Drag Handle (The dots at the top) --- */
.drag-handle {
    cursor: grab;
    text-align: center;
    font-size: 18px;
    color: #888;
    user-select: none;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

/* --- Sticky Note Textarea --- */
.sticky-note textarea {
    flex-grow: 1;
    background: transparent;
    border: none;
    resize: none;
    outline: none;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
}

/* --- Delete Button (X) on Sticky --- */
.delete-sticky {
    position: absolute;
    top: 5px;
    right: 8px;
    cursor: pointer;
    color: #cc0000;
    font-weight: bold;
    opacity: 0.3;
}

.sticky-note:hover .delete-sticky {
    opacity: 1;
}

/* --- Sidebar Rename Input --- */
.rename-input {
    background: #444;
    color: white;
    border: 1px solid #00bcd4;
    padding: 2px 5px;
    width: 80%;
}

#boardContextMenu {
    position: fixed;
    left: 0;
    top: 0;
    right: auto;
    min-width: 120px;
    width: max-content;
    background-color: #2a2a2a; 
    border: 1px solid #555;
    padding: 5px 0;
    z-index: 5000;
}

#boardContextMenu .dropdown-item {
    padding: 10px 20px;
    font-size: 14px;
    color: #fff;
    white-space: nowrap;
}

#boardContextMenu .dropdown-item:hover {
    background-color: #00bcd4;
    color: #fff;
    cursor: pointer;
}
