/* ========================================
   AGE CALCULATOR - ENHANCED VERSION
   Full Enhancement Suite
   ======================================== */

/* Import base redesign styles */
@import url('age-calculator-redesign.css');

/* ========================================
   ENHANCEMENT 1: ANIMATED PARTICLES
   ======================================== */

.particle-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.particle-star {
    width: 3px;
    height: 3px;
    background: rgba(139, 92, 246, 0.6);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.8);
    animation: float-star 15s infinite ease-in-out;
}

.particle-orb {
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.15) 0%, transparent 70%);
    animation: float-orb 25s infinite ease-in-out;
}

@keyframes float-star {

    0%,
    100% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 0.8;
    }

    100% {
        transform: translateY(-100vh) translateX(100px) scale(0.5);
        opacity: 0;
    }
}

@keyframes float-orb {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }

    50% {
        transform: translate(50px, -50px) scale(1.2);
        opacity: 0.5;
    }
}

/* ========================================
   ENHANCEMENT 2: BIRTHDAY COUNTDOWN
   ======================================== */

.birthday-countdown {
    background: linear-gradient(135deg, #f43f5e 0%, #fb923c 100%);
    border-radius: 1.5rem;
    padding: 2rem;
    margin: 2rem auto;
    max-width: 600px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(244, 63, 94, 0.3);
}

.birthday-countdown h3 {
    font-size: 1.5rem;
    margin: 0 0 1.5rem 0;
    color: #ffffff;
}

.countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.countdown-item {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 1rem;
    padding: 1rem;
    backdrop-filter: blur(10px);
}

.countdown-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.countdown-label {
    display: block;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Birthday Today Special */
.birthday-today {
    animation: celebrate 2s infinite;
}

@keyframes celebrate {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* ========================================
   ENHANCEMENT 3: FUN FACTS SECTION
   ======================================== */

.fun-facts-section {
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.fun-facts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.fun-fact-card {
    background: var(--dark-card);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid rgba(139, 92, 246, 0.2);
    transition: all 0.3s ease;
    text-align: center;
}

.fun-fact-card:hover {
    transform: translateY(-5px);
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.2);
}

.fun-fact-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.fun-fact-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fun-fact-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ========================================
   ENHANCEMENT 4: AGE STATISTICS
   ======================================== */

.age-statistics-section {
    padding: 3rem 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.stat-item {
    background: var(--dark-card);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

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

.stat-label {
    font-size: 1rem;
    color: var(--text-secondary);
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--accent-gold);
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin: 0.75rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6 0%, #ec4899 100%);
    border-radius: 10px;
    transition: width 1.5s ease-out;
    animation: shimmer 2s infinite;
}

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

    100% {
        background-position: 200% 0;
    }
}

.stat-note {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* ========================================
   ENHANCEMENT 5: LIFE STAGE INDICATOR
   ======================================== */

.life-stage-section {
    padding: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.life-stage-card {
    background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    border-radius: 1.5rem;
    padding: 2rem;
    text-align: center;
    color: #ffffff;
}

.life-stage-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.life-stage-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.life-stage-description {
    font-size: 1rem;
    opacity: 0.9;
    line-height: 1.6;
}

.generation-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    margin-top: 1rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

/* ========================================
   ENHANCEMENT 6: SHAREABLE CARD
   ======================================== */

.share-section {
    padding: 2rem;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.share-card-preview {
    background: var(--dark-card);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 2px dashed rgba(139, 92, 246, 0.3);
}

.share-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.share-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.share-btn-download {
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    color: #ffffff;
}

.share-btn-twitter {
    background: #1DA1F2;
    color: #ffffff;
}

.share-btn-facebook {
    background: #4267B2;
    color: #ffffff;
}

.share-btn-whatsapp {
    background: #25D366;
    color: #ffffff;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* ========================================
   ENHANCEMENT 7: SOCIAL PROOF
   ======================================== */

.social-proof {
    text-align: center;
    padding: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.user-counter {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.user-counter-label {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.star-rating {
    font-size: 1.5rem;
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
}

.rating-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ========================================
   ENHANCEMENT 8: CONFETTI ANIMATION
   ======================================== */

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

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #f43f5e;
    animation: confetti-fall 3s linear forwards;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ========================================
   ENHANCEMENT 9: PREMIUM TEASER
   ======================================== */

.premium-teaser {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border-radius: 1rem;
    padding: 1.5rem;
    margin: 2rem auto;
    max-width: 600px;
    text-align: center;
    color: #1a1a2e;
}

.premium-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.premium-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.premium-description {
    font-size: 0.95rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.premium-btn {
    background: #1a1a2e;
    color: #ffffff;
    padding: 0.75rem 2rem;
    border-radius: 0.75rem;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.premium-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* ========================================
   ENHANCED ANIMATIONS
   ======================================== */

.glow-effect {
    position: relative;
}

.glow-effect::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #8b5cf6, #ec4899, #f43f5e, #fb923c);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    filter: blur(10px);
}

.glow-effect:hover::before {
    opacity: 0.7;
}

/* Pulse animation for important elements */
@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

.pulse-animation {
    animation: pulse 2s infinite;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .countdown-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .fun-facts-grid {
        grid-template-columns: 1fr;
    }

    .share-buttons {
        flex-direction: column;
    }

    .share-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .countdown-value {
        font-size: 2rem;
    }

    .countdown-label {
        font-size: 0.75rem;
    }

    .user-counter {
        font-size: 2rem;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* ========================================
   ENHANCEMENT 10: BIORHYTHMS
   ======================================== */

.biorhythm-section {
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    display: none; /* Hidden initially */
}

.biorhythm-section.show {
    display: block;
}

.biorhythm-card {
    background: var(--dark-card);
    border-radius: 1.5rem;
    padding: 2rem;
    border: 1px solid rgba(139, 92, 246, 0.2);
    margin-bottom: 2rem;
}

.bio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.bio-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    padding: 1.5rem;
}

.bio-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.bio-label {
    font-weight: 700;
    color: var(--text-primary);
}

.bio-value {
    font-weight: 700;
}

.bio-high { color: #22c55e; }
.bio-low { color: #ef4444; }
.bio-critical { color: #fbbf24; }

.bio-bar-container {
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.bio-bar {
    height: 100%;
    border-radius: 5px;
    transition: width 1s ease-out;
}

.bio-bar.physical { background: #22c55e; }
.bio-bar.emotional { background: #ef4444; }
.bio-bar.intellectual { background: #3b82f6; }

.bio-status {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    text-align: right;
    color: var(--text-secondary);
}

.bio-advice {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-style: italic;
    color: var(--text-primary);
}

/* ========================================
   ENHANCEMENT 11: MILESTONES
   ======================================== */

.milestones-section {
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    display: none;
}

.milestones-section.show {
    display: block;
}

.milestone-timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.milestone-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(139, 92, 246, 0.3);
    transform: translateX(-50%);
}

.milestone-card {
    background: var(--dark-card);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    width: calc(50% - 2rem);
    border: 1px solid rgba(139, 92, 246, 0.2);
    clear: both;
}

.milestone-card:nth-child(odd) {
    float: left;
    margin-right: auto; 
    /* Fix alignment: odd items on left */
}

.milestone-card:nth-child(even) {
    float: right;
    margin-left: auto;
    /* Fix alignment: even items on right */
}

/* Clearfix for timeline */
.milestone-timeline::after {
    content: "";
    display: table;
    clear: both;
}

.milestone-title {
    font-weight: 700;
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
}

.milestone-date {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.milestone-days {
    font-size: 0.85rem;
    color: var(--accent-purple);
    font-weight: 600;
}

@media (max-width: 768px) {
    .milestone-timeline::before {
        left: 20px;
    }
    
    .milestone-card {
        width: calc(100% - 50px);
        margin-left: 50px !important;
        float: none !important;
    }
}
/* Share Card Styles */
.share-card-template {
    width: 600px;
    height: 900px;
    /* Portrait Ratio for Stories */
    background: linear-gradient(135deg, #FFDEE9 0%, #B5FFFC 100%);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-family: 'Inter', sans-serif;
    color: #1e293b;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

/* Background overlay pattern */
.share-card-template::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(#4f46e5 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.05;
    pointer-events: none;
}

.share-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 1rem;
}

.share-card-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: #4f46e5;
}

.share-card-site {
    font-size: 1rem;
    color: #64748b;
    font-weight: 500;
}

.share-card-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3rem;
}

.share-age-group {
    text-align: center;
}

.share-age-value {
    font-size: 8rem;
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(135deg, #4f46e5 0%, #9333ea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 0px rgba(0, 0, 0, 0.1));
}

.share-age-label {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: #475569;
    margin-top: 1rem;
}

.share-details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    width: 100%;
}

.share-detail-item {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 16px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.share-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.share-detail-item span:nth-child(2) {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1e293b;
}

.share-detail-item label {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.share-card-footer {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 16px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.share-trait {
    font-size: 1.4rem;
    font-weight: 600;
    font-style: italic;
    color: #334155;
}/* ========================================
   MONETIZATION: ADSENSE STYLES
   ======================================== */

/* General Ad Container */
.ad-container {
    width: 100%;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Placeholder Styling (Visual Guide for User) */
.ad-placeholder {
    width: 100%;
    height: 100px;
    /* Standard Banner Height */
    background: rgba(255, 255, 255, 0.4);
    border: 1px dashed rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #64748b;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    backdrop-filter: blur(5px);
}

.ad-label {
    background: rgba(255, 255, 255, 0.8);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Sticky Footer Ad */
.ad-sticky-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 10px 0;
    z-index: 9999;
    display: flex;
    justify-content: center;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
    animation: slideUp 0.5s ease-out 2s backwards;
    /* Delay appearance */
}

.ad-placeholder-footer {
    width: 728px;
    max-width: 95%;
    height: 90px;
    background: #f1f5f9;
    border: 1px dashed #cbd5e1;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #94a3b8;
    border-radius: 8px;
}

.ad-close-btn {
    position: absolute;
    top: -15px;
    right: 10px;
    background: #ef4444;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Adjust main body to not be covered by footer ad */
.age-calculator-page {
    padding-bottom: 120px;
}