﻿/* ========================================
   PiyumLanka Popular Names - Attractive Design
   Using Option 2: Attractive-First Color Scheme
   ======================================== */

/* Color Variables - Soft & Feminine */
:root {
    /* Soft Pastels */
    --soft-lavender: #E6D5E8;
    --powder-pink: #F7D5E0;
    --mint-cream: #E8F5E9;
    --peach-blossom: #FFDAB9;
    --baby-blue: #E3F2FD;
    /* Cultural Colors */
    --saffron-gold: #FFB347;
    --lotus-pink: #F4C2C2;
    --peacock-teal: #A5D6D6;
    /* Gradients */
    --gradient-hero: linear-gradient(135deg, #E6D5E8 0%, #F7D5E0 50%, #FFDAB9 100%);
    --gradient-card-girl: linear-gradient(135deg, #F7D5E0 0%, #FFE5E5 100%);
    --gradient-card-boy: linear-gradient(135deg, #E3F2FD 0%, #E8F5E9 100%);
    --gradient-button: linear-gradient(135deg, #FFB6C1 0%, #FFA0B4 100%);
    /* Text Colors */
    --text-primary: #2C2C2C;
    --text-secondary: #666666;
    --text-light: #999999;
    /* UI Colors */
    --white: #FFFFFF;
    --shadow-light: rgba(0, 0, 0, 0.08);
    --shadow-medium: rgba(0, 0, 0, 0.12);
    --shadow-heavy: rgba(0, 0, 0, 0.16);
}

/* Container */
.popular-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
    background: linear-gradient(180deg, #FFF9F5 0%, #FFFFFF 100%);
}

/* ========================================
   Hero Section
   ======================================== */
.popular-hero {
    position: relative;
    background: var(--gradient-hero);
    padding: 80px 20px;
    overflow: hidden;
    border-radius: 0 0 40px 40px;
    margin-bottom: 40px;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 24px;
    border-radius: 50px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px var(--shadow-light);
    animation: float 3s ease-in-out infinite;
}

.badge-icon {
    font-size: 20px;
}

.badge-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-weight: 400;
}

.hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    background: linear-gradient(135deg, #FF6B9D 0%, #C44569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(0, 0, 0, 0.1);
}

/* Floating Decorations */
.hero-decoration {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.3;
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 100px;
    height: 100px;
    background: var(--lotus-pink);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 60px;
    height: 60px;
    background: var(--peacock-teal);
    top: 60%;
    right: 15%;
    animation-delay: 1s;
}

.shape-3 {
    width: 80px;
    height: 80px;
    background: var(--saffron-gold);
    bottom: 20%;
    left: 20%;
    animation-delay: 2s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* ========================================
   Filter Section
   ======================================== */
.filter-section {
    padding: 40px 20px;
    background: var(--white);
    border-radius: 24px;
    margin: 0 20px 40px;
    box-shadow: 0 4px 20px var(--shadow-light);
}

.filter-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-group {
    flex: 1;
    min-width: 280px;
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.label-icon {
    font-size: 20px;
}

.filter-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-btn {
    flex: 1;
    min-width: 120px;
    padding: 14px 24px;
    background: var(--white);
    border: 2px solid #E0E0E0;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    .filter-btn:hover {
        border-color: #FFB6C1;
        background: #FFF5F7;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px var(--shadow-light);
    }

    .filter-btn.active {
        background: var(--gradient-button);
        border-color: transparent;
        color: var(--white);
        box-shadow: 0 4px 16px rgba(255, 182, 193, 0.4);
    }

.btn-icon {
    font-size: 18px;
}

/* ========================================
   Names Section
   ======================================== */
.names-section {
    padding: 0 20px 60px;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.title-icon {
    font-size: 40px;
}

.section-description {
    font-size: 18px;
    color: var(--text-secondary);
}

.section-page-info {
    font-size: 14px;
    color: var(--text-light);
    margin-top: 8px;
    font-weight: 500;
}

/* Names Grid */
.names-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ========================================
   Name Cards
   ======================================== */
.name-card {
    position: relative;
    background: var(--white);
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 4px 20px var(--shadow-light);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

    .name-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 6px;
        background: var(--gradient-card-girl);
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .name-card.girl::before {
        background: var(--gradient-card-girl);
    }

    .name-card.boy::before {
        background: var(--gradient-card-boy);
    }

    .name-card.unisex::before {
        background: linear-gradient(135deg, #E8F5E9 0%, #E6D5E8 100%);
    }

    /* Support both "Boy"/"Girl" (capitalized) and "boy"/"girl" (lowercase) */
    .name-card.Boy::before {
        background: var(--gradient-card-boy);
    }

    .name-card.Girl::before {
        background: var(--gradient-card-girl);
    }

    .name-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 12px 40px var(--shadow-medium);
    }

        .name-card:hover::before {
            opacity: 1;
        }

    /* Top 10 Special Styling */
    .name-card.top-10 {
        background: linear-gradient(135deg, #FFF9F5 0%, #FFFFFF 100%);
        border: 2px solid var(--saffron-gold);
    }

    .name-card.top-25 {
        border: 1px solid var(--lotus-pink);
    }

/* Rank Badge */
.rank-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 2;
}

.medal {
    font-size: 36px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.rank-number {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Trend Badge */
.trend-badge {
    display: inline-block;
    background: rgba(255, 182, 193, 0.2);
    color: #C44569;
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 182, 193, 0.4);
}

/* Name Content */
.name-content {
    position: relative;
    z-index: 1;
}

.name-header {
    margin-bottom: 16px;
}

.name-sinhala {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.3;
}

.name-english {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 500;
}

.name-pronunciation {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-light);
    font-style: italic;
    margin-top: 4px;
}

.pronunciation-icon {
    font-size: 14px;
}

.name-meaning {
    display: flex;
    align-items: start;
    gap: 10px;
    background: linear-gradient(135deg, #FFF9F5 0%, #FFF5F7 100%);
    padding: 14px;
    border-radius: 14px;
    margin-bottom: 16px;
    border-left: 3px solid var(--saffron-gold);
}

.meaning-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.name-meaning p {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Meta Tags */
.name-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.meta-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--white);
    border: 1px solid #E0E0E0;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.tag-icon {
    font-size: 14px;
}

.category-tag {
    background: linear-gradient(135deg, #FFF9F5 0%, #FFFFFF 100%);
    border-color: var(--peach-blossom);
}

.origin-tag {
    background: linear-gradient(135deg, #E6D5E8 0%, #FFFFFF 100%);
    border-color: var(--soft-lavender);
}

.nakshatra-tag {
    background: linear-gradient(135deg, #E3F2FD 0%, #FFFFFF 100%);
    border-color: var(--baby-blue);
}

.rashi-tag {
    background: linear-gradient(135deg, #E8F5E9 0%, #FFFFFF 100%);
    border-color: var(--mint-cream);
}

/* Stats */
.name-stats {
    display: flex;
    gap: 20px;
    padding: 16px 0;
    border-top: 1px solid #F0F0F0;
    border-bottom: 1px solid #F0F0F0;
    margin-bottom: 16px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.stat-icon {
    font-size: 16px;
}

.stat-value {
    font-weight: 700;
    color: var(--text-primary);
}

.stat-text {
    color: var(--text-light);
}

/* Action Buttons */
.name-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
}

    .action-btn.primary {
        background: var(--gradient-button);
        color: var(--white);
        box-shadow: 0 4px 12px rgba(255, 182, 193, 0.3);
    }

        .action-btn.primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(255, 182, 193, 0.4);
        }

    .action-btn.secondary {
        background: var(--white);
        color: var(--text-secondary);
        border: 2px solid #E0E0E0;
    }

        .action-btn.secondary:hover {
            border-color: #FFB6C1;
            background: #FFF5F7;
            color: #C44569;
        }

/* ========================================
   CTA Section
   ======================================== */
.cta-section {
    background: var(--gradient-hero);
    padding: 80px 20px;
    margin: 60px 20px 0;
    border-radius: 32px;
    text-align: center;
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
}

.cta-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.cta-description {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-btn {
    padding: 16px 32px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

    .cta-btn.primary {
        background: var(--white);
        color: #C44569;
        box-shadow: 0 4px 16px var(--shadow-light);
    }

        .cta-btn.primary:hover {
            transform: translateY(-4px);
            box-shadow: 0 8px 24px var(--shadow-medium);
        }

    .cta-btn.secondary {
        background: rgba(255, 255, 255, 0.2);
        color: var(--text-primary);
        border: 2px solid rgba(255, 255, 255, 0.6);
    }

        .cta-btn.secondary:hover {
            background: rgba(255, 255, 255, 0.3);
            border-color: var(--white);
        }

/* No Results */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
}

.no-results-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.no-results h3 {
    font-size: 24px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.no-results p {
    font-size: 16px;
    color: var(--text-secondary);
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
    .popular-hero {
        padding: 60px 20px;
    }

    .hero-title {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .hero-stats {
        gap: 20px;
    }

    .stat-number {
        font-size: 24px;
    }

    .stat-divider {
        display: none;
    }

    .filter-container {
        flex-direction: column;
        gap: 24px;
    }

    .filter-buttons {
        flex-direction: column;
    }

    .filter-btn {
        min-width: 100%;
    }

    .names-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .section-title {
        font-size: 28px;
    }

    .cta-title {
        font-size: 28px;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .cta-btn {
        width: 100%;
        justify-content: center;
    }

    .pagination-wrapper {
        margin: 40px 0 20px;
    }

    .pagination-modern {
        gap: 6px;
    }

    .page-link {
        padding: 10px 14px;
        font-size: 13px;
        min-width: 42px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }

    .name-sinhala {
        font-size: 24px;
    }

    .rank-badge {
        top: 16px;
        right: 16px;
    }

    .medal {
        font-size: 28px;
    }

    .rank-number {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .page-link {
        padding: 8px 12px;
        font-size: 12px;
        min-width: 38px;
        gap: 6px;
    }

        .page-link i {
            font-size: 10px;
        }
}
/* =============================================
   FAVORITE FUNCTIONALITY STYLES FOR POPULAR PAGE
   Add these to your popular.css file
   ============================================= */

/* Favorite Toggle Button State */
.action-btn.favorite-toggle {
    transition: all 0.3s ease;
}

    .action-btn.favorite-toggle.favorited {
        background: linear-gradient(135deg, #ff6b9d 0%, #c94b7d 100%);
        color: white;
        border-color: #ff6b9d;
    }

        .action-btn.favorite-toggle.favorited:hover {
            background: linear-gradient(135deg, #ff5a8f 0%, #b83b6d 100%);
            transform: translateY(-2px);
        }

    .action-btn.favorite-toggle .btn-icon {
        transition: transform 0.3s ease;
    }

    .action-btn.favorite-toggle.favorited .btn-icon {
        animation: heartBeat 0.5s ease;
    }

@keyframes heartBeat {
    0%, 100% {
        transform: scale(1);
    }

    25% {
        transform: scale(0.9);
    }

    50% {
        transform: scale(1.2);
    }

    75% {
        transform: scale(1.1);
    }
}

/* Notification Toast Styles */
.notification-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 10000;
    max-width: 400px;
    border-left: 4px solid #3B82F6;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.3s ease;
}

    .notification-toast.show {
        transform: translateX(0);
        opacity: 1;
    }

.notification-success {
    border-left-color: #10B981;
}

.notification-error {
    border-left-color: #EF4444;
}

.notification-info {
    border-left-color: #3B82F6;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
}

.notification-success .notification-icon {
    background: #10B981;
    color: white;
}

.notification-error .notification-icon {
    background: #EF4444;
    color: white;
}

.notification-info .notification-icon {
    background: #3B82F6;
    color: white;
}

.notification-message {
    color: #1F2937;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 500;
}

/* Mobile responsive notifications */
@media (max-width: 640px) {
    .notification-toast {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        padding: 12px 16px;
    }

    .notification-icon {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }

    .notification-message {
        font-size: 13px;
    }
}

/* Disabled button state */
.action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Pulse animation for favorited button */
.action-btn.favorite-toggle.favorited {
    animation: favoritePulse 2s ease-in-out infinite;
}

@keyframes favoritePulse {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(255, 107, 157, 0.3);
    }

    50% {
        box-shadow: 0 4px 16px rgba(255, 107, 157, 0.5);
    }
}

/* Accessibility */
.action-btn:focus {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
}

    .action-btn:focus:not(:focus-visible) {
        outline: none;
    }

/* =========================================
   FAVORITE BUTTON STYLING
   Add this to your random.css file
   ========================================= */

/* Favorite Section Container */
.favorite-section {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}

/* Favorite Button */
.favorite-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #E8EAF6;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    color: #5E35B1;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(94, 53, 177, 0.1);
    position: relative;
    overflow: hidden;
}

    .favorite-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(94, 53, 177, 0.2);
        border-color: #5E35B1;
    }

    .favorite-btn:active {
        transform: translateY(0);
    }

    .favorite-btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

    .favorite-btn .btn-icon {
        font-size: 20px;
        transition: transform 0.3s ease;
    }

    .favorite-btn:hover .btn-icon {
        transform: scale(1.2);
    }

    /* Favorited State */
    .favorite-btn.favorited {
        background: linear-gradient(135deg, #FF6B9D 0%, #C2185B 100%);
        border-color: #C2185B;
        color: white;
        animation: heartBeat 0.5s ease;
    }

        .favorite-btn.favorited:hover {
            box-shadow: 0 4px 16px rgba(194, 24, 91, 0.3);
        }

/* Heart Beat Animation */
@keyframes heartBeat {
    0%, 100% {
        transform: scale(1);
    }

    10%, 30% {
        transform: scale(0.9);
    }

    20%, 40% {
        transform: scale(1.1);
    }
}

/* Ripple Effect on Click */
.favorite-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.favorite-btn:active::before {
    width: 300px;
    height: 300px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .favorite-section {
        top: 10px;
        right: 10px;
    }

    .favorite-btn {
        padding: 10px 18px;
        font-size: 14px;
        gap: 6px;
    }

        .favorite-btn .btn-icon {
            font-size: 18px;
        }
}

@media (max-width: 480px) {
    .favorite-btn {
        padding: 8px 16px;
        font-size: 13px;
    }

        /* Show only icon on very small screens */
        .favorite-btn .btn-text {
            display: none;
        }

    .favorite-btn {
        width: 44px;
        height: 44px;
        padding: 0;
        justify-content: center;
    }
}

/* =========================================
   NOTIFICATION TOAST SYSTEM
   Add this to your random.css file
   ========================================= */

/* Notification Toast Container */
.notification-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 320px;
    max-width: 400px;
    padding: 16px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transform: translateX(450px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    border-left: 4px solid #2196F3;
}

    /* Show State */
    .notification-toast.show {
        transform: translateX(0);
        opacity: 1;
    }

/* Notification Content */
.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
}

.notification-message {
    flex: 1;
    font-size: 15px;
    line-height: 1.5;
    color: #333;
    font-weight: 500;
}

/* Success Notification */
.notification-success {
    border-left-color: #4CAF50;
}

    .notification-success .notification-icon {
        background: #E8F5E9;
        color: #4CAF50;
    }

/* Error Notification */
.notification-error {
    border-left-color: #F44336;
}

    .notification-error .notification-icon {
        background: #FFEBEE;
        color: #F44336;
    }

/* Info Notification */
.notification-info {
    border-left-color: #2196F3;
}

    .notification-info .notification-icon {
        background: #E3F2FD;
        color: #2196F3;
    }

/* Progress Bar (Optional Enhancement) */
.notification-toast::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: currentColor;
    opacity: 0.3;
    animation: notificationProgress 3s linear;
}

@keyframes notificationProgress {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .notification-toast {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
    }
}

/* =========================================
   NAME CARD ADJUSTMENTS FOR FAVORITE BUTTON
   Ensure the name card has proper padding for the favorite button
   ========================================= */

.name-card {
    position: relative;
    padding-top: 70px; /* Make room for favorite button */
}

    /* Alternative: If you want favorite button inside the card */
    .name-card.has-favorite {
        padding-right: 20px;
    }

/* =========================================
   LOADING STATE FOR FAVORITE BUTTON
   Optional: Show loading state while processing
   ========================================= */

.favorite-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

    .favorite-btn.loading .btn-icon {
        animation: spin 1s linear infinite;
    }

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* =========================================
   ADDITIONAL ANIMATIONS
   Optional: Enhanced interactions
   ========================================= */

/* Pulse effect when favorited */
@keyframes favoritePulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(194, 24, 91, 0.3);
    }

    50% {
        box-shadow: 0 4px 20px rgba(194, 24, 91, 0.5);
    }
}

.favorite-btn.favorited.just-added {
    animation: favoritePulse 1s ease-in-out 1;
}

/* Shake effect on error */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }

    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

.favorite-btn.error {
    animation: shake 0.5s ease;
}

/* =========================================
   DARK MODE SUPPORT (Optional)
   If your app supports dark mode
   ========================================= */

@media (prefers-color-scheme: dark) {
    .favorite-btn {
        background: rgba(30, 30, 30, 0.95);
        border-color: #424242;
        color: #BB86FC;
    }

        .favorite-btn:hover {
            border-color: #BB86FC;
        }

    .notification-toast {
        background: #1E1E1E;
        border-left-color: #BB86FC;
    }

    .notification-message {
        color: #E0E0E0;
    }
}

/* =========================================
   ACCESSIBILITY IMPROVEMENTS
   ========================================= */

/* Focus states for keyboard navigation */
.favorite-btn:focus {
    outline: 2px solid #5E35B1;
    outline-offset: 2px;
}

    .favorite-btn:focus:not(:focus-visible) {
        outline: none;
    }

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .favorite-btn,
    .notification-toast,
    .favorite-btn .btn-icon {
        animation: none !important;
        transition: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .favorite-btn {
        border-width: 3px;
    }

        .favorite-btn.favorited {
            background: #C2185B;
            border-color: #000;
        }
}

/* =========================================
   TOOLTIP (Optional Enhancement)
   Show tooltip on hover
   ========================================= */

.favorite-btn[title]::before {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    font-size: 13px;
    white-space: nowrap;
    border-radius: 6px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.favorite-btn[title]::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-2px);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.favorite-btn:hover[title]::before,
.favorite-btn:hover[title]::after {
    opacity: 1;
}

/* =========================================
   USAGE NOTES
   ========================================= */

/*
IMPLEMENTATION CHECKLIST:

1. Add this CSS to your /wwwroot/css/random.css file

2. Ensure your HTML has these elements:
   - Favorite button with class "favorite-btn"
   - Icon span with class "btn-icon"
   - Optional text node for button text
   - Favorite section container with class "favorite-section"

3. JavaScript requirements:
   - toggleFavorite() function
   - showNotification() function
   - Proper class toggling on success/error

4. Testing:
   - Test favorite button click
   - Test notification appearance
   - Test on mobile devices
   - Test keyboard navigation (Tab key)
   - Test with screen readers

5. Optional enhancements:
   - Add loading state during API call
   - Add success animation
   - Add sound effects (subtle click/success sounds)
   - Add haptic feedback on mobile

BROWSER SUPPORT:
- Chrome 90+
- Firefox 88+
- Safari 14+
- Edge 90+
- Mobile browsers (iOS Safari 14+, Chrome Mobile)

PERFORMANCE NOTES:
- All animations use CSS transforms for 60fps
- No JavaScript animation loops
- Hardware-accelerated where possible
- Minimal repaints/reflows

ACCESSIBILITY NOTES:
- Fully keyboard navigable
- Screen reader friendly (aria-labels in HTML)
- High contrast mode supported
- Reduced motion respected
- Proper focus indicators
*/