/* ============================================
   صفحة المفضلة — Favorites Page
   تصميم احترافي مع أنيميشن
   ============================================ */

/* ── Layout ── */
.fav-page {
    padding-top: 0;
    overflow-x: hidden;
}
.fav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}
.fav-section {
    padding: 60px 0;
}

/* ============================================
   HERO Section
   ============================================ */
.fav-hero-section {
    position: relative;
    text-align: center;
    padding: 120px 20px 60px;
    min-height: 55vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(233,69,96,0.06) 0%, transparent 70%);
}

.fav-hero-glow {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(233,69,96,0.1) 0%, transparent 65%);
    border-radius: 50%;
    pointer-events: none;
    animation: favHeroGlow 6s ease-in-out infinite;
}
@keyframes favHeroGlow {
    0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(1); }
    50% { opacity: 1; transform: translateX(-50%) scale(1.15); }
}

.fav-hero-scanlines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(233,69,96,0.015) 2px,
        rgba(233,69,96,0.015) 4px
    );
    pointer-events: none;
}

/* Heart Icon — Animated Rings */
.fav-hero-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    margin-bottom: 24px;
}
.fav-hero-heart {
    position: relative;
    z-index: 2;
    color: var(--accent-color);
    filter: drop-shadow(0 0 20px rgba(233,69,96,0.4));
    animation: favHeartFloat 3s ease-in-out infinite;
}
@keyframes favHeartFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-8px) scale(1.05); }
}

.fav-hero-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid var(--accent-color);
    opacity: 0;
    animation: favRingPulse 3s ease-out infinite;
}
.fav-hero-ring-1 { inset: 0; animation-delay: 0s; }
.fav-hero-ring-2 { inset: -10px; animation-delay: 1s; }
.fav-hero-ring-3 { inset: -20px; animation-delay: 2s; }

@keyframes favRingPulse {
    0% { transform: scale(0.8); opacity: 0.5; }
    100% { transform: scale(1.6); opacity: 0; }
}

/* Hero Title */
.fav-hero-title {
    margin-bottom: 16px;
    line-height: 1.3;
}
.fav-hero-sub {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-color);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 8px;
    opacity: 0.8;
}
.fav-hero-main {
    display: block;
    font-size: 2.8rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--text-color) 30%, var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.fav-hero-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto 20px;
    line-height: 1.7;
}

/* Badge */
.fav-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(233,69,96,0.1);
    border: 1px solid rgba(233,69,96,0.2);
    border-radius: 50px;
    color: var(--accent-color);
    font-weight: 700;
    font-size: 0.95rem;
    backdrop-filter: blur(8px);
}
.fav-badge-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, var(--accent-color), #c0392b);
    color: #fff;
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: 800;
}

/* Scroll Indicator */
.fav-scroll-indicator {
    margin-top: 32px;
    width: 24px;
    height: 40px;
    border: 2px solid rgba(233,69,96,0.3);
    border-radius: 12px;
    position: relative;
}
.fav-scroll-dot {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--accent-color);
    border-radius: 4px;
    animation: favScrollDot 2s ease-in-out infinite;
}
@keyframes favScrollDot {
    0%, 100% { top: 6px; opacity: 1; }
    50% { top: 22px; opacity: 0.3; }
}

/* ============================================
   Section Common
   ============================================ */
.fav-section-header {
    text-align: center;
    margin-bottom: 48px;
}
.fav-section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 18px;
    background: rgba(233,69,96,0.1);
    color: var(--accent-color);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
    border: 1px solid rgba(233,69,96,0.15);
}
.fav-section-title {
    font-size: 1.8rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.fav-section-title i {
    color: var(--accent-color);
    font-size: 1.4rem;
}

/* ============================================
   HOW IT WORKS — Steps Grid
   ============================================ */
.fav-how-section {
    background: rgba(233,69,96,0.02);
    border-top: 1px solid rgba(233,69,96,0.06);
    border-bottom: 1px solid rgba(233,69,96,0.06);
}
.fav-steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    counter-reset: step-counter;
}
.fav-step-card {
    text-align: center;
    padding: 40px 24px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.fav-step-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(233,69,96,0.12);
    border-color: rgba(233,69,96,0.3);
}
.fav-step-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    opacity: 0;
    transition: opacity 0.4s;
}
.fav-step-card:hover::before { opacity: 1; }

