@font-face {
    font-family: 'SLP-Regular';
    src: url('https://framerusercontent.com/assets/Ax4XtJqdMY9djIPkbyume8gBg.woff2') format('woff2');
    font-weight: normal; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'SLP-Bold';
    src: url('https://framerusercontent.com/assets/cQ3mYhGm4ugYGV0NgJJtKtnN6DQ.woff2') format('woff2');
    font-weight: bold; font-style: normal; font-display: swap;
}

:root {
    --primary-green: #4ade80;
    --dark-bg: #0f0f11;
}

/* Global Reset */
*:focus { outline: none !important; box-shadow: none !important; }
input:focus, textarea:focus, button:focus { outline: none !important; box-shadow: none !important; }

body {
    font-family: 'SLP-Regular', sans-serif;
    background-color: var(--dark-bg);
    color: #e4e4e7;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .font-bold-slp {
    font-family: 'SLP-Bold', sans-serif;
}

/* 1. Base Text (Large Font) */
.ql-editor, .content-body {
    font-family: 'SLP-Regular', sans-serif !important;
    font-size: 1.4rem !important;
    line-height: 2 !important;
    color: #e4e4e7 !important;
    direction: rtl !important;
    text-align: right !important;
}

/* Force children to respect RTL */
.ql-editor p, .ql-editor h1, .ql-editor h2, .ql-editor h3, .ql-editor div {
    direction: rtl !important;
    text-align: right !important;
}

/* Fix: Editor Placeholder Color */
.ql-editor.ql-blank::before {
    color: rgba(255, 255, 255, 0.4) !important;
    font-style: normal !important;
    right: 15px !important;
}

/* Fix: Mood Buttons Selection */
.mood-btn { 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    filter: grayscale(100%) opacity(0.6); 
    transform: scale(1);
    cursor: pointer;
}
.mood-btn:hover { 
    filter: grayscale(0%) opacity(1); 
    transform: translateY(-5px); 
}
.mood-btn.active { 
    filter: grayscale(0%) opacity(1) !important; 
    transform: scale(1.1) translateY(-5px) !important; 
    border-color: #4ade80 !important; 
    background: rgba(74, 222, 128, 0.1) !important; 
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.2);
}

/* -----------------------------------------
   LISTS FIX (RTL & VISIBILITY)
   ----------------------------------------- */
.ql-editor ul, .content-body ul {
    list-style-type: disc !important;
    padding-right: 3.5rem !important; /* Extra Space */
    margin-right: 0 !important;
    margin-bottom: 1.5rem;
}

.ql-editor ol, .content-body ol {
    list-style-type: decimal !important;
    padding-right: 3.5rem !important;
    margin-right: 0 !important;
    margin-bottom: 1.5rem;
}

.ql-editor li, .content-body li {
    list-style-position: outside !important;
    margin-bottom: 0.8rem;
    padding-left: 0;
    padding-right: 10px; /* Separation */
}

/* Green Bullets & Numbers */
.ql-editor li::marker, .content-body li::marker {
    color: #4ade80;
    font-family: 'SLP-Bold', sans-serif;
}

/* -----------------------------------------
   TEXT HIGHLIGHT FIX (BORDER RADIUS)
   ----------------------------------------- */
.ql-editor span[style*="background-color"], 
.content-body span[style*="background-color"] {
    border-radius: 6px !important;
    padding: 2px 6px !important;
    margin: 0 2px;
}

/* -----------------------------------------
   BLOCKQUOTES & CODE BLOCKS
   ----------------------------------------- */
.ql-editor blockquote, .content-body blockquote {
    position: relative;
    border-right: 4px solid #4ade80;
    background: linear-gradient(to left, rgba(74, 222, 128, 0.05), transparent);
    padding: 20px 50px 20px 20px;
    margin: 20px 0;
    border-radius: 0 12px 12px 0;
    color: #d4d4d8;
    font-style: italic;
}

.ql-editor blockquote::before, .content-body blockquote::before {
    content: '\f10d';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 1.5rem;
    color: rgba(74, 222, 128, 0.2);
}

.ql-editor pre, .content-body pre {
    direction: ltr !important;
    text-align: left !important;
    background: #1e1e2e;
    color: #a6accd;
    padding: 20px;
    border-radius: 12px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 20px 0;
    white-space: pre-wrap;
}

/* Links */
.editor-content a, .ql-editor a, .content-body a {
    color: #4ade80 !important;
    text-decoration: none;
    border-bottom: 1px dashed rgba(74, 222, 128, 0.3);
    transition: all 0.3s ease;
}

.editor-content a:hover, .ql-editor a:hover, .content-body a:hover {
    color: #22c55e !important;
    border-bottom: 1px solid #4ade80;
    text-shadow: 0 0 10px rgba(74, 222, 128, 0.3);
}

/* Images */
.ql-editor img, .content-body img {
    max-width: 100%;
    border-radius: 20px;
    margin: 30px auto;
    box-shadow: 0 20px 50px -10px rgba(0,0,0,0.5);
    border: 1px solid rgba(74, 222, 128, 0.1);
    display: block;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0f0f11; }
::-webkit-scrollbar-thumb { background: #4ade80; border-radius: 10px; }

/* Animations */
@keyframes heartBeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.3); }
    28% { transform: scale(1); }
    42% { transform: scale(1.3); }
    70% { transform: scale(1); }
}
.heart-beat { animation: heartBeat 1.5s infinite; display: inline-block; }

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0px); }
}
.floating { animation: float 5s ease-in-out infinite; }

@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-stagger-1 { animation: slideUpFade 0.6s ease-out forwards; opacity: 0; animation-delay: 0.1s; }
.animate-stagger-2 { animation: slideUpFade 0.6s ease-out forwards; opacity: 0; animation-delay: 0.2s; }
.animate-stagger-3 { animation: slideUpFade 0.6s ease-out forwards; opacity: 0; animation-delay: 0.3s; }
.animate-stagger-4 { animation: slideUpFade 0.6s ease-out forwards; opacity: 0; animation-delay: 0.4s; }

.text-glow { text-shadow: 0 0 20px rgba(74, 222, 128, 0.4); }

.glass-panel {
    background: rgba(24, 24, 27, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Copy Button */
.code-wrapper { position: relative; margin: 20px 0; }
.copy-btn {
    position: absolute;
    top: 10px; right: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: #a1a1aa;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    font-family: 'SLP-Bold', sans-serif;
    display: flex; align-items: center; gap: 8px;
    opacity: 0; transform: translateY(5px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.code-wrapper:hover .copy-btn { opacity: 1; transform: translateY(0); }
.copy-btn:hover { background: rgba(255, 255, 255, 0.15); color: white; }

.copy-btn.success {
    background-color: #4ade80 !important;
    border-color: #4ade80 !important;
    color: #000 !important;
    opacity: 1 !important;
    transform: scale(1.05) translateY(0) !important;
    box-shadow: 0 0 15px rgba(74, 222, 128, 0.5);
}

@keyframes iconPop {
    0% { transform: scale(0) rotate(-45deg); opacity: 0; }
    60% { transform: scale(1.4) rotate(0deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
.icon-pop { animation: iconPop 0.4s ease-out forwards; }
