/* ===========================
   VARIABLES & RESET
   =========================== */

:root {
    /* Colors from BookSwap theme */
    --primary: #8B6F47;
    --primary-light: #D4C4A8;
    --primary-dark: #3E2723;

    --secondary: #FAFAFA;
    --secondary-container: #E6E6E6;

    --tertiary: #44355B;
    --tertiary-light: #B8A8D0;

    --background: #FAF7F2;
    --surface: #FFFDF9;
    --surface-variant: #F0EBE3;

    --neutral-100: #F5F0EA;
    --neutral-200: #E3DDD4;
    --neutral-300: #C9BFB2;
    --neutral-400: #A59787;
    --neutral-500: #7A6E5E;

    --success: #6B9E78;
    --warning: #D4A355;
    --error: #CF6B6B;

    --text-dark: #3E2F25;
    --text-light: #6B5E52;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(62, 47, 37, 0.08);
    --shadow-md: 0 4px 16px rgba(62, 47, 37, 0.12);
    --shadow-lg: 0 8px 32px rgba(62, 47, 37, 0.16);
    --shadow-xl: 0 16px 48px rgba(62, 47, 37, 0.20);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Heebo', sans-serif;
    background: var(--background);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    direction: rtl;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ===========================
   HERO SECTION
   =========================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--surface) 0%, var(--neutral-100) 100%);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.floating-book {
    position: absolute;
    font-size: 3rem;
    opacity: 0.15;
    animation: float 20s infinite ease-in-out;
}

.book-1 {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.book-2 {
    top: 20%;
    left: 80%;
    animation-delay: 2s;
}

.book-3 {
    top: 60%;
    left: 15%;
    animation-delay: 4s;
}

.book-4 {
    top: 70%;
    left: 75%;
    animation-delay: 6s;
}

.book-5 {
    top: 40%;
    left: 50%;
    animation-delay: 8s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-30px) rotate(5deg);
    }
    50% {
        transform: translateY(-60px) rotate(-5deg);
    }
    75% {
        transform: translateY(-30px) rotate(3deg);
    }
}

.hero-content {
    text-align: center;
    z-index: 1;
    padding: var(--spacing-lg) 0;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    color: var(--primary);
    margin-bottom: var(--spacing-md);
    line-height: 1.1;
    text-shadow: 0 4px 20px rgba(139, 111, 71, 0.2);
}

.word {
    display: inline-block;
    animation: slideIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes slideIn {
    0% {
        transform: translateY(100px) scale(0.5);
        opacity: 0;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.hero-subtitle {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--tertiary);
    margin-bottom: var(--spacing-sm);
    font-weight: 500;
}

.hero-description {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto var(--spacing-lg);
    line-height: 1.8;
}

.fade-in {
    animation: fadeIn 0.8s ease-out;
}

.fade-in-delay {
    animation: fadeIn 0.8s ease-out 0.3s backwards;
}

.fade-in-delay-2 {
    animation: fadeIn 0.8s ease-out 0.6s backwards;
}

.fade-in-delay-3 {
    animation: fadeIn 0.8s ease-out 0.9s backwards;
}

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

/* Buttons */
.cta-buttons {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1.125rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-block;
    cursor: pointer;
    border: none;
    font-family: 'Heebo', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #9A7F57 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(139, 111, 71, 0.7);
    }
    50% {
        box-shadow: 0 0 0 20px rgba(139, 111, 71, 0);
    }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--primary);
    border-radius: 20px;
    position: relative;
    animation: bounce 2s infinite;
}

.wheel {
    width: 4px;
    height: 10px;
    background: var(--primary);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(10px);
    }
}

@keyframes scroll {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
}

/* ===========================
   SECTIONS
   =========================== */

section {
    padding: var(--spacing-xl) 0;
}

.section-title {
    text-align: center;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: var(--spacing-lg);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--tertiary) 100%);
    margin: var(--spacing-sm) auto 0;
    border-radius: 2px;
}

/* ===========================
   FEATURES SECTION
   =========================== */