.fav-step-num {
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--accent-color);
    opacity: 0.08;
    line-height: 1;
}
.fav-step-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(233,69,96,0.12), rgba(233,69,96,0.04));
    color: var(--accent-color);
    font-size: 1.5rem;
    margin-bottom: 20px;
    transition: all 0.3s;
}
.fav-step-card:hover .fav-step-icon-wrap {
    background: linear-gradient(135deg, var(--accent-color), #c0392b);
    color: #fff;
    transform: scale(1.08);
}
.fav-step-icon-wrap svg {
    width: 28px;
    height: 28px;
}
.fav-step-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.fav-step-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ============================================
   STATE BOXES — Login / Empty
   ============================================ */
.fav-state-box {
    text-align: center;
    padding: 80px 40px 60px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 28px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
}
.fav-state-glow {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(233,69,96,0.08) 0%, transparent 70%);
    pointer-events: none;
    animation: favStateGlow 5s ease-in-out infinite;
}
@keyframes favStateGlow {
    0%, 100% { opacity: 0.5; transform: translateX(-50%) scale(1); }
    50% { opacity: 1; transform: translateX(-50%) scale(1.2); }
}

/* Visual — Circles + Icon */
.fav-state-visual {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.fav-state-circles { position: absolute; inset: 0; }
.fav-state-circle {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid rgba(233,69,96,0.15);
}
.fav-state-circle-1 {
    inset: 0;
    animation: favCircleSpin 20s linear infinite;
    border-style: dashed;
}
.fav-state-circle-2 {
    inset: 15px;
    animation: favCircleSpin 15s linear infinite reverse;
    border-color: rgba(233,69,96,0.1);
}
.fav-state-circle-3 {
    inset: 30px;
    animation: favCircleSpin 25s linear infinite;
    border-style: dotted;
    border-color: rgba(233,69,96,0.08);
}
@keyframes favCircleSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fav-state-icon-big {
    position: relative;
    z-index: 2;
    font-size: 3rem;
    color: var(--accent-color);
    opacity: 0.7;
}
.fav-state-icon-big svg {
    color: var(--accent-color);
    opacity: 0.5;
}
.fav-state-heart-empty svg {
    animation: favEmptyBeat 2.5s ease-in-out infinite;
}
@keyframes favEmptyBeat {
    0%, 100% { transform: scale(1); }
    14% { transform: scale(1.18); }
    28% { transform: scale(1); }
    42% { transform: scale(1.12); }
    56% { transform: scale(1); }
}

.fav-state-box h2 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 12px;
}
.fav-state-box p {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 420px;
    margin: 0 auto 32px;
    line-height: 1.7;
}

.fav-state-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

/* Perks Grid */
.fav-perks-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
}
.fav-perk {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px;
    border-radius: 14px;
    transition: all 0.3s;
}
.fav-perk:hover {
    background: rgba(233,69,96,0.06);
}
.fav-perk i {
    font-size: 1.3rem;
    color: var(--accent-color);
    opacity: 0.7;
}
.fav-perk span {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* ============================================
   Buttons
   ============================================ */
.fav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}
.fav-btn-primary {
    background: linear-gradient(135deg, var(--accent-color), #c0392b);
    color: #fff;
    box-shadow: 0 6px 25px rgba(233,69,96,0.3);
}
.fav-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(233,69,96,0.45);
    color: #fff;
}
.fav-btn-ghost {
    background: transparent;
    color: var(--text-color);
    border: 1.5px solid var(--border-color);
}
.fav-btn-ghost:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: rgba(233,69,96,0.05);
}
.fav-btn-lg {
    padding: 16px 40px;
    font-size: 1.1rem;
}
.fav-btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: none;
    animation: favBtnShine 4s ease-in-out infinite;
}
@keyframes favBtnShine {
    0%, 80% { left: -100%; }
    100% { left: 100%; }
}

