
/* Regular formatted text */
.formatted-text {
    font-size: 20px;
    font-weight: bolder;
    color: #a142d1;  /* Primary Purple */
}

/* Apply formatText function styles */
.formatted-content {
    display: block;
    padding: 10px;
    margin: 10px 0;
    background: rgba(161, 66, 209, 0.05);
    border-radius: 4px;
}

/* Large formatted text, also bold */
.formatted-text-large {
    font-size: 25px;
    font-weight: bolder;
    color: #8a36b8;  /* Secondary Purple */
}

/* Specifically for bold text, without altering size */
.bold-text {
    font-weight: bolder;
    color: #a142d1;  /* Primary Purple */
}

h3 {
    font-size: 20px;
    font-weight: bolder;
    color: #8a36b8;  /* Secondary Purple */
}

.special-text {
    font-weight: bolder;
    color: #9C27B0;  /* Purple */
}

/* Formatted URLs */
.formatted-url {
    color: #a142d1;
    text-decoration: underline;
}

/* Remove underline on hover for URLs */
.formatted-url:hover {
    text-decoration: none;
    color: #8a36b8;
}

/* Highlighted text */
.highlighted-text {
    background-color: rgba(161, 66, 209, 0.2);
    color: #a142d1;
}

/* Code block styling */
.code-block {
    border: 1px solid rgba(161, 66, 209, 0.3);
    border-radius: 5px;
    padding: 10px;
    font-family: monospace;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-x: auto;
    color: #a142d1;
    background-color: rgba(161, 66, 209, 0.05);
    box-shadow: 0 2px 4px rgba(161, 66, 209, 0.1);
    max-width: 100%;
    font-size: 14px;
}

/* Blockquote styling */
blockquote {
    border-left: 3px solid #a142d1;
    margin: 5px 0;
    padding-left: 20px;
    color: #8a36b8;
    font-style: italic;
}

/* Styling for formatted text output */
.analysis-content {
    font-family: 'Segoe UI', sans-serif;
    line-height: 1.6;
}

.analysis-content strong {
    font-weight: bold;
    color: #a142d1;
}

.analysis-content em {
    font-style: italic;
    color: #8a36b8;
}

.analysis-content h1 {
    font-size: 2em;
    margin: 0.67em 0;
    color: #a142d1;
}

.analysis-content h2 {
    font-size: 1.5em;
    margin: 0.83em 0;
    color: #8a36b8;
}

.analysis-content .large-text {
    font-size: 1.5em;
    margin: 0.5em 0;
    color: #a142d1;
}

.analysis-content a {
    color: #a142d1;
    text-decoration: underline;
}

.analysis-content mark {
    background-color: rgba(161, 66, 209, 0.2);
    padding: 0 2px;
    color: #a142d1;
}

.analysis-content del {
    text-decoration: line-through;
    color: rgba(161, 66, 209, 0.7);
}

.analysis-content sub {
    vertical-align: sub;
    font-size: smaller;
    color: #8a36b8;
}

.analysis-content sup {
    vertical-align: super;
    font-size: smaller;
    color: #8a36b8;
}

.analysis-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1em 0;
}

/* AI Response Icons Container */
.ai-response-icons {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    width: 100%;
    margin-top: 20px;
    padding: 15px 10px;
    border-top: 1px solid rgba(161, 66, 209, 0.3);
}

.ai-icon-btn {
    background-color: #a142d1;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.ai-icon-btn:hover {
    background-color: #8a36b8;
    transform: scale(1.1);
}

.ai-icon-btn:active {
    transform: scale(0.95);
}

/* Blinking and pulsating animation for add to notes icon */
.ai-icon-btn.attention-blink {
    animation: attentionPulse 2s infinite;
}

@keyframes attentionPulse {
    0% {
        background-color: #9C27B0;
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(156, 39, 176, 0.7);
    }
    25% {
        background-color: #ff6b6b;
        transform: scale(1.1);
        box-shadow: 0 0 0 8px rgba(255, 107, 107, 0);
    }
    50% {
        background-color: #4ecdc4;
        transform: scale(1.15);
        box-shadow: 0 0 0 12px rgba(78, 205, 196, 0);
    }
    75% {
        background-color: #45b7d1;
        transform: scale(1.1);
        box-shadow: 0 0 0 8px rgba(69, 183, 209, 0);
    }
    100% {
        background-color: #9C27B0;
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(156, 39, 176, 0.7);
    }
}

/* Button-specific colors */
#aiDownloadBtn { background-color: #a142d1; }
#aiCopyBtn { background-color: #8a36b8; }
#aiShareBtn { background-color: #9C27B0; }
#aiTranslateBtn { background-color: #a142d1; }
#aiDeleteBtn { background-color: #8a36b8; }
#aiPlusBtn { background-color: #9C27B0; }

.note-content {
    margin-top: 15px;
    line-height: 1.8;
    position: relative;
    max-height: none;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(161, 66, 209, 0.05);
    border-radius: 8px;
    padding: 15px;
    font-size: 1.1em;
    color: #ffffff;
}

.note-content p {
    margin: 0;
    padding: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.note-content.collapsed {
    max-height: 100px;
    overflow: hidden;
    mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}

/* Title Input Modal */
.title-input-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.title-input-modal.visible {
    display: flex;
    align-items: center;
    justify-content: center;
}

.title-modal-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d1b3d 100%);
    border: 2px solid #a142d1;
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(161, 66, 209, 0.3);
    position: relative;
    animation: slideIn 0.3s ease;
}

.title-modal-header {
    text-align: center;
    margin-bottom: 25px;
}

.title-modal-header h3 {
    color: #a142d1;
    font-size: 24px;
    margin: 0 0 10px 0;
    font-weight: bold;
}

.title-modal-subtitle {
    color: #b8b8b8;
    font-size: 14px;
    margin: 0;
}

.ai-suggestion-container {
    background: rgba(161, 66, 209, 0.1);
    border: 1px solid rgba(161, 66, 209, 0.3);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.ai-suggestion-label {
    color: #a142d1;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.ai-suggestion-text {
    color: #ffffff;
    font-size: 16px;
    line-height: 1.4;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 6px;
    border-left: 3px solid #a142d1;
}

.ai-suggestion-loading {
    color: #8a36b8;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 8px;
}

.title-input-group {
    margin-bottom: 25px;
}

.title-input-label {
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 8px;
    display: block;
}

.title-input-field {
    width: 100%;
    padding: 15px;
    border: 2px solid #8a36b8;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

.title-input-field:focus {
    border-color: #a142d1;
    box-shadow: 0 0 15px rgba(161, 66, 209, 0.4);
    background: rgba(0, 0, 0, 0.7);
}

.title-modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.title-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.title-btn-accept {
    background: linear-gradient(135deg, #a142d1, #8a36b8);
    color: white;
}

.title-btn-accept:hover {
    background: linear-gradient(135deg, #8a36b8, #6b2c91);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(161, 66, 209, 0.4);
}

.title-btn-cancel {
    background: transparent;
    color: #a142d1;
    border: 2px solid #a142d1;
}

.title-btn-cancel:hover {
    background: rgba(161, 66, 209, 0.1);
    transform: translateY(-2px);
}

.title-btn-use-suggestion {
    background: linear-gradient(135deg, #4ecdc4, #45b7d1);
    color: white;
    font-size: 12px;
    padding: 8px 15px;
    margin-top: 8px;
}

.title-btn-use-suggestion:hover {
    background: linear-gradient(135deg, #45b7d1, #3ba3c7);
    transform: translateY(-1px);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(138, 54, 184, 0.3);
    border-top: 2px solid #8a36b8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
