﻿/* =================================
   Random Name Generator Page Styles
   PiyumLanka - Attractive Option 2 Design
   ================================= */

/* Color Variables - Attractive First */
: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%, #FFE5B4 100%);
    --gradient-card: linear-gradient(135deg, #FFFFFF 0%, #F7D5E0 100%);
    --gradient-button: linear-gradient(135deg, #F4C2C2 0%, #FFB347 100%);
    /* Text */
    --text-primary: #2D3748;
    --text-secondary: #4A5568;
    --text-muted: #718096;
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.16);
}

/* Page Container */
.random-page {
    min-height: 100vh;
    background: linear-gradient(180deg, #FAFAFA 0%, #FFFFFF 100%);
    padding-bottom: 4rem;
}

/* Hero Section */
.random-hero {
    background: var(--gradient-hero);
    padding: 4rem 1.5rem 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom-left-radius: 2rem;
    border-bottom-right-radius: 2rem;
    box-shadow: var(--shadow-md);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 2s ease-in-out infinite;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8);
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.hero-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.float-icon {
    position: absolute;
    font-size: 2rem;
    opacity: 0.3;
    animation: float 6s ease-in-out infinite;
}

    .float-icon:nth-child(1) {
        top: 10%;
        left: 10%;
        animation-delay: 0s;
    }

    .float-icon:nth-child(2) {
        top: 20%;
        right: 15%;
        animation-delay: 2s;
    }

    .float-icon:nth-child(3) {
        bottom: 15%;
        left: 20%;
        animation-delay: 4s;
    }

/* Filter Section */
.filter-section {
    max-width: 1200px;
    margin: -2rem auto 3rem;
    padding: 0 1.5rem;
    position: relative;
    z-index: 10;
}

.filter-container {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

    .filter-group label {
        font-weight: 600;
        color: var(--text-primary);
        font-size: 0.95rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

.filter-icon {
    font-size: 1.25rem;
}

.filter-select {
    padding: 0.75rem 1rem;
    border: 2px solid #E2E8F0;
    border-radius: 0.75rem;
    font-size: 1rem;
    color: var(--text-primary);
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .filter-select:hover {
        border-color: var(--lotus-pink);
    }

    .filter-select:focus {
        outline: none;
        border-color: var(--saffron-gold);
        box-shadow: 0 0 0 3px rgba(255, 179, 71, 0.1);
    }

/* Name Display Section */
.name-display-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.name-card {
    position: relative;
    min-height: 500px;
    margin-bottom: 2rem;
}

.name-card-inner {
    background: white;
    border-radius: 2rem;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

    .name-card-inner::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 8px;
        background: var(--gradient-button);
    }

    .name-card-inner.animate-in {
        animation: slideInUp 0.6s ease-out;
    }

/* Name Header */
.name-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.gender-badge {
    padding: 0.5rem 1.25rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

    .gender-badge.boy {
        background: linear-gradient(135deg, #E3F2FD, #BBDEFB);
        color: #1565C0;
    }

    .gender-badge.girl {
        background: linear-gradient(135deg, #FCE4EC, #F8BBD0);
        color: #C2185B;
    }

    .gender-badge.unisex {
        background: linear-gradient(135deg, #F3E5F5, #E1BEE7);
        color: #7B1FA2;
    }

.favorite-btn {
    background: white;
    border: 2px solid #E2E8F0;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.5rem;
}

    .favorite-btn:hover {
        border-color: #FF6B9D;
        transform: scale(1.1);
    }

    .favorite-btn.favorited {
        background: linear-gradient(135deg, #FF6B9D, #FEC5BB);
        border-color: #FF6B9D;
    }

        .favorite-btn.favorited .heart-icon {
            color: white;
        }

    .favorite-btn.pulse {
        animation: pulse 0.6s ease-out;
    }

.heart-icon {
    color: #FF6B9D;
    transition: all 0.3s ease;
}

/* Name Main Content */
.name-main {
    text-align: center;
    padding: 2rem 0;
    border-bottom: 2px solid #F7FAFC;
}

.name-sinhala {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.name-english {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.pronunciation {
    font-size: 1rem;
    color: var(--text-muted);
    font-style: italic;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.pronunciation-label {
    font-size: 1.25rem;
}

/* Name Meaning */
.name-meaning {
    padding: 2rem 0;
    border-bottom: 2px solid #F7FAFC;
}

.meaning-label {
    font-size: 1rem;
    font-weight: 700;
    color: var(--saffron-gold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.meaning-english {
    font-size: 1.15rem;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.meaning-sinhala {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Name Meta Tags */
.name-meta {
    padding: 1.5rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.meta-tag {
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.category-tag {
    background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
    color: #2E7D32;
}

.theme-tag {
    background: linear-gradient(135deg, #FFF3E0, #FFE0B2);
    color: #E65100;
}

.origin-tag {
    background: linear-gradient(135deg, #E3F2FD, #BBDEFB);
    color: #1565C0;
}

/* Name Actions */
.name-actions {
    padding-top: 1.5rem;
    text-align: center;
}

.action-btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    background: var(--gradient-button);
    color: white;
    text-decoration: none;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

    .action-btn:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    z-index: 100;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #F3F4F6;
    border-top-color: var(--saffron-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.75rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.empty-state p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.empty-state.error .empty-icon {
    animation: shake 0.5s ease-in-out;
}

.retry-btn {
    padding: 0.875rem 2rem;
    background: var(--gradient-button);
    color: white;
    border: none;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .retry-btn:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

/* Generate Button */
.generate-button-container {
    text-align: center;
    margin: 2rem 0;
}

.generate-btn {
    padding: 1.25rem 3rem;
    background: var(--gradient-button);
    color: white;
    border: none;
    border-radius: 3rem;
    font-weight: 700;
    font-size: 1.25rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

    .generate-btn::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        background: rgba(255, 255, 255, 0.3);
        border-radius: 50%;
        transform: translate(-50%, -50%);
        transition: width 0.6s, height 0.6s;
    }

    .generate-btn:hover::before {
        width: 300px;
        height: 300px;
    }

    .generate-btn:hover {
        transform: translateY(-3px) scale(1.05);
        box-shadow: 0 12px 32px rgba(255, 179, 71, 0.4);
    }

    .generate-btn:active {
        transform: translateY(-1px) scale(1.02);
    }

    .generate-btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
    }

.btn-icon, .btn-sparkle {
    font-size: 1.5rem;
    position: relative;
    z-index: 1;
}

.btn-text {
    position: relative;
    z-index: 1;
}

.btn-sparkle {
    animation: sparkle 1.5s ease-in-out infinite;
}

.generate-hint {
    margin-top: 1rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Fun Facts Section */
.fun-facts {
    max-width: 1200px;
    margin: 4rem auto 3rem;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.fact-card {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: all 0.3s ease;
    border-top: 4px solid transparent;
}

    .fact-card:nth-child(1) {
        border-top-color: var(--soft-lavender);
    }

    .fact-card:nth-child(2) {
        border-top-color: var(--lotus-pink);
    }

    .fact-card:nth-child(3) {
        border-top-color: var(--saffron-gold);
    }

    .fact-card:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-lg);
    }

.fact-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.fact-card h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.fact-card p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* CTA Section */
.cta-section {
    background: var(--gradient-hero);
    padding: 4rem 1.5rem;
    margin-top: 4rem;
    border-top-left-radius: 2rem;
    border-top-right-radius: 2rem;
    position: relative;
    z-index: 1;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

    .cta-content h2 {
        font-size: 2rem;
        color: var(--text-primary);
        margin-bottom: 0.75rem;
    }

    .cta-content > p {
        font-size: 1.15rem;
        color: var(--text-secondary);
        margin-bottom: 2rem;
    }

.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    position: relative;
    z-index: 10;
}

.cta-btn {
    padding: 1rem 2rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    display: inline-block;
    cursor: pointer;
    position: relative;
    z-index: 10;
}

    .cta-btn.primary {
        background: white;
        color: var(--saffron-gold);
    }

        .cta-btn.primary:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
            background: #FFFBF5;
        }

    .cta-btn.secondary {
        background: rgba(255, 255, 255, 0.3);
        color: var(--text-primary);
        border: 2px solid white;
    }

        .cta-btn.secondary:hover {
            background: white;
            transform: translateY(-2px);
            box-shadow: var(--shadow-sm);
        }

/* Animations */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-10px);
    }

    75% {
        transform: translateX(10px);
    }
}

@keyframes sparkle {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .filter-container {
        padding: 1.5rem;
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .name-card-inner {
        padding: 2rem 1.5rem;
    }

    .name-sinhala {
        font-size: 2.25rem;
    }

    .name-english {
        font-size: 1.5rem;
    }

    .generate-btn {
        padding: 1rem 2rem;
        font-size: 1.1rem;
    }

    .fun-facts {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .cta-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .random-hero {
        padding: 3rem 1rem 2rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .name-sinhala {
        font-size: 2rem;
    }

    .name-english {
        font-size: 1.25rem;
    }

    .generate-btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}