/* ============================================
   GRID HEADER — When has favorites
   ============================================ */
.fav-grid-header {
    margin-bottom: 32px;
}
.fav-grid-header .fav-section-title {
    font-size: 1.5rem;
    justify-content: flex-start;
}
.fav-inline-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent-color), #c0392b);
    color: #fff;
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: 800;
    margin: 0 4px;
}

.favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

/* ============================================
   CTA Section
   ============================================ */
.fav-cta-section {
    padding-bottom: 80px;
}
.fav-cta-box {
    position: relative;
    text-align: center;
    padding: 64px 40px;
    border-radius: 28px;
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}
.fav-cta-box::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 28px;
    padding: 2px;
    background: linear-gradient(135deg, var(--accent-color), transparent 50%, var(--accent-color));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.3;
}
.fav-cta-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(233,69,96,0.1);
    pointer-events: none;
    animation: favCtaRing 8s linear infinite;
}
.fav-cta-ring-1 {
    width: 300px;
    height: 300px;
    top: -80px;
    right: -80px;
}
.fav-cta-ring-2 {
    width: 200px;
    height: 200px;
    bottom: -60px;
    left: -60px;
    animation-direction: reverse;
    animation-duration: 10s;
}
@keyframes favCtaRing {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fav-cta-content {
    position: relative;
    z-index: 2;
}
.fav-cta-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 16px;
    display: block;
    opacity: 0.8;
}
.fav-cta-box h2 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 12px;
}
.fav-cta-box p {
    color: var(--text-muted);
    max-width: 450px;
    margin: 0 auto 28px;
    line-height: 1.7;
}
.fav-cta-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* ============================================
   Light Theme
   ============================================ */
.light-theme .fav-hero-section {
    background: linear-gradient(180deg, rgba(233,69,96,0.04) 0%, transparent 70%);
}
.light-theme .fav-hero-glow {
    background: radial-gradient(circle, rgba(233,69,96,0.06) 0%, transparent 65%);
}
.light-theme .fav-hero-scanlines {
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(233,69,96,0.008) 2px,
        rgba(233,69,96,0.008) 4px
    );
}
.light-theme .fav-how-section {
    background: rgba(233,69,96,0.015);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 900px) {
    .fav-steps-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }
    .fav-perks-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .fav-hero-section {
        padding: 100px 16px 40px;
        min-height: 45vh;
    }
    .fav-hero-main {
        font-size: 2rem;
    }
    .fav-hero-desc {
        font-size: 0.95rem;
    }
    .fav-hero-icon-wrap {
        width: 90px;
        height: 90px;
    }
    .fav-hero-heart {
        width: 40px;
        height: 40px;
    }
    .fav-section {
        padding: 40px 0;
    }
    .fav-section-title {
        font-size: 1.4rem;
    }
    .fav-state-box {
        padding: 50px 20px 40px;
        border-radius: 20px;
    }
    .fav-state-box h2 {
        font-size: 1.3rem;
    }
    .fav-state-visual {
        width: 110px;
        height: 110px;
    }
    .fav-state-icon-big {
        font-size: 2.2rem;
    }
    .fav-state-icon-big svg {
        width: 48px;
        height: 48px;
    }
    .fav-btn {
        padding: 12px 24px;
        font-size: 0.95rem;
    }
    .fav-state-actions {
        flex-direction: column;
        align-items: center;
    }
    .fav-perks-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .fav-cta-box {
        padding: 40px 20px;
    }
    .fav-cta-box h2 {
        font-size: 1.3rem;
    }
    .favorites-grid {
        grid-template-columns: 1fr;
    }
    .fav-cta-actions {
        flex-direction: column;
        align-items: center;
    }
}