.features {
    background: var(--surface);
    position: relative;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.feature-card {
    background: white;
    padding: var(--spacing-lg);
    border-radius: 24px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--tertiary) 100%);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    font-size: 4rem;
    margin-bottom: var(--spacing-sm);
    display: inline-block;
    transition: transform 0.4s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.2) rotate(5deg);
}

.swap-icon {
    animation: rotate 3s infinite linear;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.give-icon {
    animation: bounce-icon 2s infinite;
}

@keyframes bounce-icon {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.chat-icon {
    animation: shake 3s infinite;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

.feature-card h3 {
    font-size: 1.75rem;
    color: var(--primary-dark);
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
}

.feature-card p {
    color: var(--text-light);
    font-size: 1.125rem;
    line-height: 1.7;
    margin-bottom: var(--spacing-sm);
}

.feature-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: var(--spacing-sm);
}

.badge-swap {
    background: linear-gradient(135deg, #FFE4B5 0%, var(--warning) 100%);
    color: white;
}

.badge-give {
    background: linear-gradient(135deg, #C8E6C9 0%, var(--success) 100%);
    color: white;
}

.badge-chat {
    background: linear-gradient(135deg, var(--tertiary-light) 0%, var(--tertiary) 100%);
    color: white;
}

/* ===========================
   HOW IT WORKS SECTION
   =========================== */

.how-it-works {
    background: linear-gradient(135deg, var(--neutral-100) 0%, var(--surface) 100%);
    position: relative;
    overflow: hidden;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
    margin-top: var(--spacing-lg);
}

.step {
    display: grid;
    grid-template-columns: 80px 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
    position: relative;
}

.step-reverse {
    grid-template-columns: 80px 1fr 1fr;
}

.step-reverse .step-content {
    order: 3;
}

.step-reverse .step-illustration {
    order: 2;
}

.step-number {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--tertiary) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 900;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
}

.step-content h3 {
    font-size: 2rem;
    color: var(--primary-dark);
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
}

.step-content p {
    color: var(--text-light);
    font-size: 1.125rem;
    line-height: 1.8;
}

/* Phone Mockup */
.phone-mockup {
    display: flex;
    justify-content: center;
    align-items: center;
}

.phone-screen {
    width: 280px;
    height: 500px;
    background: white;
    border-radius: 32px;
    box-shadow: var(--shadow-xl);
    border: 12px solid var(--primary-dark);
    overflow: hidden;
    position: relative;
}

.phone-screen::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 20px;
    background: var(--primary-dark);
    border-radius: 0 0 20px 20px;
    z-index: 10;
}

/* Upload Animation */
.upload-animation {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: var(--spacing-md);
}

.book-upload {
    font-size: 5rem;
    animation: bookFloat 2s infinite ease-in-out;
}

@keyframes bookFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.upload-arrow {
    font-size: 3rem;
    color: var(--success);
    animation: arrowPulse 1.5s infinite ease-in-out;
}

@keyframes arrowPulse {
    0%, 100% {
        opacity: 0.3;
        transform: translateY(0);
    }
    50% {
        opacity: 1;
        transform: translateY(-10px);
    }
}

/* Search Animation */
.search-animation {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
}

.book-card {
    width: 100%;
    height: 80px;
    background: var(--surface-variant);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: var(--shadow-sm);
    animation: slideInCards 0.6s ease-out backwards;
}

.card-1 {
    animation-delay: 0.2s;
}

.card-2 {
    animation-delay: 0.4s;
}

.card-3 {
    animation-delay: 0.6s;
}

@keyframes slideInCards {
    from {
        transform: translateX(-100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Chat Animation */
.chat-animation {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    height: 100%;
    justify-content: center;
}

.message {
    padding: var(--spacing-sm) var(--spacing-sm);
    border-radius: 16px;
    max-width: 80%;
    font-size: 0.875rem;
    animation: messageAppear 0.4s ease-out backwards;
}

.message-sent {
    background: var(--primary);
    color: white;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    animation-delay: 0.2s;
}

.message-received {
    background: var(--surface-variant);
    color: var(--text-dark);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    animation-delay: 0.6s;
}

@keyframes messageAppear {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: var(--spacing-sm);
    background: var(--surface-variant);
    border-radius: 16px;
    width: fit-content;
    animation: messageAppear 0.4s ease-out 1s backwards;
    align-self: flex-end;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--text-light);
    border-radius: 50%;
    animation: typingDot 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) {
    animation-delay: 0s;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDot {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* ===========================
   BENEFITS SECTION
   =========================== */

.benefits {
    background: var(--surface);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
    justify-items: center;
}

.benefits-grid .benefit-card:nth-child(5),
.benefits-grid .benefit-card:nth-child(6) {
    grid-column: span 1;
}

.benefits-grid .benefit-card:nth-child(5) {
    grid-column-start: 2;
}

@media (max-width: 1024px) {
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .benefits-grid .benefit-card:nth-child(5),
    .benefits-grid .benefit-card:nth-child(6) {
        grid-column: span 1;
    }

    .benefits-grid .benefit-card:nth-child(5) {
        grid-column-start: auto;
    }
}

@media (max-width: 768px) {
    .benefits-grid {
        grid-template-columns: 1fr;
    }
}

.benefit-card {
    background: white;
    padding: var(--spacing-lg);
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.benefit-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.benefit-icon {
    font-size: 3.5rem;
    margin-bottom: var(--spacing-sm);
    display: block;
}

.benefit-card h3 {
    font-size: 1.5rem;
    color: var(--primary-dark);
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
}

.benefit-card p {
    color: var(--text-light);
    line-height: 1.7;
}

/* ===========================
   STATS SECTION
   =========================== */

.stats {
    background: linear-gradient(135deg, var(--primary) 0%, var(--tertiary) 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.stats::before {
    content: '📚';
    position: absolute;
    font-size: 20rem;
    opacity: 0.05;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    position: relative;
    z-index: 1;
}

.stat-card {
    text-align: center;
    padding: var(--spacing-md);
}

.stat-number {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 900;
    line-height: 1;
    margin-bottom: var(--spacing-sm);
    background: linear-gradient(135deg, white 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 1.25rem;
    font-weight: 500;
    opacity: 0.9;
}

/* ===========================
   DOWNLOAD SECTION
   =========================== */

.download {
    background: linear-gradient(135deg, var(--surface) 0%, var(--neutral-100) 100%);
    text-align: center;
}

.download-content h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--primary-dark);
    margin-bottom: var(--spacing-sm);
    font-weight: 800;
}

.download-content p {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: var(--spacing-lg);
}

.download-buttons {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
}

.store-button {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    padding: 1rem 1.75rem;
    background: var(--primary-dark);
    color: white;
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 220px;
    height: 70px;
    position: relative;
    overflow: hidden;
}

.store-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.store-button:hover::before {
    opacity: 1;
}

.store-button-android {
    background: linear-gradient(135deg, #3DDC84 0%, #2CA05A 100%);
}

.store-button-android:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(61, 220, 132, 0.4);
}

.store-button-ios {
    background: linear-gradient(135deg, #147EFB 0%, #0A5FC9 100%);
}

.store-button-ios:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(20, 126, 251, 0.4);
}

.store-button-disabled {
    background: linear-gradient(135deg, #BDBDBD 0%, #9E9E9E 100%);
    cursor: not-allowed;
    opacity: 0.7;
}

.store-button-disabled:hover {
    transform: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.store-button-disabled:hover::before {
    opacity: 0;
}

.store-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.button-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
    flex: 1;
}

.small-text {
    font-size: 0.7rem;
    opacity: 0.95;
    font-weight: 400;
    letter-spacing: 0.3px;
}

.big-text {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    line-height: 1.2;
}

@media (max-width: 600px) {
    .download-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .store-button {
        width: 280px;
        height: 65px;
    }

    .store-icon {
        width: 35px;
        height: 35px;
    }

    .small-text {
        font-size: 0.65rem;
    }

    .big-text {
        font-size: 1.05rem;
    }
}

/* App Preview */
.app-preview {
    margin-top: var(--spacing-lg);
    display: flex;
    justify-content: center;
}

.phone-device {
    perspective: 1000px;
}

.phone-frame {
    width: 320px;
    height: 640px;
    background: var(--primary-dark);
    border-radius: 40px;
    padding: 12px;
    box-shadow: var(--shadow-xl);
    position: relative;
    animation: float 6s infinite ease-in-out;
}

.phone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    height: 30px;
    background: var(--primary-dark);
    border-radius: 0 0 20px 20px;
    z-index: 2;
}

.app-screen {
    width: 100%;
    height: 100%;
    background: var(--background);
    border-radius: 32px;
    overflow: hidden;
}

.app-demo {
    padding: var(--spacing-md);
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.demo-header {
    padding: var(--spacing-sm);
    background: var(--primary);
    border-radius: 12px;
    color: white;
}

.demo-title {
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--spacing-xs);
}

.demo-tabs {
    display: flex;
    gap: var(--spacing-xs);
    justify-content: center;
}

.tab {
    padding: 0.25rem 0.75rem;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tab.active {
    background: rgba(255, 255, 255, 0.3);
}

.demo-books-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-xs);
}

.demo-book-item {
    background: white;
    border-radius: 12px;
    padding: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    box-shadow: var(--shadow-sm);
    animation: slideInList 0.5s ease-out backwards;
    min-height: 70px;
}

@media (max-width: 400px) {
    .demo-book-item {
        gap: 0.5rem;
        padding: 0.625rem;
    }

    .book-icon {
        font-size: 2rem !important;
    }

    .book-badge {
        font-size: 0.5rem !important;
        padding: 0.2rem 0.5rem !important;
        white-space: nowrap;
    }
}

.demo-book-item:nth-child(1) {
    animation-delay: 0.1s;
}

.demo-book-item:nth-child(2) {
    animation-delay: 0.2s;
}

.demo-book-item:nth-child(3) {
    animation-delay: 0.3s;
}

.demo-book-item:nth-child(4) {
    animation-delay: 0.4s;
}

.book-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.book-info {
    flex: 1;
    text-align: right;
}

.book-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.125rem;
}

.book-author {
    font-size: 0.75rem;
    color: var(--text-light);
}

.book-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.625rem;
    font-weight: 600;
    flex-shrink: 0;
}

.book-badge.swap {
    background: linear-gradient(135deg, #FFE4B5 0%, var(--warning) 100%);
    color: white;
}

.book-badge.give {
    background: linear-gradient(135deg, #C8E6C9 0%, var(--success) 100%);
    color: white;
}

@keyframes slideInList {
    from {
        transform: translateX(-30px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes popIn {
    from {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    to {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* ===========================
   FOOTER
   =========================== */

.footer {
    background: var(--primary-dark);
    color: white;
    padding: var(--spacing-lg) 0 var(--spacing-md);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.footer-brand h3 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.footer-brand p {
    opacity: 0.8;
}

.footer-links {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.footer-links a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.7;
}

/* ===========================
   REVEAL ANIMATIONS
   =========================== */

.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ===========================
   RESPONSIVE
   =========================== */

@media (max-width: 968px) {
    .step {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .step-reverse {
        grid-template-columns: 1fr;
    }

    .step-reverse .step-content {
        order: 2;
    }

    .step-reverse .step-illustration {
        order: 3;
    }

    .step-number {
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    :root {
        --spacing-lg: 3rem;
        --spacing-xl: 4rem;
    }

    section {
        padding: var(--spacing-lg) 0;
    }

    .hero {
        min-height: 80vh;
    }

    .floating-book {
        font-size: 2rem;
    }

    .phone-screen {
        width: 240px;
        height: 420px;
    }

    .phone-frame {
        width: 280px;
        height: 560px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-sm);
    }

    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }
}

/* ===========================
   SCROLL BAR STYLING
   =========================== */

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--neutral-100);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ===========================
   SELECTION STYLING
   =========================== */

::selection {
    background: var(--primary);
    color: white;
}

::-moz-selection {
    background: var(--primary);
    color: white;
}
