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

:root {
    --esw-gold: #C7A04D;
    --esw-gold-dim: rgba(199, 160, 77, 0.2);
    --esw-purple: #2F1D41;
    --esw-purple-dark: #120A1A;
    --esw-black: #05070A;
    --esw-text-main: #F3F4F6;
    --esw-text-muted: #9CA3AF;
    --esw-glass-bg: rgba(255, 255, 255, 0.03);
    --esw-glass-border: rgba(255, 255, 255, 0.1);
}

@keyframes subtlePan {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes floatOrb {
    0% { transform: translateY(0px) scale(1); box-shadow: 0 0 40px rgba(199,160,77,0.3), inset 0 0 20px rgba(255,255,255,0.4); }
    50% { transform: translateY(-15px) scale(1.05); box-shadow: 0 0 60px rgba(199,160,77,0.6), inset 0 0 30px rgba(255,255,255,0.6); }
    100% { transform: translateY(0px) scale(1); box-shadow: 0 0 40px rgba(199,160,77,0.3), inset 0 0 20px rgba(255,255,255,0.4); }
}

@keyframes pulseRing {
    0% { transform: scale(0.8); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: scale(1.3); opacity: 0; }
}

#esw-app-container {
    background: linear-gradient(-45deg, var(--esw-black), var(--esw-purple-dark), var(--esw-purple), var(--esw-black));
    background-size: 400% 400%;
    animation: subtlePan 30s ease infinite;
    color: var(--esw-text-main);
    font-family: 'Cairo', sans-serif;
    padding: 24px 16px;
    min-height: 100vh;
    box-sizing: border-box;
    line-height: 1.6;
    overflow-x: hidden;
    direction: rtl;
}

#esw-app-container * { box-sizing: border-box; font-family: 'Cairo', sans-serif; }

.esw-fade-in { animation: fadeIn 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards; }

.esw-top-home-nav {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 12px;
    width: 100%;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.esw-btn-home-top {
    background: transparent;
    color: var(--esw-gold);
    border: 1px solid var(--esw-gold-dim);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.esw-btn-home-top:hover {
    background: var(--esw-gold-dim);
    color: #FFF;
}

.esw-crystal-art { position: relative; width: 160px; height: 160px; margin: 0 auto 2rem; }
.esw-orb { width: 100%; height: 100%; border-radius: 50%; background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.6), rgba(199,160,77,0.4), transparent); animation: floatOrb 5s ease-in-out infinite; backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); border: 1px solid rgba(255,255,255,0.2); position: relative; z-index: 2; }
.esw-wave-ring { position: absolute; top: -10%; left: -10%; width: 120%; height: 120%; border-radius: 50%; border: 2px solid rgba(199,160,77,0.4); animation: pulseRing 4s linear infinite; z-index: 1; }

