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

:root {
    --primary: #667eea;
    --secondary: #764ba2;
    --accent: #f093fb;
    --success: #10b981;
    --warm: #f59e0b;
    --text: #1f2937;
    --text-light: #6b7280;
    --white: #ffffff;
    --shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
    --shadow-lg: 0 20px 60px rgba(102, 126, 234, 0.4);
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text);
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 75vw;
    height: 75vw;
    background-image: url('assets/iAppreciateYou-Hero.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.48;
    pointer-events: none;
    z-index: 0;
}

#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* Header */
header {
    text-align: center;
    padding: 0.5rem 0 1rem 0;
}

.hero-image {
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.hero-image::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    z-index: 0;
    animation: pulse-glow 3s ease-in-out infinite;
}

.hero-image img {
    position: relative;
    z-index: 1;
    max-width: 400px;
    height: auto;
    border-radius: 20px;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(255, 255, 255, 0.2),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.hero-image img:hover {
    transform: scale(1.08);
    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.4),
        0 0 60px rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

@keyframes pulse-glow {
    0%, 100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
    letter-spacing: -0.5px;
}

.about-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.2);
    color: var(--white);
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Georgia', serif;
    font-style: italic;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-btn:hover {
    background: rgba(255,255,255,0.4);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255,255,255,0.4);
}

.subtitle {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
    margin-top: 0.5rem;
    padding: 0.6rem 1.5rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0.1));
    border-radius: 30px;
    border: 2px solid rgba(255,255,255,0.4);
    display: inline-block;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    letter-spacing: 0.5px;
    animation: subtle-pulse 3s ease-in-out infinite;
}

@keyframes subtle-pulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(0,0,0,0.2);
        border-color: rgba(255,255,255,0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(255,255,255,0.3);
        border-color: rgba(255,255,255,0.6);
    }
}

.dedication {
    font-size: 1rem;
    color: var(--white);
    font-style: italic;
    font-weight: 600;
    margin-top: 0.75rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

/* Main Card */
.affirmation-card {
    background: var(--white);
    border-radius: 24px;
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-lg);
    text-align: center;
    transition: transform 0.3s ease;
}

.affirmation-card:hover {
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.category-badge {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    padding: 0.35rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.favorite-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.favorite-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 2.5rem;
    padding: 0;
    transition: transform 0.2s ease;
    line-height: 1;
}

.favorite-btn:hover {
    transform: scale(1.2);
}

.favorite-btn .heart {
    color: transparent;
    -webkit-text-stroke: 3px #ef4444;
    transition: all 0.3s ease;
}

.favorite-btn.active .heart {
    color: #ef4444;
    -webkit-text-stroke: 3px #ef4444;
    text-shadow: 0 4px 15px rgba(239, 68, 68, 0.5);
    animation: heart-pop 0.4s ease;
}

@keyframes heart-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.favorite-hint {
    font-size: 0.65rem;
    color: var(--text-light);
    margin-top: 0.2rem;
    opacity: 0.8;
}

.favorite-toast {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.favorite-toast.show {
    opacity: 1;
    top: -40px;
}

.affirmation-text {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text);
    padding: 0.25rem 0;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

/* Details Section */
.details-section {
    margin-bottom: 0.5rem;
    display: none;
}

.details-toggle {
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.details-toggle:hover {
    background: linear-gradient(135deg, #e5e7eb, #d1d5db);
    transform: translateY(-1px);
}

.details-toggle.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.details-toggle.active .toggle-icon {
    transform: rotate(180deg);
}

.toggle-icon {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.details-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    text-align: left;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 12px;
    margin-top: 0.75rem;
}

.details-content.open {
    max-height: 300px;
    padding: 1rem;
}

.details-meaning {
    font-size: 0.9rem;
    color: var(--text);
    line-height: 1.6;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.details-reinforcement {
    font-size: 0.85rem;
    color: var(--primary);
    font-style: italic;
    line-height: 1.5;
    padding-left: 0.75rem;
    border-left: 3px solid var(--primary);
}

/* Buttons */
.btn {
    border: none;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Category Filters */
.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    padding: 0.75rem 0;
}

.filter-btn {
    background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0.1));
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.4);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    transition: all 0.2s ease;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
    backdrop-filter: blur(5px);
}

.filter-btn:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255,255,255,0.2);
}

