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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: white;
    color: #333;
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

.header {
    color: #111;
    padding: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: space-between;

}

.header h1 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.header p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.content {
    padding: 20px;
}

.controls {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    align-items: center;
    flex-wrap: wrap;
}

.btn {
    background: white;
    color: #333;
    border: 1px solid #ccc;
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn:hover {
    background: #f5f5f5;
}

.btn.active {
    background: #111;
    color: white;
}

.password-group {
    display: none;
    align-items: center;
    gap: 8px;
}

.password-group.show {
    display: flex;
}

.password-input {
    padding: 6px 8px;
    border: 1px solid #ccc;
    font-size: 14px;
    width: 150px;
}

.password-input:focus {
    outline: none;
    border-color: #333;
}

.encryption-status {
    font-size: 12px;
    color: #666;
}

.editor-container {
    position: relative;
}

.note-area {
    width: 100%;
    min-height: 400px;
    border: 1px solid transparent;
    padding: 15px;
    font-size: 16px;
    line-height: 1.6;
    background: white;
    outline: none;
    overflow-y: auto;
}

.note-area:focus-within {
    border-color: #ccc;
}

/* Tiptap Editor Styling */
.ProseMirror {
    outline: none;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    min-height: 400px;
}

.ProseMirror p.is-editor-empty:first-child::before {
    content: attr(data-placeholder);
    float: left;
    color: #999;
    pointer-events: none;
    height: 0;
}

.ProseMirror h1 {
    font-size: 1.8em;
    font-weight: 600;
    margin: 1em 0 0.5em 0;
    padding-bottom: 0.3em;
}

.ProseMirror h2 {
    font-size: 1.5em;
    font-weight: 600;
    margin: 1em 0 0.5em 0;
}

.ProseMirror h3 {
    font-size: 1.3em;
    font-weight: 600;
    margin: 1em 0 0.5em 0;
}

.ProseMirror h4,
.ProseMirror h5,
.ProseMirror h6 {
    font-weight: 600;
    margin: 1em 0 0.5em 0;
}

.ProseMirror p {
    margin: 0.5em 0;
}

.ProseMirror ul,
.ProseMirror ol {
    margin: 0.5em 0;
    padding-left: 2em;
}

.ProseMirror li p {
    margin: 0.2em 0;
}

.ProseMirror blockquote {
    border-left: 3px solid #ddd;
    padding-left: 1em;
    margin: 1em 0;
    color: #666;
    font-style: italic;
}

.ProseMirror code {
    background: #f0f0f0;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9em;
}

.ProseMirror pre {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 10px;
    overflow-x: auto;
    margin: 1em 0;
    font-family: 'Monaco', 'Menlo', monospace;
}

.ProseMirror pre code {
    background: none;
    padding: 0;
}

.ProseMirror a {
    color: #0066cc;
    text-decoration: underline;
}

.ProseMirror strong {
    font-weight: 600;
}

.ProseMirror em {
    font-style: italic;
}

.ProseMirror hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 2em 0;
}

.url-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.url-label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

.url-display {
    background: #f8f8f8;
    border: 1px solid #ddd;
    padding: 10px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 10px;
    width: 100%;
    cursor: pointer;
}

.url-display:focus {
    outline: 2px solid #333;
    outline-offset: -1px;
}

.copy-btn {
    background: #111;
    color: white;
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
}

.copy-btn:hover {
    background: #333;
}

.status {
    margin-top: 10px;
    padding: 8px;
    font-size: 13px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.status.success {
    background: #f0f8f0;
    color: #0a5a0a;
    border: 1px solid #ccc;
    opacity: 1;
}

.status.error {
    background: #f8f0f0;
    color: #5a0a0a;
    border: 1px solid #ccc;
    opacity: 1;
}

.tip {
    margin-top: 20px;
    padding: 15px;
    background: #f8f8f8;
    border-left: 3px solid #111;
    font-size: 13px;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border: 1px solid #111;
    padding: 20px;
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.modal-content h3 {
    margin-bottom: 10px;
    font-size: 1.2em;
}

.modal-content p {
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.modal-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    font-size: 14px;
    margin-bottom: 15px;
}

.modal-input:focus {
    outline: none;
    border-color: #333;
}

.modal-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.modal-btn {
    padding: 8px 16px;
    border: 1px solid #ccc;
    font-size: 14px;
    cursor: pointer;
    background: white;
}

.modal-btn.primary {
    background: #111;
    color: white;
    border-color: #111;
}

.modal-btn:hover {
    background: #f5f5f5;
}

.modal-btn.primary:hover {
    background: #333;
}

@media (max-width: 600px) {
    .controls {
        flex-direction: column;
        align-items: flex-start;
    }

    .password-group {
        width: 100%;
    }

    .password-input {
        width: 100%;
    }
}
