/* Notebook Virtual Styles */

.notebook-container {
    display: grid;
    grid-template-columns: 340px 1fr;
    grid-template-rows: auto;
    gap: 1.5rem;
    margin-top: 2rem;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sidebar */
.notes-sidebar {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 24px;
    padding: 2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    max-height: calc(100vh - 250px);
    animation: slideInLeft 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.sidebar-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

/* Força h2 preto no modo claro */
:root:not([data-theme="dark"]) h2 {
    color: #000000 !important;
}

.btn-new-note {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.25), 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-new-note:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.35), 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn-new-note:active {
    transform: translateY(-2px) scale(1.02);
}

.search-box {
    margin-bottom: 1rem;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.filter-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.filter-tab {
    flex: 1;
    padding: 0.6rem 0.8rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-dim);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-tab:hover {
    background: var(--card-bg);
    border-color: var(--primary);
    color: var(--text-primary);
}

.filter-tab.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.notes-count {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 0.75rem;
    padding: 0 0.25rem;
}

.btn-sort {
    width: 28px;
    height: 28px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-sort:hover {
    background: var(--primary);
    color: white;
    border-color: transparent;
    transform: rotate(180deg);
}

.notes-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.note-item {
    padding: 1.25rem;
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.note-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    transform: scaleY(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.note-item:hover {
    border-color: var(--border-color);
    transform: translateX(6px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.note-item:hover::before {
    transform: scaleY(1);
}

.note-item.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
    border-color: var(--primary);
    transform: translateX(8px);
    box-shadow: 0 6px 24px rgba(102, 126, 234, 0.25);
}

.note-item.active::before {
    transform: scaleY(1);
}

.note-item-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.note-item-preview {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.note-item-date {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 0.5rem;
}

.empty-notes {
    text-align: center;
    padding: 4rem 1.5rem;
    color: var(--text-dim);
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.6;
}

.empty-notes p {
    font-size: 1.05rem;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.empty-notes small {
    font-size: 0.9rem;
    opacity: 0.6;
    display: block;
    margin-top: 0.5rem;
}

/* Editor */
.note-editor {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    max-height: calc(100vh - 250px);
    animation: slideInRight 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.editor-header-label {
    padding: 1.5rem 2rem 1rem;
    border-bottom: 2px solid var(--border-color);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
}

.editor-header-label h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Força editor h2 preto no modo claro */
:root:not([data-theme="dark"]) .editor-header-label h2 {
    background: none !important;
    -webkit-text-fill-color: #000000 !important;
    color: #000000 !important;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.no-note-selected {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 4rem;
    color: var(--text-dim);
    animation: fadeIn 0.6s ease-out;
}

.no-note-icon {
    font-size: 5rem;
    margin-bottom: 2rem;
    opacity: 0.5;
    filter: drop-shadow(0 4px 12px rgba(102, 126, 234, 0.2));
}

.no-note-selected h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.no-note-selected p {
    font-size: 1.05rem;
    opacity: 0.7;
    max-width: 400px;
}

.editor-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.editor-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2.5rem;
    border-bottom: 2px solid var(--border-color);
    background: linear-gradient(180deg, var(--card-bg) 0%, var(--bg-secondary) 100%);
}

.note-title-input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
    padding: 0.5rem 0;
    outline: none;
}

.note-title-input::placeholder {
    color: var(--text-dim);
    opacity: 0.5;
}

.editor-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-favorite,
.btn-tags,
.btn-share {
    background: transparent;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 0.65rem 0.85rem;
    cursor: pointer;
    font-size: 1.3rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.btn-favorite:hover {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(251, 191, 36, 0.3);
}

.btn-favorite.active {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
}

.btn-tags:hover {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.3);
}

.btn-share:hover {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3);
}

.last-saved {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.btn-delete {
    background: transparent;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 0.65rem 0.85rem;
    cursor: pointer;
    font-size: 1.3rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.btn-delete:hover {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.3);
}

.editor-formatting {
    display: flex;
    flex-direction: row;
    gap: 0.25rem;
    padding: 0.7rem 0.5rem 0.7rem 0.5rem;
    border-bottom: 2px solid var(--border-color);
    background: var(--bg-secondary);
    flex-wrap: nowrap;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.format-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
    margin: 0;
}
@media (max-width: 600px) {
    .editor-formatting {
        gap: 0.15rem;
        padding: 0.5rem 0.2rem;
    }
    .format-btn {
        width: 28px;
        height: 28px;
        min-width: 28px;
        min-height: 28px;
        font-size: 0.95rem;
        border-radius: 6px;
    }
}

.format-btn:hover {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.3);
}

.format-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

.format-divider {
    width: 2px;
    background: var(--border-color);
    margin: 0 0.5rem;
}

.format-select {
    height: 40px;
    padding: 0 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.format-select:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.color-picker {
    width: 40px;
    height: 40px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    background: var(--card-bg);
    transition: all 0.3s ease;
}

.color-picker:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.3);
}

.note-content {
    flex: 1;
    padding: 2.5rem;
    overflow-y: auto;
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--text-primary);
    outline: none;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.note-content:empty:before {
    content: attr(data-placeholder);
    color: var(--text-dim);
    opacity: 0.4;
    font-style: italic;
}

.note-content:focus {
    background: linear-gradient(180deg, 
        rgba(102, 126, 234, 0.03) 0%, 
        rgba(118, 75, 162, 0.02) 100%
    );
}

.note-content p {
    margin-bottom: 1rem;
}

.note-content ul, .note-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.note-content li {
    margin-bottom: 0.5rem;
}

.editor-footer {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-top: 2px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-dim);
    background: var(--bg-secondary);
    flex-wrap: wrap;
}

.footer-divider {
    opacity: 0.5;
}

/* Animações */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.note-item {
    animation: slideInRight 0.3s ease-out;
}

/* Scrollbar customizado */
.notes-sidebar::-webkit-scrollbar,
.note-content::-webkit-scrollbar {
    width: 8px;
}

.notes-sidebar::-webkit-scrollbar-track,
.note-content::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 10px;
}

.notes-sidebar::-webkit-scrollbar-thumb,
.note-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

.notes-sidebar::-webkit-scrollbar-thumb:hover,
.note-content::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Mobile First - Otimizado para touch */

/* Aumentar áreas de toque (mínimo 44x44px) */
.format-btn,
.btn-favorite,
.btn-tags,
.btn-share,
.btn-delete {
    min-width: 44px;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
}

/* Prevenir zoom em inputs no iOS */
input,
textarea,
select,
[contenteditable] {
    font-size: 16px !important;
}

/* Smooth scroll para mobile */
.notes-sidebar,
.note-content {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* Responsivo Mobile First */
@media (max-width: 1024px) {
    .notebook-container {
        grid-template-columns: 280px 1fr;
        gap: 1rem;
        padding: 0 0.75rem;
    }
}

@media (max-width: 768px) {
    /* Layout vertical para tablet */
    .notebook-container {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 1rem;
        padding: 0 0.75rem;
    }

    .notes-sidebar {
        border-radius: 20px;
        padding: 1.25rem;
        max-height: none;
        position: relative;
        margin-bottom: 1rem;
    }

    .note-editor {
        border-radius: 20px;
        min-height: 60vh;
        max-height: none;
        position: relative;
    }

    .editor-toolbar {
        padding: 1.25rem;
        flex-wrap: wrap;
    }

    .editor-formatting {
        padding: 0.85rem 1rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        gap: 0.4rem;
    }

    .editor-formatting::-webkit-scrollbar {
        height: 4px;
    }

    .editor-formatting::-webkit-scrollbar-thumb {
        background: var(--border-color);
        border-radius: 4px;
    }

    .note-content {
        padding: 1.5rem;
        min-height: 50vh;
        font-size: 16px;
    }

    .filter-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .filter-tabs::-webkit-scrollbar {
        display: none;
    }
}

/* Mobile Otimizado (smartphones) */
@media (max-width: 480px) {
    body {
        padding-bottom: 0;
    }

    .notebook-container {
        margin-top: 0.5rem;
        padding: 0 0.5rem;
        gap: 0.75rem;
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: none !important;
    }

    /* Sidebar compacta */
    .notes-sidebar {
        padding: 1rem;
        max-height: none;
        border-radius: 16px;
        position: relative !important;
        margin-bottom: 1rem;
        width: 100%;
        z-index: 1;
    }

    .sidebar-header {
        margin-bottom: 0.75rem;
    }

    .sidebar-header h2 {
        font-size: 1.1rem;
    }

    .btn-new-note {
        width: 42px;
        height: 42px;
        font-size: 1.75rem;
        border-radius: 12px;
    }

    .search-box input {
        padding: 0.65rem 0.85rem;
        font-size: 15px;
        border-radius: 10px;
    }

    .filter-tabs {
        gap: 0.4rem;
        margin-bottom: 0.75rem;
    }

    .filter-tab {
        padding: 0.55rem 0.7rem;
        font-size: 0.8rem;
        white-space: nowrap;
        flex-shrink: 0;
        border-radius: 10px;
    }

    .notes-count {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }

    .btn-sort {
        width: 32px;
        height: 32px;
    }

    .note-item {
        padding: 1rem;
        border-radius: 14px;
        margin-bottom: 0.5rem;
    }

    .note-item-title {
        font-size: 0.9rem;
    }

    .note-item-preview {
        font-size: 0.8rem;
        line-height: 1.3;
    }

    .note-item-date {
        font-size: 0.7rem;
        margin-top: 0.35rem;
    }

    /* Editor otimizado para touch */
    .note-editor {
        border-radius: 16px;
        min-height: 60vh;
        max-height: none;
        width: 100%;
        position: relative !important;
        z-index: 1;
    }
    
    .editor-header-label {
        padding: 1rem 1rem 0.75rem;
    }
    
    .editor-header-label h2 {
        font-size: 1.2rem;
    }

    .editor-toolbar {
        padding: 1rem;
        gap: 0.75rem;
        border-radius: 16px 16px 0 0;
    }

    .note-title-input {
        font-size: 1.2rem;
        padding: 0.5rem 0;
        width: 100%;
    }

    .editor-actions {
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .btn-favorite,
    .btn-tags,
    .btn-share,
    .btn-delete {
        padding: 0.55rem 0.65rem;
        font-size: 1.1rem;
        border-radius: 8px;
        min-width: 38px;
        height: 38px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .last-saved {
        font-size: 0.75rem;
        order: -1;
        width: 100%;
        text-align: left;
    }

    /* Toolbar de formatação mobile */
    .editor-formatting {
        padding: 0.75rem 0.75rem;
        gap: 0.35rem;
        border-radius: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .format-btn {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
        border-radius: 8px;
        flex-shrink: 0;
        min-width: 36px;
    }

    .format-divider {
        height: 26px;
        margin: 0 0.25rem;
        flex-shrink: 0;
    }

    .format-select {
        height: 36px;
        padding: 0 0.65rem;
        font-size: 0.8rem;
        border-radius: 8px;
        flex-shrink: 0;
        min-width: 80px;
    }

    .color-picker {
        width: 36px;
        height: 36px;
        border-radius: 8px;
        flex-shrink: 0;
        min-width: 36px;
    }

    /* Área de escrita otimizada */
    .note-content {
        padding: 1.25rem;
        min-height: 45vh;
        font-size: 16px;
        line-height: 1.7;
        text-align: left;
    }

    .note-content:empty:before {
        font-size: 15px;
    }

    /* Footer compacto */
    .editor-footer {
        padding: 0.85rem 1rem;
        font-size: 0.75rem;
        gap: 0.6rem;
        flex-wrap: wrap;
    }

    .footer-divider {
        margin: 0 0.15rem;
    }

    /* Empty states mobile */
    .empty-notes {
        padding: 2.5rem 1rem;
    }

    .empty-icon {
        font-size: 3rem;
        margin-bottom: 1rem;
    }

    .empty-notes p {
        font-size: 0.95rem;
    }

    .empty-notes small {
        font-size: 0.8rem;
    }

    .no-note-selected {
        padding: 2.5rem 1.5rem;
    }

    .no-note-icon {
        font-size: 3.5rem;
        margin-bottom: 1.25rem;
    }

    .no-note-selected h3 {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }

    .no-note-selected p {
        font-size: 0.95rem;
    }
}

/* iPhone SE e telas muito pequenas */
@media (max-width: 375px) {
    .notebook-container {
        padding: 0 0.35rem;
    }

    .notes-sidebar {
        padding: 0.85rem;
        max-height: 32vh;
    }

    .sidebar-header h2 {
        font-size: 1rem;
    }

    .btn-new-note {
        width: 38px;
        height: 38px;
        font-size: 1.5rem;
    }

    .filter-tab {
        font-size: 0.75rem;
        padding: 0.5rem 0.6rem;
    }

    .note-item {
        padding: 0.85rem;
    }

    .editor-toolbar {
        padding: 0.85rem;
    }

    .note-title-input {
        font-size: 1.1rem;
    }

    .format-btn {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
        min-width: 32px;
    }

    .format-select {
        height: 32px;
        font-size: 0.75rem;
        padding: 0 0.5rem;
        min-width: 75px;
    }

    .color-picker {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }

    .btn-favorite,
    .btn-tags,
    .btn-share,
    .btn-delete {
        width: 34px;
        height: 34px;
        min-width: 34px;
        padding: 0.45rem;
        font-size: 1rem;
    }

    .note-content {
        padding: 1rem;
        font-size: 15px;
    }

    .editor-footer {
        padding: 0.75rem;
        font-size: 0.7rem;
    }
}

/* Landscape mode para smartphones */
@media (max-height: 500px) and (orientation: landscape) {
    .notes-sidebar {
        max-height: 25vh;
    }

    .note-editor {
        max-height: 65vh;
    }

    .note-content {
        min-height: 35vh;
    }
}

/* PWA standalone mode */
@media (display-mode: standalone) {
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }

    .notebook-container {
        margin-top: 0.5rem;
    }
}

/* Botão de toggle público da anotação */
#publicToggle {
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 16px;
  border: 2px solid var(--primary);
  padding: 0.3rem 1.2rem;
  cursor: pointer;
  outline: none;
  box-shadow: 0 2px 8px rgba(102,126,234,0.07);
}
#publicToggle:hover {
  background: linear-gradient(135deg, #667eea, #9333ea);
  color: #fff;
  box-shadow: 0 4px 16px rgba(102,126,234,0.15);
}
