@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100;300;400;700;900&display=swap');

:root {
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.5);
    --secondary: #ec4899;
    --accent: #0ea5e9;
    --bg-dark: #0f172a;
    --card-bg: rgba(255, 255, 255, 0.88);
    --glass-border: rgba(255, 255, 255, 0.5);
    --text-main: #1e293b;
    --text-light: #64748b;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: #f1f5f9;
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.12) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(236, 72, 153, 0.12) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(14, 165, 233, 0.12) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(168, 85, 247, 0.12) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
}

#impress { direction: ltr; }

.step {
    width: 1100px;
    height: 750px;
    padding: 60px;
    background: var(--card-bg);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border-radius: 40px;
    border: 1px solid var(--glass-border);
    box-shadow: 
        0 20px 50px -10px rgba(0, 0, 0, 0.08),
        inset 0 0 0 1px rgba(255, 255, 255, 0.6);
    direction: rtl;
    opacity: 0;
    transition: all 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-size: 22px;
    line-height: 1.8;
    position: relative;
    transform: scale(0.85) translateY(80px);
}

.step.active { 
    opacity: 1; 
    transform: scale(1) translateY(0);
}

.page-number {
    position: absolute;
    bottom: 40px;
    left: 50px;
    font-weight: 900;
    font-size: 14px;
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 6px 20px;
    border-radius: 100px;
    direction: ltr;
    letter-spacing: 2px;
    box-shadow: 0 10px 20px var(--primary-glow);
}

#start {
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    text-align: center;
}

#start h1 {
    font-size: 100px;
    font-weight: 900;
    background: linear-gradient(to right, #4f46e5, #ec4899, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    border: none;
    margin-bottom: 20px;
    padding: 0;
}

.intro-meta {
    display: flex;
    gap: 30px;
    background: rgba(255, 255, 255, 0.7);
    padding: 20px 50px;
    border-radius: 25px;
    border: 1px solid white;
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}

.intro-meta div span {
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 14px;
    font-weight: 800;
}

h1 {
    font-size: 48px;
    color: var(--bg-dark);
    margin-bottom: 35px;
    border-right: 10px solid var(--primary);
    padding-right: 25px;
    font-weight: 900;
    line-height: 1.2;
}

h2 { 
    color: var(--secondary); 
    font-size: 26px; 
    margin-bottom: 15px; 
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 15px;
}

h2::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(to left, rgba(236, 72, 153, 0.3), transparent);
}

.highlight { color: var(--primary); font-weight: 800; }
.danger { color: #f43f5e; font-weight: 800; }

ul { list-style: none; }
li { 
    margin-bottom: 15px; 
    padding-right: 35px; 
    position: relative; 
    color: var(--text-main);
}

li::before {
    content: "←";
    position: absolute; 
    right: 0; 
    color: var(--primary);
    font-weight: 900;
}

.slide-layout { 
    display: flex; 
    gap: 40px; 
    height: 75%; 
    align-items: center;
}

.text-side { 
    flex: 1.4; 
    max-height: 100%;
}

.image-side { 
    flex: 1; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    max-height: 480px;
}

.img-frame {
    width: 100%; 
    max-width: 420px;
    border-radius: 30px;
    padding: 10px;
    background: white;
    box-shadow: 0 25px 50px rgba(0,0,0,0.1);
}

.img-frame img { 
    width: 100%; 
    height: auto; 
    max-height: 420px;
    object-fit: contain;
    border-radius: 20px;
    display: block;
}

.comparison-table {
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 25px;
    background: rgba(255,255,255,0.4);
}

.comparison-table th {
    background: var(--primary);
    color: white;
    padding: 18px;
    font-weight: 700;
}

.comparison-table td {
    padding: 15px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

#ending h1 {
    font-size: 120px;
    background: linear-gradient(to bottom, #1e293b, #64748b);
    -webkit-background-clip: text;
    border: none;
    padding: 0;
}

.step.active h1 { animation: slideUpFade 0.8s ease forwards 0.2s; opacity: 0; }
.step.active .text-side > * { animation: slideUpFade 0.8s ease forwards 0.4s; opacity: 0; }
.step.active .image-side { animation: scaleIn 1s ease forwards 0.6s; opacity: 0; }

@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.ref-box {
    direction: ltr;
    background: rgba(255,255,255,0.5);
    padding: 15px;
    border-radius: 15px;
    border-left: 5px solid var(--primary);
    margin-bottom: 15px;
}

.ref-title { font-weight: 800; font-size: 15px; color: var(--bg-dark); }
.ref-desc { direction: rtl; font-size: 14px; color: var(--text-light); }

.arch-box {
    background: white;
    padding: 20px;
    border-radius: 20px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 10px 20px rgba(0,0,0,0.02);
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 10px; }