/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'IranYekan', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #8b5cf6 50%, #ec4899 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text-dark);
    line-height: 1.8;
    overflow-x: hidden;
}

/* Loading Animation */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #8b5cf6 50%, #ec4899 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
    color: var(--white);
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loader-content p {
    font-size: 1.2rem;
    margin-top: 20px;
}

/* Animated Background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-animation::before,
.bg-animation::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    animation: float 20s infinite ease-in-out;
}

.bg-animation::before {
    top: -250px;
    right: -250px;
    animation-delay: 0s;
}

.bg-animation::after {
    bottom: -250px;
    left: -250px;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(50px, 50px) scale(1.2);
    }
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    position: relative;
    color: var(--white);
}

.hero-logo {
    width: clamp(120px, 20vw, 200px);
    height: auto;
    margin-bottom: 40px;
    animation: fadeInDown 1s ease;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.hero-logo:hover {
    transform: scale(1.1) rotate(5deg);
}

.hero-content {
    max-width: 800px;
    animation: fadeInUp 1s ease;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: bold;
    margin-bottom: 30px;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
    background: linear-gradient(135deg, #ffffff 0%, #e0ffe8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 5s ease infinite;
    background-size: 200% 200%;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    margin-bottom: 20px;
    opacity: 0.95;
    font-weight: 300;
}

.hero-description {
    font-size: clamp(1rem, 2vw, 1.2rem);
    opacity: 0.9;
    margin-bottom: 40px;
    line-height: 1.8;
}

/* Book Showcase */
.book-showcase {
    max-width: 1400px;
    margin: 0 auto;
    padding: 80px 20px;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    align-items: center;
    position: relative;
}

.book-showcase::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

.book-cover-wrapper {
    position: relative;
    perspective: 1000px;
}

.book-cover {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    animation: bookFloat 6s ease-in-out infinite;
}

@keyframes bookFloat {
    0%, 100% {
        transform: translateY(0) rotateY(0deg);
    }
    50% {
        transform: translateY(-20px) rotateY(5deg);
    }
}

.book-cover:hover {
    transform: translateY(-30px) rotateY(10deg) scale(1.05);
    animation: none;
}

.book-info {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    padding: 50px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.book-info:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
}

.book-title {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--text-dark);
    margin-bottom: 25px;
    font-weight: bold;
    line-height: 1.3;
}

.book-description {
    font-size: 1.15rem;
    color: var(--text-light);
    margin-bottom: 35px;
    line-height: 2;
    text-align: justify;
}

.book-meta {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
    font-size: 1rem;
    padding: 8px 16px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.meta-item:hover {
    background: rgba(139, 92, 246, 0.2);
    transform: translateY(-2px);
}

.meta-item::before {
    content: '✓';
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 20px 50px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.3rem;
    font-weight: bold;
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.4);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.download-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.download-btn:hover::before {
    width: 400px;
    height: 400px;
}

.download-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(139, 92, 246, 0.6);
}

.download-btn:active {
    transform: translateY(-2px);
}

.download-icon {
    font-size: 1.5rem;
}

/* Authors Section */
.authors-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 100px 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 70px;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--white);
    margin-bottom: 20px;
    font-weight: bold;
    text-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
}

.authors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.author-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    padding: 50px 40px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.author-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.author-card:hover::before {
    transform: scaleX(1);
}

.author-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
}

.author-photo-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 30px;
}

.author-photo {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    border: 6px solid var(--white);
    transition: transform 0.4s ease;
    position: relative;
    z-index: 1;
}

.author-photo-wrapper::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.author-card:hover .author-photo-wrapper::before {
    opacity: 0.3;
}

.author-card:hover .author-photo {
    transform: scale(1.1);
}

.author-name {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 20px;
    font-weight: bold;
}

.author-bio {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 2;
    text-align: justify;
}

/* Contact Section */
.contact-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 100px 20px;
}

.contact-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.contact-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    z-index: 0;
}

.contact-container > * {
    position: relative;
    z-index: 1;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.contact-title {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--text-dark);
    margin-bottom: 20px;
    font-weight: bold;
}

.contact-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 40px;
    line-height: 2;
}

.contact-email {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    padding: 20px 50px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.3rem;
    font-weight: bold;
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.4);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.contact-email::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.contact-email:hover::before {
    width: 400px;
    height: 400px;
}

.contact-email:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(139, 92, 246, 0.6);
}

.email-icon {
    font-size: 1.8rem;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(17, 153, 142, 0.6);
}

.scroll-to-top:active {
    transform: translateY(-2px);
}

/* Footer */
footer {
    text-align: center;
    padding: 50px 20px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

footer p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.8s ease forwards;
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 968px) {
    .book-showcase {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 60px 20px;
    }

    .book-cover {
        max-width: 300px;
        margin: 0 auto;
    }

    .book-info {
        padding: 40px 30px;
    }

    .authors-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: 80vh;
    }

    .hero-logo {
        margin-bottom: 30px;
    }

    .book-showcase {
        padding: 40px 20px;
    }

    .book-info {
        padding: 30px 20px;
    }

    .book-meta {
        flex-direction: column;
        gap: 15px;
    }

    .download-btn {
        padding: 18px 40px;
        font-size: 1.1rem;
    }

    .author-card {
        padding: 40px 30px;
    }

    .author-photo {
        width: 180px;
        height: 180px;
    }

    .contact-container {
        padding: 40px 30px;
    }

    .contact-email {
        padding: 18px 40px;
        font-size: 1.1rem;
    }

    .scroll-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        left: 20px;
        font-size: 1.3rem;
    }
}

/* Smooth Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark-color);
}

