@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&display=swap');

:root {
    --color-dark: #2d231c;
    --color-deep: #3e3228;
    --color-gold: #c69c6d;
    --color-amber: #ff9d00;
    --color-paper: #f4f1ea;
    --color-text-dim: rgba(210, 196, 181, 0.6);
    --color-item-border: #554537;
    --color-header-bg: rgba(45, 35, 28, 0.7); /* زجاجي في الليلي */
    --color-header-border: transparent;
    --transition-speed: 0.5s;
}

[data-theme="light"] {
    --color-dark: #fcfaf7;
    --color-deep: #f4f1ea;
    --color-gold: #8d6e4b;
    --color-amber: #c55926;
    --color-paper: #1a140f;
    --color-text-dim: rgba(26, 20, 15, 0.6);
    --color-item-border: #d2c4b5;
    --color-header-bg: #f4f1ea; /* كتلة صلبة لون color-deep في النهاري */
    --color-header-border: rgba(141, 110, 75, 0.15);
}

/* التعديل المطلوب: توحيد لون الحدود في الوضع الليلي */
[data-theme="dark"] *,
[data-theme="dark"] ::after,
[data-theme="dark"] ::before {
    border-color: #554537 !important;
}

body {
    font-family: 'Noto Kufi Arabic', sans-serif;
    background-color: var(--color-dark);
    color: var(--color-paper);
    line-height: 1.6;
    margin: 0;
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
}

.font-heritage { font-family: 'Aref Ruqaa', serif; }
.font-body { font-family: 'Amiri', serif; }

/* Marquee Animation for Partners */
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-50%)); }
}
.animate-marquee {
  display: flex;
  width: max-content;
  animation: marquee 40s linear infinite;
}
[dir="rtl"] .animate-marquee {
  animation: marquee-rtl 40s linear infinite;
}
@keyframes marquee-rtl {
  0% { transform: translateX(0); }
  100% { transform: translateX(50%); }
}
.pause-marquee { animation-play-state: paused; }

/* Glowing effect for the central book */
.glow-gold {
    box-shadow: 0 0 60px rgba(198, 156, 109, 0.4);
    filter: drop-shadow(0 0 10px rgba(255, 157, 0, 0.3));
}

/* Floating particles animation */
@keyframes float-particle {
    0% { transform: translateY(0) scale(1); opacity: 0; }
    50% { opacity: 0.8; }
    100% { transform: translateY(-100px) scale(0.5); opacity: 0; }
}

.particle {
    position: absolute;
    background: var(--color-gold);
    border-radius: 50%;
    pointer-events: none;
    animation: float-particle 3s infinite linear;
}

/* Ambient Glow Movement */
@keyframes ambient-glow {
    0% { transform: translate(-10%, -10%) scale(1); opacity: 0.3; }
    33% { transform: translate(10%, 5%) scale(1.1); opacity: 0.5; }
    66% { transform: translate(-5%, 15%) scale(0.9); opacity: 0.4; }
    100% { transform: translate(-10%, -10%) scale(1); opacity: 0.3; }
}
.animate-ambient {
    animation: ambient-glow 15s ease-in-out infinite;
}

.icon-vintage {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-deep);
    border: 1px solid var(--color-gold);
    border-radius: 12px;
    transition: all 0.3s ease;
}
.icon-vintage:hover {
    background: var(--color-gold);
    color: var(--color-dark);
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--color-dark); }
::-webkit-scrollbar-thumb { background: var(--color-gold); border-radius: 10px; }


@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(50%); }
}


.icon-vintage {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-deep); /* var(--color-paper)/5 */
    border: 1px solid rgba(244, 241, 234, 0.1);
    border-radius: 0.75rem; /* rounded-xl */
    transition: all 0.3s;
    color: var(--color-paper);
}
.icon-vintage:hover {
    background-color: var(--color-gold);
    color: var(--color-dark);
    border-color: var(--color-gold);
}


 /* Audio Player Animations */
 @keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes scale-up {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.animate-fade-in { animation: fade-in 0.3s ease-out forwards; }
.animate-scale-up { animation: scale-up 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

.glass-panel {
    background: rgba(47, 38, 31, 0.6);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

input[type=range] {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
}
input[type=range]::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: var(--color-gold);
    cursor: pointer;
    margin-top: -6px;
    box-shadow: 0 0 10px rgba(198, 156, 109, 0.5);
}
input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

@keyframes lantern {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.8; }
    50% { transform: translateY(-20px) scale(1.1); opacity: 1; }
}
.animate-lantern {
    animation: lantern 4s ease-in-out infinite;
}

 /* Animations */
 @keyframes pulse-slow {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}
.animate-pulse-slow {
    animation: pulse-slow 8s infinite ease-in-out;
}

.glass-panel {
    background-color: rgba(81, 67, 56, 0.6);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 4px solid var(--color-deep);
    box-shadow: 0 50px 100px rgba(0,0,0,0.5);
}

 /* Animations */
 @keyframes lantern {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.8; }
    50% { transform: translateY(-20px) scale(1.1); opacity: 1; }
}
.animate-lantern {
    animation: lantern 4s ease-in-out infinite;
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.animate-spin-slow {
    animation: spin-slow 20s linear infinite;
}

 /* Animations */
 @keyframes lanternFloat {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.8; }
    50% { transform: translateY(-20px) scale(1.05); opacity: 1; }
}
.animate-lantern {
    animation: lanternFloat 6s ease-in-out infinite;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}
