/* Custom CSS for The Color With Me - Showcase Page */

:root {
    /* Color Palette */
    --bg-gradient: linear-gradient(135deg, #fef3c7 0%, #fde047 15%, #f43f5e 50%, #8b5cf6 85%, #3b82f6 100%);
    --body-bg: #f8fafc;
    --text-main: #1e293b;
    --text-muted: #64748b;
    
    /* Branding Colors */
    --brand-primary: #f43f5e; /* Vibrant Coral/Pink from logo */
    --brand-secondary: #8b5cf6; /* Purple from logo */
    --brand-accent: #ff8a00; /* Warm orange */
    
    /* Badge Colors */
    --color-adults: #8b5cf6;
    --color-adults-bg: rgba(139, 92, 246, 0.12);
    --color-kids: #ec4899;
    --color-kids-bg: rgba(236, 72, 153, 0.12);
    --color-vehicles: #06b6d4;
    --color-vehicles-bg: rgba(6, 182, 212, 0.12);
    --color-animals: #10b981;
    --color-animals-bg: rgba(16, 185, 129, 0.12);
    --color-simple: #f59e0b;
    --color-simple-bg: rgba(245, 158, 11, 0.12);
    --color-botanical: #14b8a6;
    --color-botanical-bg: rgba(20, 184, 166, 0.12);
    --color-school: #6366f1;
    --color-school-bg: rgba(99, 102, 241, 0.12);

    /* UI Tokens */
    --card-bg: rgba(255, 255, 255, 0.85);
    --card-border: rgba(255, 255, 255, 0.6);
    --card-shadow: 0 8px 32px rgba(31, 38, 135, 0.08);
    --hover-shadow: 0 12px 40px rgba(244, 63, 94, 0.15);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-main);
    background-color: var(--body-bg);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 0;
    overflow-x: hidden;
    position: relative;
}

/* Animated background blob decoration to mimic watercolor splashes in the logo */
body::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -20%;
    width: 140%;
    height: 60%;
    background: var(--bg-gradient);
    filter: blur(80px);
    opacity: 0.35;
    z-index: -1;
    border-radius: 50%;
    animation: pulseBg 12s ease-in-out infinite alternate;
}

@keyframes pulseBg {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
    100% {
        transform: translate(2%, 4%) scale(1.05) rotate(5deg);
    }
}

/* App Container (Optimized for Mobile Screens / Link-in-Bio) */
.app-container {
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    padding: 32px 20px 48px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

/* Profile Header Section */
.profile-header {
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeInDown 0.8s var(--transition);
}

.logo-wrapper {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(45deg, #ff007f, #ffaa00, #00ffaa, #0088ff, #9900ff);
    background-size: 300% 300%;
    animation: rotateGradient 6s linear infinite;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid white;
}

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

.brand-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #f43f5e 20%, #8b5cf6 80%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-subtitle {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-muted);
    line-height: 1.5;
    max-width: 90%;
    margin-bottom: 20px;
}

/* Social Buttons */
.social-links {
    width: 100%;
    display: flex;
    justify-content: center;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.instagram-btn {
    background: white;
    color: #e1306c;
    box-shadow: 0 4px 12px rgba(225, 48, 108, 0.1);
}

.instagram-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(225, 48, 108, 0.2);
    background: #e1306c;
    color: white;
}

/* Books List Container */
.books-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: -8px;
    padding-left: 8px;
    animation: fadeInUp 0.8s var(--transition);
}

/* Book Card Layout */
.book-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    animation: fadeInUp 0.8s cubic-bezier(0.25, 0.8, 0.25, 1) both;
}

.book-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--hover-shadow);
    border-color: rgba(244, 63, 94, 0.2);
}

/* Card Image Area */
.book-image-container {
    width: 100%;
    position: relative;
    padding: 16px;
    background: rgba(0, 0, 0, 0.02);
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.book-cover {
    width: 100%;
    max-width: 220px;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
}

.book-card:hover .book-cover {
    transform: scale(1.03) rotate(1deg);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

/* Card Info Area */
.book-info {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Badge System */
.book-badge-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.badge {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 12px;
}

.badge-adults { color: var(--color-adults); background: var(--color-adults-bg); }
.badge-simple { color: var(--color-simple); background: var(--color-simple-bg); }
.badge-kids { color: var(--color-kids); background: var(--color-kids-bg); }
.badge-vehicles { color: var(--color-vehicles); background: var(--color-vehicles-bg); }
.badge-animals { color: var(--color-animals); background: var(--color-animals-bg); }
.badge-botanical { color: var(--color-botanical); background: var(--color-botanical-bg); }
.badge-school { color: var(--color-school); background: var(--color-school-bg); }

.book-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
}

.book-tagline {
    font-size: 13px;
    font-weight: 600;
    color: var(--brand-primary);
    line-height: 1.4;
}

.book-description {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Call to Action Button */
.buy-button {
    margin-top: 14px;
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.25);
    transition: var(--transition);
    width: 100%;
}

.buy-button:hover {
    box-shadow: 0 6px 22px rgba(244, 63, 94, 0.4);
    transform: translateY(-1px);
    background: linear-gradient(135deg, var(--brand-primary) 10%, var(--brand-secondary) 90%);
}

.buy-button:active {
    transform: translateY(1px);
}

.buy-button i {
    font-size: 18px;
}

/* Filter Tabs Styling */
.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-bottom: 8px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    animation: fadeInDown 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.filter-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.5);
}

.filter-btn.active {
    background: white;
    color: var(--brand-primary);
    box-shadow: 0 4px 12px rgba(244, 63, 94, 0.1);
}

/* Footer styling */
.app-footer {
    width: 100%;
    text-align: center;
    padding: 24px 0 8px 0;
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: fadeInUp 1s var(--transition);
}

.heart-icon {
    color: var(--brand-primary);
    animation: heartbeat 1.5s infinite;
    display: inline-block;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.copyright {
    opacity: 0.7;
}

/* Animation Defs */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Delays for cascading entry animation */
.book-card:nth-child(2) { animation-delay: 0.15s; }
.book-card:nth-child(3) { animation-delay: 0.3s; }
.book-card:nth-child(4) { animation-delay: 0.45s; }
.book-card:nth-child(5) { animation-delay: 0.6s; }
.book-card:nth-child(6) { animation-delay: 0.75s; }
.book-card:nth-child(7) { animation-delay: 0.9s; }

/* Responsive adjustments for slightly wider screens (Tablets/Desktops) */
@media (min-width: 600px) {
    body {
        padding: 40px 20px;
    }
    .app-container {
        border-radius: var(--radius-lg);
        background: rgba(255, 255, 255, 0.45);
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.35);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 40px;
    }
}
