* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

body {
    background-color: #ffffff;
}

/* Navigation Bar Styles */

.nav {
    justify-content: space-between;
    align-items: center;
    display: flex;
    position: fixed;
    top: 0;
    height: 64px;
    width: 100%;
    background-color: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    padding: 0 20px;
    z-index: 10;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-right: 25px;
    flex-grow: 1;
}

.nav-left h1 {
    font-size: 22px;
    font-weight: 400;
    color: rgb(31,31,31);
}

.nav-left img[alt="Google Keep Logo"] {
    width: 40px;
    height: 40px;
}

#menu-icon {
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

#profile-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
}

.search-bar {
    display: flex;
    align-items: center;
    position: relative;
    margin-left: 70px;
    max-width: 722px;
    flex-grow: 1;
}

#search-input {
    background-color: rgb(240, 244, 249);
    border: none;
    width: 100%;
    height: 46px;
    border-radius: 8px;
    padding: 0 48px;
    font-size: 16px;
}

#search-icon {
    position: absolute;
    left: 12px;
    width: 40px;
    height: 40px;
    color: rgb(68,71,70);
    padding: 8px;
}

#search-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px #4285f4;
}

.material-symbols-outlined {
    font-size: 24px;
    color: rgb(68,71,70);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
}

.material-symbols-outlined:hover {
    color: #000;
    background-color: #e0e0e0;
}

/* Sidebar Styles */

.sidebar {
    position: fixed;
    top: 64px;
    left: 0;
    width: 280px;
    height: calc(100% - 64px);
    background-color: white;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 8px;
}

.sidebar-item img {
    width: 24px;
    height: 24px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    width: 100%;
    gap: 20px;
    padding: 12px 25px;
    border-radius: 0 25px 25px 0;
    font-size: 14px;
}

.sidebar-item span {
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
    padding-left: 10px;
    color: rgb(32,33,36);
}

.sidebar-item:hover {
    background-color: #f0f0f0;
    color: #000;
}

.sidebar-item.active {
    background-color: #feefc3;
}

/* Main Styles */

.main {
    margin-left: 280px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin-top: 64px;
}

/* Note Input */
.note-input {
    width: 100%;
    max-width: 600px;
    border: 1px solid rgb(224,224,224);
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.15);
    margin-bottom: 32px;
    align-self: center;
}

.note-input #title {
    width: 100%;
    padding: 4px 0;
    border: none;
    outline: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
}

.note-input #note {
    width: 100%;
    border: none;
    outline: none;  
    resize: none;
    font-size: 14px;
}

.note-input-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.note-input-actions button {
    background: none;
    padding: 8px 16px;
    color: rgb(32,33,36);
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.note-input-actions button:hover {
    background-color: #f1f3f4;
}

#organise-btn {
    display: flex;
    align-items: center;
    gap: 4px;
}

#organise-btn .material-symbols-outlined {
    font-size: 18px;
    padding: 0;
}

#organise-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Notes List */

#notes-list {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 16px;
}

.note-card {
    position: relative;
    border: 1px solid rgb(224,224,224);
    border-radius: 8px;
    padding: 16px;
    width: 280px;
    display: flex;
    flex-direction: column;
    cursor: default;
    transition: box-shadow 0.2s ease;
}

.note-card:hover {
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

.note-card h2 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
}

.note-card p {
    font-size: 14px;
    color: rgb(32,33,36);
}

.note-card .card-actions {
    display: flex;
    justify-content: flex-start;
    gap: 4px;
    margin-top: auto;
    padding-top: 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.note-card:hover .card-actions {
    opacity: 1;
}

.note-card .card-actions .material-symbols-outlined {
    font-size: 18px;
    color: rgb(95,99,104);
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
}

.note-card .card-actions .material-symbols-outlined:hover {
    background-color: rgba(95, 99, 104, 0.1);
}

.note-card .pin-btn, .note-card .unpin-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 20px;
    color: rgb(95,99,104);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.note-card:hover .pin-btn, .note-card:hover .unpin-btn {
    opacity: 1;
}

.section-label {
    font-size: 11px;
    font-weight: 500;
    color: rgb(95,99,104);
    text-transform: uppercase;
    padding: 16px 0 8px 8px;
    width: 100%;
}

/* Pinned Notes Section */

#pinned-notes, #unpinned-notes {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: flex-start;
    align-items: flex-start;
}

#notes-list.list-view #pinned-notes, #notes-list.list-view #unpinned-notes {
    flex-direction: column;
    align-items: center;
}

#notes-list.list-view {
    max-width: 600px;
    align-self: center;
}

#notes-list.list-view .note-card {
    width: 100%;
}

/* Responsive Design */

@media (max-width: 768px) {
    .nav-left {
        gap: 8px;
    }

    .search-bar {
        display: none;
    }

    .sidebar {
        width: 80px;
    }

    .sidebar-item {
        justify-content: center;
        width: 48px;
        height: 48px;
        margin: 4px auto;
        border-radius: 50%;
    }

    .sidebar-item span {
        display: none;
    }

    .main {
        margin-left: 80px;
        padding: 16px;
    }

    .note-input {
        width: 100%;
        max-width: none;
    }

    .note-card {
        width: 100%;
    }

    .nav-right #mobile-removed {
        display: none;
    }

}

/* ===== Speech-to-Text Styles ===== */

/* Sidebar recording state */
.sidebar-item.recording {
    background-color: #fce4ec;
}

/* Floating indicator snackbars */
#recording-indicator,
#processing-indicator {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #323232;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    z-index: 50;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#recording-indicator span,
#processing-indicator span {
    color: #fff;
    font-size: 14px;
}

/* Pulsing mic icon during recording */
.recording-pulse {
    color: #ef5350 !important;
    animation: pulse 1s ease-in-out infinite;
}

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

/* Loading spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Bullet point lists inside note cards */
.note-card ul {
    list-style: disc;
    padding-left: 20px;
    margin: 4px 0 0 0;
}

.note-card ul li {
    font-size: 14px;
    color: rgb(32, 33, 36);
    margin-bottom: 4px;
    line-height: 1.4;
}

/* ===== AI Organised Note Styles ===== */

.organised-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.organised-category {
    font-size: 12px;
    color: rgb(95, 99, 104);
    background-color: #f1f3f4;
    padding: 2px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.organised-priority {
    font-size: 11px;
    color: #fff;
    padding: 2px 10px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.organised-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.organised-tag {
    font-size: 12px;
    color: #1a73e8;
    background-color: #e8f0fe;
    padding: 2px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.organised-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 4px 0 0 0;
}

.action-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: rgb(32, 33, 36);
    line-height: 1.4;
}

.action-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #1a73e8;
    flex-shrink: 0;
}

.action-item:has(input:checked) span {
    text-decoration: line-through;
    color: rgb(95, 99, 104);
}

/* Empty State Styles */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 0;
    width: 100%;
    align-self: center;
}

.empty-state .empty-state-icon {
    font-size: 120px;
    color: rgb(218,220,224);
    padding: 0;
    cursor: default;
}

.empty-state .empty-state-icon:hover {
    background-color: transparent;
    color: rgb(218,220,224);
}

.empty-state-text {
    font-size: 16px;
    color: rgb(128,134,139);
    margin-top: 16px;
    font-weight: 400;
}

.bin-info {
    font-size: 13px;
    text-align: center;
    padding: 12px;
    width: 100%;
    color: rgb(176,96,0);
}