﻿#board-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    position: relative;
    overflow: hidden;
}

#corkboard {
    flex-grow: 1;
    position: relative;
    background-color: var(--bg-base);
    background-image: radial-gradient(var(--border-color) 1px, transparent 1px);
    background-size: 24px 24px;
    width: 100%;
    height: calc(100vh - 60px);
    overflow: hidden;
    touch-action: none;
}

/* Floating Action Button */
#fab-add-note {
    position: absolute;
    bottom: 30px;
    left: 30px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: var(--accent);
    color: #fff;
    border: none;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.2s, opacity 0.3s;
}

    #fab-add-note:hover:not(:disabled) {
        transform: scale(1.08);
        filter: brightness(1.1);
    }

    #fab-add-note:active:not(:disabled) {
        transform: scale(0.95);
    }

    #fab-add-note:disabled {
        background-color: var(--bg-surface);
        color: var(--text-muted);
        cursor: not-allowed;
        box-shadow: none;
        opacity: 0.6;
    }

/* Modal Overlay & Content */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

    .modal-overlay.active {
        visibility: visible;
        opacity: 1;
    }

.modal-content {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 24px;
    border-radius: 16px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(20px) scale(0.95);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 16px;
    color: var(--text-main);
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 1.25rem;
}

#note-input {
    width: 100%;
    background: var(--bg-base);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 14px;
    border-radius: 10px;
    resize: none;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
    margin-bottom: 20px;
    transition: border-color 0.2s;
}

    #note-input:focus {
        border-color: var(--accent);
    }

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

    .modal-actions button {
        padding: 10px 18px;
        border-radius: 8px;
        font-size: 0.95rem;
        font-weight: 600;
        cursor: pointer;
        border: none;
        transition: background 0.2s, filter 0.2s, transform 0.1s;
    }

        .modal-actions button:active {
            transform: scale(0.96);
        }

#btn-cancel {
    background: transparent;
    color: var(--text-muted);
}

    #btn-cancel:hover {
        color: var(--text-main);
        background: var(--bg-surface-hover);
    }

#btn-post {
    background: var(--accent);
    color: #fff;
}

    #btn-post:hover {
        filter: brightness(1.1);
    }

/* Sticky Note Styles */
.sticky-note {
    position: absolute;
    width: 160px;
    min-height: 160px;
    padding: 16px;
    color: #1a1a1a;
    box-shadow: 2px 4px 12px rgba(0,0,0,0.4);
    border-radius: 2px 2px 15px 2px;
    cursor: grab;
    user-select: none;
    word-wrap: break-word;
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.3;
    transition: transform 0.1s ease-out, box-shadow 0.1s ease-out;
}

    .sticky-note.dragging {
        cursor: grabbing;
        transform: scale(1.08) !important;
        z-index: 9000 !important;
        box-shadow: 8px 15px 25px rgba(0,0,0,0.5);
    }

.note-yellow {
    background: #fdfd96;
}

.note-blue {
    background: #aec6cf;
}

.note-pink {
    background: #ffb7b2;
}

.note-green {
    background: #c1e1c1;
}

.note-purple {
    background: #e2c1e1;
}

.note-orange {
    background: #ffdac1;
}

.pop-in {
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@media (max-width: 600px) {
    #fab-add-note {
        bottom: 20px;
        left: 20px;
        width: 56px;
        height: 56px;
    }

    .sticky-note {
        width: 130px;
        min-height: 130px;
        font-size: 0.85rem;
    }
}