.esw-hero-screen { min-height: 80vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.esw-logo-placeholder { font-size: 0.875rem; letter-spacing: 3px; color: var(--esw-gold); text-transform: uppercase; margin-bottom: 2rem; opacity: 0.9; font-weight: 700;}
.esw-hero-title { font-size: 3.5rem; font-weight: 800; color: #FFF; margin-bottom: 0.5rem; text-shadow: 0 4px 20px rgba(0,0,0,0.5); }
.esw-hero-subtitle { font-size: 1.25rem; color: var(--esw-gold); margin-bottom: 2rem; font-weight: 500; }
.esw-hero-text { font-size: 1.1rem; color: var(--esw-text-muted); max-width: 440px; margin: 0 auto 3rem auto; line-height: 1.8; }

.esw-transition-screen { min-height: 50vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.esw-trans-label { font-size: 1.1rem; color: var(--esw-gold); letter-spacing: 2px; margin-bottom: 1rem; }
.esw-trans-title { font-size: 2.5rem; font-weight: 700; color: #FFF; margin-bottom: 1rem; }
.esw-trans-q { font-size: 1.5rem; color: var(--esw-text-main); font-style: italic; margin-bottom: 3rem; opacity: 0.9;}

.esw-timeline-wrapper { display: flex; align-items: center; justify-content: center; max-width: 440px; margin: 0 auto 2rem auto; position: relative; }
.esw-timeline-line { position: absolute; top: 50%; left: 10%; right: 10%; height: 2px; background: rgba(255,255,255,0.1); z-index: 1; transform: translateY(-50%); }
.esw-timeline-item { flex: 1; text-align: center; cursor: pointer; }
.esw-time-node { position: relative; z-index: 2; width: 34px; height: 34px; border-radius: 50%; background: var(--esw-purple-dark); border: 2px solid rgba(255,255,255,0.15); display: flex; align-items: center; justify-content: center; font-size: 0.8rem; color: var(--esw-text-muted); font-weight: 700; margin: 0 auto; transition: all 0.4s ease; backdrop-filter: blur(5px); }
.esw-timeline-item:hover .esw-time-node { border-color: var(--esw-gold-dim); color: #FFF; }
.esw-time-node.active { background: rgba(199, 160, 77, 0.2); border-color: var(--esw-gold); color: #FFF; box-shadow: 0 0 20px var(--esw-gold-dim); transform: scale(1.15); }
.esw-time-node.passed { border-color: var(--esw-gold); color: var(--esw-gold); }

.esw-container-wrapper { max-width: 480px; margin: 0 auto; }
.esw-card-glass { background: var(--esw-glass-bg); backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%); border: 1px solid var(--esw-glass-border); border-radius: 16px; padding: 24px; margin-bottom: 24px; box-shadow: inset 0 0 20px rgba(255,255,255,0.02), 0 8px 32px rgba(0,0,0,0.3); }
.esw-q-text { font-size: 1.15rem; font-weight: 600; color: #FFF; margin-bottom: 20px; display: block; line-height: 1.6; text-shadow: 0 2px 10px rgba(0,0,0,0.5);}

.esw-rating-stack { display: flex; flex-direction: column; gap: 12px; }
.esw-rate-row { display: flex; align-items: center; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.05); border-radius: 12px; padding: 12px 16px; cursor: pointer; transition: all 0.3s ease; text-align: right; width: 100%; color: var(--esw-text-muted); }
.esw-rate-row:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.2); color: #FFF; }
.esw-rate-row.active { background: var(--esw-gold-dim); border-color: var(--esw-gold); color: #FFF; box-shadow: inset 0 0 15px rgba(199,160,77,0.1); }
.esw-rate-num { display: flex; justify-content: center; align-items: center; width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,0.05); font-weight: 700; margin-left: 16px; font-size: 1rem; color: inherit; transition: all 0.3s ease; }
.esw-rate-row.active .esw-rate-num { background: var(--esw-gold); color: var(--esw-black); box-shadow: 0 0 10px rgba(199,160,77,0.5); }
.esw-rate-label { font-size: 1rem; font-weight: 500; }

.esw-flex-group { display: flex; gap: 8px; }
.esw-opt-btn { flex: 1; padding: 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); background: rgba(0,0,0,0.3); color: var(--esw-text-muted); cursor: pointer; font-size: 1rem; font-weight: 600; transition: all 0.3s; }
.esw-opt-btn:hover { background: rgba(255,255,255,0.1); }
.esw-opt-btn.active { background: var(--esw-gold-dim); border-color: var(--esw-gold); color: #FFF; }
.esw-input { width: 100%; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); padding: 14px; border-radius: 12px; color: #FFF; font-size: 0.95rem; font-weight: 500; appearance: none; }
.esw-input:focus { outline: none; border-color: var(--esw-gold); }

.esw-btn-primary { background: var(--esw-gold); color: var(--esw-black); font-weight: 700; padding: 16px; border-radius: 12px; border: none; cursor: pointer; width: 100%; font-size: 1.1rem; transition: transform 0.2s, box-shadow 0.2s; box-shadow: 0 4px 20px rgba(199, 160, 77, 0.3); }
.esw-btn-primary:active { transform: scale(0.98); }
.esw-btn-secondary { background: var(--esw-purple); color: #FFF !important; border: 1px solid rgba(255,255,255,0.1); padding: 16px; border-radius: 12px; cursor: pointer; flex: 1; font-weight: 600; transition: background 0.3s, border-color 0.3s; }
.esw-btn-secondary:hover { background: #3f2552; border-color: var(--esw-gold); color: #FFF !important; }

.esw-btn-link {
    background: var(--esw-purple);
    color: #FFF !important;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 16px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.1rem;
    transition: transform 0.2s, background 0.3s;
    box-shadow: 0 4px 20px rgba(47, 29, 65, 0.3);
    display: block;
    margin: 12px auto 0 auto;
    text-align: center;
    width: 100%;
    max-width: 320px;
    text-decoration: none;
}
.esw-btn-link:hover {
    background: #3f2552;
    border-color: var(--esw-gold);
    color: #FFF !important;
}

.esw-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0 auto;
}

.esw-share-card { background: linear-gradient(145deg, rgba(47,29,65,0.4), rgba(11,14,20,0.8)); backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px); border: 1px solid var(--esw-gold); border-radius: 16px; padding: 32px 24px; text-align: center; margin-bottom: 24px; box-shadow: 0 10px 40px rgba(0,0,0,0.6), inset 0 0 30px rgba(199,160,77,0.05); position: relative; overflow: hidden; }
.esw-share-card::before { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(circle, rgba(199,160,77,0.1) 0%, transparent 50%); z-index: 0; pointer-events: none; }
.esw-share-content { position: relative; z-index: 1; }
.esw-res-wave { font-size: 2.2rem; font-weight: 800; color: var(--esw-gold); margin: 10px 0; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.esw-res-origin { font-size: 1rem; color: var(--esw-text-main); margin-bottom: 24px; opacity: 0.9;}
.esw-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
.esw-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.esw-stat-box { background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 12px; }
.esw-stat-label { font-size: 0.8rem; color: var(--esw-text-muted); margin-bottom: 4px; }
.esw-stat-val { font-size: 1.25rem; font-weight: 700; color: #FFF; }
.esw-res-reading { font-size: 1.05rem; color: var(--esw-text-main); line-height: 1.8; text-align: right; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.1); }

.esw-social-row { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.esw-social-btn { padding: 10px 18px; border-radius: 50px; border: 1px solid rgba(255,255,255,0.15); background: rgba(0,0,0,0.4); color: #FFF; font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: all 0.3s; backdrop-filter: blur(5px); }
.esw-social-btn:hover { background: var(--esw-gold-dim); border-color: var(--esw-gold); color: var(--esw-gold); }

.esw-nav-buttons { display: flex; gap: 12px; margin-top: 24px; padding-bottom: 20px; }
.esw-error { background: rgba(199, 160, 77, 0.1); border: 1px solid var(--esw-gold); color: var(--esw-gold); padding: 14px; border-radius: 12px; text-align: center; margin-bottom: 24px; font-size: 0.95rem; font-weight: 600; }

.esw-disclaimer { font-size: 0.75rem; color: var(--esw-text-muted); text-align: center; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.05); line-height: 1.6; opacity: 0.7; }
.esw-copyright-footer { text-align: center; font-size: 0.75rem; color: var(--esw-text-muted); margin-top: 30px; padding-top: 15px; border-top: 1px solid rgba(255,255,255,0.05); opacity: 0.7; }