/* Custom cursor styles */

* {
    cursor: none !important;
}

.custom-cursor {
    width: 40px;
    height: 40px;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), height 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease;
    mix-blend-mode: difference;
}

.cursor-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: pulse 2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

.cursor-gradient {
    position: absolute;
    inset: -1px;
    background: conic-gradient( from 0deg, #9feb25, #60a5fa, #93fd93, #60a5fa, #eb2556);
    border-radius: 50%;
    filter: blur(10px);
    opacity: 0.5;
    animation: rotate 4s linear infinite;
    mix-blend-mode: screen;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%) scale(1);
    transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    mix-blend-mode: difference;
}


/* Hover effects */

.custom-cursor.hover {
    width: 60px;
    height: 60px;
}

.custom-cursor.hover .cursor-ring {
    animation: pulse 1.5s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

.cursor-dot.hover {
    transform: translate(-50%, -50%) scale(0);
}


/* Click effects */

.custom-cursor.clicking {
    width: 35px;
    height: 35px;
}

.custom-cursor.clicking .cursor-gradient {
    filter: blur(5px);
    opacity: 0.8;
}

.cursor-dot.clicking {
    transform: translate(-50%, -50%) scale(1.5);
}


/* Text hover effect */

.custom-cursor.text {
    width: 25px;
    height: 25px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: invert(1);
}

.cursor-dot.text {
    width: 3px;
    height: 15px;
    border-radius: 1px;
    transform: translate(-50%, -50%);
}


/* Animations */

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

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.3;
    }
    100% {
        transform: scale(1);
        opacity: 0.5;
    }
}


/* Magnetic effect animation */

@keyframes magnetic {
    0% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}


/* Hide cursor when inactive */

.custom-cursor.inactive,
.cursor-dot.inactive {
    opacity: 0;
    transition: opacity 0.3s ease;
}


/* Search container and box styles */

.search-container {
    margin: 12px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: relative;
    transition: all 0.3s ease;
}

.search-container:focus-within {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.search-box {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #ffffff;
    border-radius: 12px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: #4a9eff;
}

.search-box input {
    border: none;
    background: none;
    padding: 4px 12px;
    width: 100%;
    outline: none;
    font-size: 15px;
    color: #2c3e50;
    font-family: 'Inter', sans-serif;
}

.search-box input::placeholder {
    color: #94a3b8;
    transition: color 0.3s ease;
}

.search-box input:focus::placeholder {
    color: #cbd5e1;
}

.search-box i.fa-search {
    color: #94a3b8;
    font-size: 16px;
    transition: color 0.3s ease;
}

.search-box:focus-within i.fa-search {
    color: #4a9eff;
}

.search-options button {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #94a3b8;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.search-options button:hover {
    color: #4a9eff;
    background: #f1f5f9;
}


/* Search filters */

.search-filters {
    padding: 16px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    border-radius: 0 0 12px 12px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-filters label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    font-size: 14px;
    color: #64748b;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.search-filters label:hover {
    background: #f8fafc;
    color: #334155;
}

.search-filters input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    margin: 0;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.search-filters input[type="checkbox"]:checked {
    background: #4a9eff;
    border-color: #4a9eff;
}

.search-filters input[type="checkbox"]:checked::after {
    content: '✓';
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
}


/* Search results */

.search-results {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 8px;
    padding: 8px;
    border-top: 1px solid #e2e8f0;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

.search-results::-webkit-scrollbar {
    width: 6px;
}

.search-results::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.search-results::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.search-result-item {
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 8px;
}

.search-result-item:hover {
    background: #f8fafc;
    transform: translateX(4px);
}

.search-result-title {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
    font-size: 15px;
}

.search-result-content {
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-highlight {
    background-color: rgba(74, 158, 255, 0.2);
    color: #1e293b;
    padding: 0 4px;
    border-radius: 4px;
    font-weight: 500;
}


/* Empty state */

.search-results:empty::after {
    content: 'Type to search...';
    display: block;
    text-align: center;
    padding: 24px;
    color: #94a3b8;
    font-size: 14px;
}

.search-results:empty {
    border-top: none;
}


/* Hide pages when showing search results */

.search-active .pages .page {
    display: none;
}

.search-active .pages .add-page {
    display: none;
}


/* Page actions */

.page-actions {
    margin-left: auto;
    display: none;
    gap: 8px;
}

.page:hover .page-actions {
    display: flex;
}

.page-actions i {
    cursor: pointer;
    color: #666;
    font-size: 14px;
    padding: 4px;
}

.page-actions i:hover {
    color: #000;
}


/* Table styles */

.editor table {
    margin: 16px 0;
    width: 100%;
    border-collapse: collapse;
}

.editor th {
    background: #f5f5f5;
    font-weight: 600;
}

.editor td,
.editor th {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}


/* Code block styles */

.editor pre {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 16px;
    margin: 16px 0;
    overflow-x: auto;
}

.editor pre code {
    font-family: 'Fira Code', monospace;
    font-size: 14px;
}


/* Image styles */

.editor img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 16px 0;
}


/* Code block styles */

.editor pre {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 16px;
    margin: 16px 0;
    overflow-x: auto;
}

.editor pre code {
    font-family: 'Fira Code', monospace;
    font-size: 14px;
}


/* Image styles */

.editor img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 16px 0;
}