.filter-btn.active {
    background: linear-gradient(135deg, #10b981, #059669);
    color: var(--white);
    border-color: rgba(255,255,255,0.5);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    transform: translateY(-2px);
}

/* Stats Row */
.stats-row {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 0.75rem 0;
}

.stat {
    text-align: center;
    color: var(--white);
}

.stat-num {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.7rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Favorites Section */
.favorites-section {
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    padding: 1rem;
    margin-top: 0.5rem;
    flex: 1;
    max-height: 200px;
    overflow-y: auto;
}

.favorites-section h3 {
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 0.5rem;
    text-align: center;
}

.search-wrapper {
    margin-bottom: 0.75rem;
}

.favorites-search {
    width: 100%;
    padding: 0.6rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 25px;
    font-size: 0.85rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.2s ease;
    background: #f9fafb;
}

.favorites-search:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.favorites-search::placeholder {
    color: #9ca3af;
}

.favorites-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.favorite-item {
    background: linear-gradient(135deg, #f9fafb, #ffffff);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border-left: 3px solid var(--primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.favorite-text {
    font-size: 0.85rem;
    color: var(--text);
    flex: 1;
}

.remove-btn {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.remove-btn:hover {
    color: #ef4444;
}

.empty-state {
    text-align: center;
    color: var(--text-light);
    font-size: 0.85rem;
    padding: 1rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 1rem 0;
}

.share-cta {
    font-size: 0.9rem;
    color: var(--white);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.btn-share {
    background: rgba(255,255,255,0.25);
    color: var(--white);
    padding: 0.7rem 2rem;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    border: 2px solid rgba(255,255,255,0.4);
}

.btn-share:hover {
    background: rgba(255,255,255,0.4);
    transform: translateY(-2px);
}

/* Footer Cards */
.footer-card {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1.25rem;
    margin: 1rem 0;
    border: 2px solid rgba(255,255,255,0.3);
    text-align: center;
}

.footer-made-with {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    margin-bottom: 0.5rem;
}

.footer-brand {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--white);
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    margin-bottom: 0.75rem;
}

.footer-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.footer-badges span {
    background: rgba(255,255,255,0.25);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.4);
}

.attribution-card {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.3));
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 1.5rem;
    margin-top: 1rem;
    border: 2px solid rgba(16, 185, 129, 0.5);
    text-align: center;
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.2);
}

.attribution-intro {
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.neoaesop-link {
    display: inline-block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
    background: linear-gradient(135deg, #10b981, #059669);
    padding: 0.75rem 2rem;
    border-radius: 30px;
    margin: 0.75rem 0;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
    border: 2px solid rgba(255,255,255,0.3);
}

.neoaesop-link:hover {
    transform: translateY(-3px) scale(1.08);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.6);
    background: linear-gradient(135deg, #059669, #047857);
}

.attribution-tagline {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    margin: 0.5rem 0;
}

.attribution-initiative {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.9);
    font-style: italic;
    margin-top: 0.5rem;
}

/* About Modal */
.about-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.about-modal.active {
    display: flex;
}

.about-modal-content {
    background: var(--white);
    border-radius: 24px;
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    position: relative;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: modal-pop 0.3s ease;
}

@keyframes modal-pop {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.about-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border: none;
    background: #f3f4f6;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    transition: all 0.2s ease;
}

.about-close:hover {
    background: #e5e7eb;
    color: var(--text);
}

.about-modal-content h2 {
    font-size: 1.5rem;
    color: var(--text);
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-tagline {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
}

.about-text {
    font-size: 1rem;
    color: var(--text);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.about-vital {
    font-size: 0.95rem;
    color: var(--secondary);
    font-weight: 600;
    font-style: italic;
    margin-bottom: 1.25rem;
}

.about-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.about-features span {
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
}

.about-neoaesop {
    display: inline-block;
    background: linear-gradient(135deg, #10b981, #059669);
    color: var(--white);
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.about-neoaesop:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

/* Animations */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.bounce {
    animation: bounce 0.4s ease;
}

/* Scrollbar */
.favorites-section::-webkit-scrollbar {
    width: 4px;
}

.favorites-section::-webkit-scrollbar-track {
    background: transparent;
}

.favorites-section::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

/* Mobile Optimizations */
@media (max-width: 480px) {
    .container {
        padding: 0.75rem;
    }

    .hero-image img {
        max-width: 250px;
    }

    .hero-image::before {
        width: 300px;
        height: 300px;
    }

    .title {
        font-size: 1.75rem;
    }

    .affirmation-card {
        padding: 1.25rem;
    }

    .affirmation-text {
        font-size: 1.1rem;
    }

    .filter-btn {
        padding: 0.4rem 0.7rem;
        font-size: 0.75rem;
    }

    .stats-row {
        gap: 1.5rem;
    }

    .stat-num {
        font-size: 1.25rem;
    }

    .dedication {
        font-size: 0.8rem;
    }
}

/* Tablet and larger */
@media (min-width: 768px) {
    .container {
        padding: 2rem 3rem;
    }

    .affirmation-text {
        font-size: 1.5rem;
        min-height: 100px;
    }

    .affirmation-card {
        padding: 2rem;
    }

    .category-filters {
        gap: 0.75rem;
    }

    .filter-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}
