/* ===== Note Page Specific Styles ===== */

.hint {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 24px;
}

/* Result Title Row */
.result-title-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
}

.note-title {
    flex: 1;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.5;
}

/* Content Card */
.content-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
}

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

/* Single View */
.content-single-view {
    padding: 20px;
}

.content-header-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.note-content {
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.8;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

/* Compare View */
.content-compare-view {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--border-color);
}

.compare-column {
    background: var(--bg-card);
    padding: 20px;
}

.compare-label {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.compare-field {
    margin-bottom: 16px;
}

.compare-field-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.compare-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    padding: 12px;
    background: var(--bg-input);
    border-radius: var(--radius);
}

.compare-title.new-title {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.compare-text-area {
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.7;
    font-size: 0.875rem;
    padding: 12px;
    background: var(--bg-input);
    border-radius: var(--radius);
    max-height: 300px;
    overflow-y: auto;
}

/* Close Compare Button */
.close-compare-btn {
    padding: 6px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.close-compare-btn:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.close-compare-btn svg {
    width: 16px;
    height: 16px;
}

/* Copy Small */
.copy-sm {
    padding: 4px 6px;
}

.copy-sm svg {
    width: 12px;
    height: 12px;
}

/* Save Button */
.save-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.save-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.4);
}

.save-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.save-btn svg {
    width: 16px;
    height: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .content-compare-view {
        grid-template-columns: 1fr;
    }
}

/* ===== Beautify Feature Styles ===== */

/* Image Actions Row */
.image-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Beautify Button */
.beautify-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #ff6b9d 0%, #c44edc 50%, #8b5cf6 100%);
    border: none;
    border-radius: var(--radius);
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.beautify-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(196, 78, 220, 0.4);
}

.beautify-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.beautify-btn svg {
    width: 16px;
    height: 16px;
}

/* Image Copy Button */
.image-copy-btn {
    padding: 6px 12px;
    background: rgba(139, 92, 246, 0.9);
    border: none;
    border-radius: 4px;
    color: white;
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
}

.image-copy-btn:hover {
    background: rgb(139, 92, 246);
    transform: scale(1.05);
}

/* Beautified Preview Section */
.beautified-preview {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px dashed var(--border-color);
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.preview-header h4 {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

/* Beautified Grid */
.beautified-grid .image-item {
    border: 2px solid transparent;
    background: linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
        linear-gradient(135deg, #ff6b9d 0%, #c44edc 50%, #8b5cf6 100%) border-box;
    border-radius: calc(var(--radius) + 2px);
}

.beautified-grid .image-item:hover {
    box-shadow: 0 4px 16px rgba(196, 78, 220, 0.3);
}

/* Spinner Animation for Beautify Button */
.beautify-btn .spinner {
    animation: spin 1s linear infinite;
}

/* Lightbox download button */
.lightbox-download-btn {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    transition: all 0.2s;
}

.lightbox-download-btn:hover {
    transform: translateX(-50%) scale(1.1);
    background: white;
}

.lightbox-download-btn svg {
    width: 24px;
    height: 24px;
    color: #333;
}

@media (max-width: 768px) {
    .lightbox-download-btn {
        width: 44px;
        height: 44px;
        bottom: 80px;
        /* Leave space for potential mobile bars */
    }
}

/* Lightbox - Image Preview */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
}

.lightbox-image {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 28px;
    cursor: pointer;
    z-index: 2;
    transition: var(--transition);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}