:root {
            --bg-color: #fdfdfd; --text-color: #222; --primary: #4a148c; --accent: #ffb300; --white: #ffffff;
            --card-shadow: rgba(0,0,0,0.04); --header-bg: linear-gradient(180deg, #ffffff 0%, #f4effd 100%);
            --sidebar-bg: #ffffff; --border-color: #f0f0f0; --heart-color: #c42143;
            --btn-bg: #f4f4f4; --btn-text: #4a148c;
        }
        [data-theme="dark"] {
            --bg-color: #121212; --text-color: #e0e0e0; --primary: #9c67e8; --accent: #ffca28; --white: #1e1e1e;
            --card-shadow: rgba(0,0,0,0.5); --header-bg: linear-gradient(180deg, #1e1e1e 0%, #121212 100%);
            --sidebar-bg: #1a1a1a; --border-color: #333; --btn-bg: #252525; --btn-text: #e0e0e0; --heart-color: #ff6383;
        }
        * { box-sizing: border-box; margin: 0; padding: 0; scroll-behavior: smooth; }
        
img, a, div { -webkit-user-drag: none; user-drag: none; }

        #progress-container { width: 100%; height: 4px; background: transparent; position: fixed; top: 0; left: 0; z-index: 2000; }
        #progress-bar { height: 4px; background: var(--accent); width: 0%; transition: width 0.1s; }

        body { font-family: 'Amiri', serif; background-color: var(--bg-color); color: var(--text-color); line-height: 2.3; font-size: 20px; overflow-x: hidden; cursor: default; }
        .reveal { opacity: 0; transform: translateY(50px); transition: all 1s ease-out; }
        .reveal.active { opacity: 1; transform: translateY(0); }

        h1, .logo { font-family: 'Reem Kufi', sans-serif; letter-spacing: 0; }
        h2, h3, h4, .btn { font-family: 'Aref Ruqaa', serif; }

        header { background-color: var(--white); padding: 0.8rem 5%; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 4px 20px var(--card-shadow); position: sticky; top: 0; z-index: 1000; border-bottom: 3px solid var(--primary); height: 80px; }
        .logo { font-size: 1.8rem; font-weight: 700; color: var(--primary); text-decoration: none; display: flex; align-items: center; gap: 10px; }
        .logo i { color: var(--accent); }
        .header-icons { display: flex; align-items: center; gap: 15px; }
        .icon-btn, .menu-btn { font-size: 1.3rem; color: var(--btn-text); cursor: pointer; padding: 10px 14px; border-radius: 8px; background: var(--btn-bg); transition: 0.3s; display: flex; align-items: center; justify-content: center; border: 1px solid transparent; }
        [data-theme="dark"] .icon-btn, [data-theme="dark"] .menu-btn { border: 1px solid #333; }
        .icon-btn:hover, .menu-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }

        .search-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.9); backdrop-filter: blur(8px); z-index: 5000; display: flex; flex-direction: column; align-items: center; padding-top: 120px; opacity: 0; visibility: hidden; transform: scale(0.95); transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s; }
        .search-overlay.active { opacity: 1; visibility: visible; transform: scale(1); }
        .search-box { width: 90%; max-width: 650px; position: relative; }
        .search-input-large { width: 100%; padding: 15px 10px; font-size: 1.6rem; background: transparent; border: none; border-bottom: 2px solid var(--accent); color: #fff; font-family: 'Amiri', serif; text-align: center; outline: none; }
        .search-input-large::placeholder { color: rgba(255,255,255,0.4); font-family: 'Amiri', serif; font-style: italic; }
        .close-search { position: absolute; top: 30px; right: 30px; font-size: 2.5rem; color: #fff; cursor: pointer; transition: 0.3s; }
        .close-search:hover { color: var(--accent); transform: rotate(90deg); }
        .search-results-large { width: 90%; max-width: 650px; margin-top: 30px; max-height: 55vh; overflow-y: auto; }
        .result-item { background: rgba(255,255,255,0.08); padding: 18px; margin-bottom: 12px; border-radius: 8px; color: #fff; text-decoration: none; display: block; font-family: 'Cairo', sans-serif; transition: 0.3s; border-right: 4px solid transparent; text-align: right; }
        .result-item:hover { background: rgba(255,255,255,0.15); border-right-color: var(--accent); padding-right: 28px; }
        .result-item small { display: block; color: var(--accent); font-size: 0.85rem; margin-top: 6px; opacity: 0.8; }

        .sidebar { height: 100%; width: 0; position: fixed; z-index: 3000; top: 0; right: 0; background-color: var(--sidebar-bg); overflow-x: hidden; transition: 0.4s; box-shadow: -5px 0 25px rgba(0,0,0,0.15); padding-top: 60px; border-left: 4px solid var(--accent); display: flex; flex-direction: column; }
        .sidebar a { font-family: 'Cairo', sans-serif; padding: 12px 25px; text-decoration: none; font-size: 1.2rem; font-weight: 500; color: var(--text-color); display: flex; align-items: center; transition: 0.3s; border-bottom: 1px solid var(--border-color); }
        .sidebar a i { width: 35px; text-align: center; margin-left: 10px; font-size: 1.1rem; transition: 0.3s; }
        .sidebar a:hover { background-color: var(--primary); color: #fff; padding-right: 35px; }
        .sidebar a:hover i { color: #fff; }
        .sidebar .close-btn { position: absolute; top: 15px; left: 20px; font-size: 30px; color: var(--primary); cursor: pointer; transition: 0.3s; }
        .sidebar-header { font-family: 'Cairo', sans-serif; text-align: center; margin-bottom: 25px; color: var(--primary); font-weight: 700; font-size: 1.6rem; border-bottom: 3px solid var(--accent); padding-bottom: 15px; width: 80%; margin: 0 auto 20px auto; }
        .theme-switch-wrapper { margin-top: auto; padding: 20px; border-top: 1px solid var(--border-color); text-align: center; }
        .theme-btn { background: transparent; border: 2px solid var(--primary); color: var(--text-color); padding: 10px 20px; border-radius: 50px; cursor: pointer; font-family: 'Cairo', sans-serif; font-weight: bold; width: 100%; transition: 0.3s; display: flex; align-items: center; justify-content: center; gap: 10px; }
        @media (hover: hover) { .theme-btn:hover { background: var(--primary); color: #fff; } }
        .overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 2500; opacity: 0; visibility: hidden; transition: 0.3s; backdrop-filter: blur(2px); }
        .overlay.active { opacity: 1; visibility: visible; }

        .page-header { text-align: center; padding: 6rem 1rem 4rem; background: var(--header-bg); margin-bottom: 3rem; border-bottom: 1px solid var(--border-color); }
        .page-header h1 { font-size: 3.8rem; color: var(--primary); margin-bottom: 15px; font-weight: 700; line-height: 1.4; }
        .page-header p { color: var(--text-color); opacity: 0.8; font-size: 1.5rem; max-width: 600px; margin: 0 auto; font-family: 'Amiri', serif; }

        .container { max-width: 850px; margin: 0 auto; padding: 0 20px; }
        .content-box { background: var(--white); padding: 3rem; margin-bottom: 2.5rem; border-radius: 16px; border: 1px solid var(--border-color); box-shadow: 0 10px 30px var(--card-shadow); text-align: justify; position: relative; overflow: hidden; transition: transform 0.4s ease, box-shadow 0.4s ease; }
        .content-box:hover { transform: translateY(-7px) scale(1.01); box-shadow: 0 15px 40px rgba(74, 20, 140, 0.1); }
        .content-box::before { content: ''; position: absolute; top: 0; right: 0; width: 6px; height: 100%; background: linear-gradient(to bottom, var(--primary), var(--accent)); }
        .content-box h2 { color: var(--primary); margin-bottom: 1.5rem; padding-bottom: 5px; font-size: 2.2rem; display: flex; align-items: center; gap: 12px; font-weight: 400; }
        .content-box h2 i { color: var(--accent); font-size: 1.6rem; opacity: 0.8; }
        .text-body { font-size: 1.35rem; color: var(--text-color); line-height: 2.3; margin-bottom: 20px;}

        /* تنسيق الأزرار */
        .interaction-bar { display: flex; justify-content: flex-end; border-top: 1px solid var(--border-color); padding-top: 15px; margin-top: 20px; }
        .like-btn { position: relative; background: none; border: none; border-radius: .65rem; padding: .25rem .5rem; cursor: pointer; color: var(--text-color); font: 600 1rem/1.6 Cairo, sans-serif; font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: .5rem; }
        .like-btn .fa-heart { font-size: 1.4rem; transition: color .18s ease, transform .18s ease; }
        .like-btn:hover .fa-heart { transform: scale(1.08); }
        .like-btn.liked .fa-heart { color: var(--heart-color); }
        .like-btn.celebrating .fa-heart { animation: heartbeat .4s ease-in-out; }
        .reaction-burst { position: absolute; inset-inline-end: 0; inset-block-end: calc(100% + .25rem); padding: .15rem .55rem; border: 1px solid var(--border-color); border-radius: 2rem; color: var(--heart-color); background: var(--white); box-shadow: 0 3px 10px var(--card-shadow); pointer-events: none; animation: reaction-rise 1.05s ease-out; white-space: nowrap; }
        
        @keyframes heartbeat { 0% { transform: scale(1); } 50% { transform: scale(1.3); } 100% { transform: scale(1); } }
        @keyframes reaction-rise { 0% { opacity: 0; transform: translateY(.4rem); } 20%, 75% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-.3rem); } }

        footer { background: #111; color: #aaa; text-align: center; padding: 3rem 1rem; margin-top: 5rem; border-top: 5px solid var(--primary); }
        .footer-social { display: flex; justify-content: center; gap: 20px; margin-bottom: 20px; }
        .footer-btn { width: 50px; height: 50px; border-radius: 50%; background: rgba(255,255,255,0.1); display: flex; justify-content: center; align-items: center; color: white; font-size: 1.4rem; text-decoration: none; transition: 0.3s; }
        .footer-btn:hover { background: var(--primary); transform: scale(1.1); color: white; }
        .copyright { font-size: 1.1rem; opacity: 0.8; font-family: 'Amiri', serif;}
