/* 노트 패널 스타일 */

/* 노트 패널 기본 스타일 */
.note-panel {
    position: fixed;
    top: 0;
    right: -400px; /* 초기 상태: 화면 밖 */
    width: 400px;
    height: 100vh;
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border-left: 1px solid #374151;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* 패널 표시 상태 */
.note-panel.visible {
    right: 0;
}

/* 패널 헤더 */
.note-panel-header {
    padding: 20px;
    border-bottom: 1px solid #374151;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.note-panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.note-panel-title h3 {
    color: #f9fafb;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.note-panel-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 24px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.note-panel-close:hover {
    background: #374151;
    color: #f9fafb;
}

/* 패널 컨트롤 */
.note-panel-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.note-search {
    width: 100%;
    padding: 10px 12px;
    background: #374151;
    border: 1px solid #4b5563;
    border-radius: 8px;
    color: #f9fafb;
    font-size: 14px;
    transition: all 0.2s;
}

.note-search:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.note-search::placeholder {
    color: #9ca3af;
}

.note-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.download-btn {
    background: #059669;
    color: white;
}

.download-btn:hover {
    background: #047857;
    transform: translateY(-1px);
}

.clear-btn {
    background: #dc2626;
    color: white;
}

.clear-btn:hover {
    background: #b91c1c;
    transform: translateY(-1px);
}

/* 패널 콘텐츠 */
.note-panel-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.notes-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

/* 노트 아이템 */
.note-item {
    background: #374151;
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.note-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    border-color: #4b5563;
}

.note-content {
    padding: 7px 16px;
}

.note-original,
.note-translation {
    margin-bottom: 1px;
    line-height: 1.5;
}

.note-original {
    color: #e5e7eb;
}

.note-original strong {
    color: #60a5fa;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.note-translation {
    color: #d1d5db;
}

.note-translation strong {
    color: #34d399;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 노트 푸터 */
.note-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1px 16px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid #4b5563;
}

.note-timestamp {
    font-size: 11px;
    color: #9ca3af;
}

.note-actions {
    display: flex;
    gap: 8px;
}

.note-action-btn {
    background: none;
    border: none;
    padding: 3px 1px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    opacity: 0.7;
}

.note-action-btn:hover {
    opacity: 1;
    background: #4b5563;
}

.copy-note-btn:hover, .delete-note-btn:hover {
    background: rgb(0, 0, 0, 0.3);
}

/* 빈 노트 상태 */
.empty-notes {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.empty-notes p {
    margin: 0 0 8px 0;
    font-size: 16px;
}

.empty-notes-hint {
    font-size: 14px !important;
    color: #9ca3af !important;
    line-height: 1.4;
}

/* 노트 하이라이트 효과 */
.note-highlight {
    animation: noteHighlight 2s ease-in-out;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3) !important;
}

@keyframes noteHighlight {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}

/* 저장 버튼 스타일 */
.note-save-btn {
    position: fixed;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    color: white;
    z-index: 10000;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
    opacity: 0;
    transform: scale(0.8);
}

.note-save-btn.visible {
    opacity: 1;
    transform: scale(1);
}

.note-save-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.6);
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}

.note-save-btn:active {
    transform: scale(0.95);
}

.note-save-btn.success {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
    animation: successPulse 0.6s ease;
}

@keyframes successPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* 노트 토글 버튼 */
.note-toggle-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 20px;
    color: white;
    z-index: 999;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.note-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
}

/*.note-toggle-btn.active {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.3);
}*/

/* 알림 */
.note-notification {
    pointer-events: none;
    user-select: none;
}

/* 스크롤바 커스터마이징 */
.notes-list::-webkit-scrollbar {
    width: 6px;
}

.notes-list::-webkit-scrollbar-track {
    background: #1f2937;
    border-radius: 3px;
}

.notes-list::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 3px;
}

.notes-list::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .note-panel {
        width: 100vw;
        right: -100vw;
    }
    
    .note-toggle-btn {
        top: 16px;
        right: 16px;
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
    
    .note-save-btn {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    .note-item {
        margin-bottom: 12px;
    }
    
    .note-content {
        padding: 7px 12px;
    }
    
    .note-footer {
        padding: 3px 12px;
    }
}

@media (max-width: 480px) {
    .note-panel-header {
        padding: 16px;
    }
    
    .notes-list {
        padding: 12px;
    }
    
    .note-panel-title h3 {
        font-size: 16px;
    }
    
    .action-btn {
        font-size: 11px;
        padding: 6px 8px;
    }
    
    .note-original,
    .note-translation {
        font-size: 14px;
    }
}

/* 다크 모드 추가 지원 */
@media (prefers-color-scheme: dark) {
    .note-panel {
        background: linear-gradient(135deg, #0f172a 0%, #020617 100%);
        border-left-color: #1e293b;
    }
    
    .note-item {
        background: #1e293b;
        border-color: #334155;
    }
    
    .note-item:hover {
        border-color: #475569;
    }
}

/* 접근성 개선 */
@media (prefers-reduced-motion: reduce) {
    .note-panel,
    .note-item,
    .note-save-btn,
    .note-toggle-btn,
    .action-btn,
    .note-action-btn {
        transition: none;
    }
    
    .note-highlight {
        animation: none;
        border-color: #3b82f6 !important;
    }
    
    @keyframes noteHighlight {
        from, to {
            transform: none;
        }
    }
    
    @keyframes successPulse {
        from, to {
            transform: none;
        }
    }
}

/* 고대비 모드 */
@media (prefers-contrast: more) {
    .note-panel {
        border-left-width: 2px;
    }
    
    .note-item {
        border-width: 2px;
    }
    
    .note-search:focus {
        box-shadow: 0 0 0 3px #ffffff;
    }
}