:root {
    --book-teal: #2F5D4C;
    --soft-white: #F9F9F9;
    --text-dark: #333333;
    --text-muted: #a9b1c2;
    --storybook-orange: #FF9E44;
    --storybook-pink: #FF6B93;
    --storybook-purple: #A66CFF;
    --storybook-blue: #6ECBE5;
    --text-light: #FFFFFF;
    --card-bg: #FFFFFF;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;

    line-height: 1.6;
    color: var(--text-dark);
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.page-header {
    text-align: center;
    padding: 60px 0 40px;
    position: relative;
}

.page-title {
    font-family: 'Kalam', cursive;
    font-size: 4rem;
    color: var(--book-teal);
    font-weight: 600;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    display: inline-block;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--storybook-orange), var(--storybook-pink));
    border-radius: 2px;
}

.page-subtitle {
    font-size: 1.3rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Interactive Gallery */
.character-gallery {
    padding: 40px 0 100px;
    position: relative;
}

.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.character-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow-light);
    transition: all 0.4s ease;
    position: relative;
    cursor: pointer;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.character-card:hover {
    transform: translateY(-15px) rotateX(5deg);
    box-shadow: 0 20px 40px var(--shadow-medium);
}

.card-front,
.card-back {
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    transition: transform 0.8s ease;
}

.card-front {
    transform: rotateY(0deg);
}

.card-back {
    position: absolute;
    top: 0;
    left: 0;
    transform: rotateY(180deg);
    background: linear-gradient(135deg, var(--book-teal) 0%, #3A8E47 100%);
    color: var(--text-light);
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.character-card.flipped .card-front {
    transform: rotateY(-180deg);
}

.character-card.flipped .card-back {
    transform: rotateY(0deg);
}

.character-image {
    width: 100%;
    height: 280px;
    overflow: hidden;
    position: relative;
}

.character-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.character-card:hover .character-image img {
    transform: scale(1.05);
}

.character-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    padding: 20px;
    color: var(--text-light);
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.character-card:hover .character-overlay {
    transform: translateY(0);
}

.character-name {
    font-family: 'Kalam', cursive;
    font-size: 2rem;
    margin-bottom: 5px;
}

.character-book {
    font-size: 1rem;
    opacity: 0.9;
}

.card-content {
    padding: 25px;
}

.character-quote {
    font-style: italic;
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--text-dark);
    line-height: 1.6;
}

.character-traits {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.trait {
    background: rgba(47, 93, 76, 0.1);
    color: var(--book-teal);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.flip-button {
    background: linear-gradient(135deg, var(--storybook-orange) 0%, var(--storybook-pink) 100%);
    color: var(--text-dark);
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(255, 158, 68, 0.3);
}

.flip-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(255, 158, 68, 0.4);
}

.back-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.back-title {
    font-family: 'Kalam', cursive;
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.back-quote {
    font-style: italic;
    font-size: 1.2rem;
    margin-bottom: 25px;
    line-height: 1.5;
}

.character-story {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 25px;
    max-height: 120px;
    overflow-y: auto;
    padding-right: 10px;
}

.character-story::-webkit-scrollbar {
    width: 5px;
}

.character-story::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.action-buttons {
    display: flex;
    gap: 15px;
}

.action-btn {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Floating Elements */
.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.floating-element {
    position: absolute;
    border-radius: 50%;
    opacity: 0.7;
    animation: float 15s infinite ease-in-out;
}

@media (max-width: 900px) {
    .floating-elements {
        display: none;
    }
}

.element-1 {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--storybook-orange), var(--storybook-pink));
    top: 10%;
    left: 5%;
    animation-delay: 0s;
    animation-duration: 20s;
}

.element-2 {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--storybook-blue), var(--storybook-purple));
    top: 70%;
    left: 85%;
    animation-delay: 2s;
    animation-duration: 18s;
}

.element-3 {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--book-teal), #3A8E47);
    top: 40%;
    left: 90%;
    animation-delay: 4s;
    animation-duration: 22s;
}

.element-4 {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--storybook-pink), var(--storybook-purple));
    top: 80%;
    left: 10%;
    animation-delay: 6s;
    animation-duration: 17s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    33% {
        transform: translateY(-30px) rotate(120deg);
    }

    66% {
        transform: translateY(15px) rotate(240deg);
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .page-title {
        font-size: 3rem;
    }

    .gallery-container {
        grid-template-columns: 1fr;
    }

    .character-card:hover {
        transform: translateY(-10px);
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 2.5rem;
    }

    .page-subtitle {
        font-size: 1.1rem;
    }

    .character-image {
        height: 220px;
    }

    .character-name {
        font-size: 1.7rem;
    }

    .back-title {
        font-size: 1.8rem;
    }
}

/* 
        ====================================================================
        ============== ABOUT AUTHOR SECTION STYLES =========================
        ====================================================================
        */
.about-author-section {
    background-color: var(--primary-green);
    padding: 120px 25px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.author-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
}

.author-info {
    text-align: left;
    color: var(--text-light);
}

.author-title {
    font-family: var(--font-illustrator-name);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-light);
    text-shadow: 0px 2px 5px rgba(0, 0, 0, 0.3);
}

.author-name {
    font-family: var(--font-illustrator-name);
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.author-bio {
    font-family: 'Nunito', sans-serif;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: var(--text-light);
}

.read-more-button {
    display: inline-block;
    background-color: var(--text-light);
    color: var(--primary-green);
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-family: 'Nunito', sans-serif;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: 2px solid var(--text-light);
}

.read-more-button:hover {
    background-color: transparent;
    color: var(--text-light);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
}

.author-image-wrapper {
    position: relative;
    aspect-ratio: 3 / 4;
    max-width: 400px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 0 25px 12px rgba(255, 255, 255, 0.2),
        0 0 45px 25px rgba(255, 255, 255, 0.1),
        0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.author-image-wrapper:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 0 35px 18px rgba(255, 255, 255, 0.3),
        0 0 65px 35px rgba(255, 255, 255, 0.15),
        0 20px 45px rgba(0, 0, 0, 0.3);
}

.author-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.author-image-wrapper:hover .author-image {
    transform: scale(1.1);
}

/* Wave dividers */
.wave-divider {
    position: absolute;
    left: 0;
    width: 100%;
    height: 100px;
    z-index: 5;
}

.wave-divider svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: #fff;
}

.wave-top {
    top: -1px;
    transform: scaleY(-1);
    fill: #F4F8FB;
}

.wave-bottom {
    bottom: -1px;
}

/* --- PROFESSIONAL IMAGE STYLING --- */
.image-container {
    perspective: 1200px;
    /* 3D effect ke liye */
    display: flex;
    justify-content: center;
    z-index: 2;
}

.author-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    border-radius: 40px;
    padding: 12px;
    /* Glassmorphism Effect */
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);

    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);

    /* Animations */
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    animation: floatImage 5s ease-in-out infinite;
    cursor: pointer;
}

.author-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 30px;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}