@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

.age-calc-wrapper {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 2rem 0;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.gradient-text {
    background: linear-gradient(to right, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle-text {
    color: rgba(255, 255, 255, 0.9);
}

.badge-pill {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 30px;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
}

.main-card {
    background: white;
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.input-section {
    margin-bottom: 2rem;
}

.form-label-custom {
    font-weight: 700;
    color: #1a1a1a;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    display: block;
}

.form-control-custom {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    font-weight: 500;
}

.form-control-custom:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.helper-text {
    color: #6b7280;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

/* jQuery UI Datepicker Custom Styling */
.ui-datepicker {
    background: white !important;
    border: none !important;
    border-radius: 20px !important;
    padding: 1.5rem !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25) !important;
    font-family: 'Inter', sans-serif !important;
    z-index: 99999 !important;
    width: 350px !important;
    max-width: 95vw !important;
    position: absolute !important;
}

/* Fix for calendar positioning */
.ui-datepicker.ui-widget {
    z-index: 99999 !important;
}

.ui-datepicker-div {
    z-index: 99999 !important;
}

.ui-datepicker-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 1rem !important;
    margin-bottom: 1rem !important;
    position: relative !important;
    height: 60px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.ui-datepicker-title {
    color: white !important;
    font-weight: 700 !important;
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.75rem !important;
    flex: 1 !important;
    margin: 0 3rem !important;
}

.ui-datepicker-title select {
    background: rgba(255, 255, 255, 0.25) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    color: white !important;
    padding: 0.5rem 0.75rem !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    font-size: 0.9rem !important;
    outline: none !important;
    min-width: 80px !important;
    text-align: center !important;
}

.ui-datepicker-title select:focus {
    background: rgba(255, 255, 255, 0.35) !important;
    border-color: rgba(255, 255, 255, 0.6) !important;
}

.ui-datepicker-title select option {
    background: #764ba2 !important;
    color: white !important;
    padding: 0.25rem !important;
}

.ui-datepicker-prev,
.ui-datepicker-next {
    background: rgba(255, 255, 255, 0.2) !important;
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    width: 40px !important;
    height: 40px !important;
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
}

.ui-datepicker-prev {
    left: 10px !important;
}

.ui-datepicker-next {
    right: 10px !important;
}

.ui-datepicker-prev:hover,
.ui-datepicker-next:hover {
    background: rgba(255, 255, 255, 0.35) !important;
    transform: translateY(-50%) scale(1.1) !important;
}

.ui-datepicker-prev span,
.ui-datepicker-next span {
    display: none !important;
}

.ui-datepicker-prev::before {
    content: "‹" !important;
    color: white !important;
    font-size: 1.8rem !important;
    font-weight: bold !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.ui-datepicker-next::before {
    content: "›" !important;
    color: white !important;
    font-size: 1.8rem !important;
    font-weight: bold !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.ui-datepicker-calendar {
    width: 100% !important;
    margin-top: 0.5rem !important;
}

.ui-datepicker th {
    color: #667eea !important;
    font-weight: 700 !important;
    font-size: 0.875rem !important;
    padding: 0.75rem 0.25rem !important;
    text-align: center !important;
    border-bottom: 1px solid #e5e7eb !important;
}

.ui-datepicker td {
    padding: 3px !important;
    text-align: center !important;
}

.ui-datepicker td a,
.ui-datepicker td span {
    display: block !important;
    text-align: center !important;
    padding: 0.75rem 0.5rem !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    border: none !important;
    text-decoration: none !important;
    color: #1a1a1a !important;
    transition: all 0.2s ease !important;
    min-height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.ui-datepicker td a:hover {
    background: #f5f7ff !important;
    color: #667eea !important;
    transform: scale(1.1) !important;
}

.ui-datepicker td .ui-state-active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    transform: scale(1.05) !important;
}

.ui-datepicker td .ui-state-highlight {
    background: #fef3c7 !important;
    color: #1a1a1a !important;
    border: 2px solid #f59e0b !important;
}

.ui-datepicker td .ui-state-disabled {
    opacity: 0.3 !important;
    cursor: not-allowed !important;
}

.ui-datepicker-buttonpane {
    border-top: 1px solid #e5e7eb !important;
    padding-top: 0.75rem !important;
    margin-top: 0.75rem !important;
    display: flex !important;
    gap: 0.5rem !important;
    justify-content: center !important;
}

.ui-datepicker-buttonpane button {
    background: #667eea !important;
    color: white !important;
    border: none !important;
    padding: 0.5rem 1.5rem !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.ui-datepicker-buttonpane button:hover {
    background: #764ba2 !important;
    transform: translateY(-1px) !important;
}

.form-control-custom {
    cursor: pointer !important;
}

.btn-primary-custom {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 3rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(102, 126, 234, 0.4);
}

.btn-outline-custom {
    background: white;
    color: #667eea;
    border: 2px solid #e5e7eb;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-outline-custom:hover {
    border-color: #667eea;
    background: #f5f7ff;
}

.live-age-display {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    padding: 1.5rem;
    border-radius: 16px;
    text-align: center;
    margin: 2rem 0;
    color: white;
    position: relative;
    overflow: hidden;
}

.pulse-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }

    50% {
        transform: translate(-50%, -50%) scale(4);
        opacity: 0;
    }
}

.live-age-display h6 {
    margin: 0 0 0.5rem 0;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.live-counter {
    font-size: 1.5rem;
    font-weight: 800;
    position: relative;
    z-index: 1;
}

.results-section {
    margin-top: 2rem;
}

.main-age-display {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #f5f7ff 0%, #e8ecff 100%);
    border-radius: 16px;
    margin-bottom: 2rem;
}

.age-number {
    font-size: 5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.age-subtitle {
    font-size: 1.25rem;
    color: #6b7280;
    font-weight: 600;
    margin-top: 0.5rem;
}

.quick-stats {
    margin-bottom: 2rem;
}

.stat-card {
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: #e5e7eb;
}

.stat-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.bg-purple {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bg-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.bg-orange {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.bg-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 600;
}

.time-breakdown,
.zodiac-info,
.life-progress,
.birthday-countdown,
.fun-facts {
    margin-bottom: 2rem;
}

.section-title {
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e5e7eb;
}

.breakdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.breakdown-item {
    background: #f9fafb;
    padding: 1rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.breakdown-item i {
    font-size: 1.5rem;
}

.breakdown-item .label {
    font-size: 0.875rem;
    color: #6b7280;
    flex: 1;
}

.breakdown-item .value {
    font-weight: 700;
    font-size: 1.1rem;
    color: #1a1a1a;
}

.info-card {
    background: linear-gradient(135deg, #f5f7ff 0%, #e8ecff 100%);
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.info-icon {
    font-size: 2.5rem;
}

.info-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 600;
}

.info-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #667eea;
}

.progress-bar-custom {
    height: 50px;
    background: #e5e7eb;
    border-radius: 25px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 20px;
    color: white;
    font-weight: 700;
    transition: width 1s ease-in-out;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 600;
}

.countdown-display {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.countdown-item {
    background: linear-gradient(135deg, #f5f7ff 0%, #e8ecff 100%);
    padding: 1.5rem 1rem;
    border-radius: 12px;
    text-align: center;
}

.countdown-value {
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.countdown-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 600;
    margin-top: 0.25rem;
}

.next-age {
    text-align: center;
    font-size: 1.1rem;
    color: #1a1a1a;
    font-weight: 600;
}

.next-age span {
    color: #667eea;
    font-weight: 800;
}

.fun-facts {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 2rem;
    border-radius: 16px;
}

.fun-fact-card {
    background: white;
    padding: 1.25rem 1rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.fun-fact-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.fun-fact-card i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.fun-fact-card .fact-title {
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fun-fact-card .fact-value {
    font-size: 1.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
}

.fun-fact-card .fact-subtitle {
    font-size: 0.7rem;
    color: #6b7280;
    font-weight: 500;
}

@media (max-width: 768px) {
    .age-number {
        font-size: 3rem;
    }

    .countdown-display {
        grid-template-columns: repeat(2, 1fr);
    }

    .btn-primary-custom {
        width: 100%;
    }

    .btn-outline-custom {
        width: 100%;
        margin-top: 0.5rem;
    }
    
    .fun-fact-card {
        padding: 1rem 0.75rem;
    }
    
    .fun-fact-card i {
        font-size: 1.25rem;
        margin-bottom: 0.4rem;
    }
    
    .fun-fact-card .fact-title {
        font-size: 0.7rem;
        margin-bottom: 0.4rem;
    }
    
    .fun-fact-card .fact-value {
        font-size: 1.25rem;
        margin-bottom: 0.2rem;
    }
    
    .fun-fact-card .fact-subtitle {
        font-size: 0.65rem;
    }
}
/* Additional Calendar Fixes */
.ui-datepicker-header .ui-datepicker-title {
    position: relative !important;
    z-index: 1 !important;
}

.ui-datepicker-prev,
.ui-datepicker-next {
    z-index: 2 !important;
}

/* Ensure calendar appears above all other elements */
.ui-widget-overlay {
    z-index: 99998 !important;
}

/* Fix for mobile responsiveness */
@media (max-width: 480px) {
    .ui-datepicker {
        width: 300px !important;
        padding: 1rem !important;
    }
    
    .ui-datepicker-header {
        padding: 0.75rem !important;
        height: 50px !important;
    }
    
    .ui-datepicker-title {
        margin: 0 2.5rem !important;
        gap: 0.5rem !important;
    }
    
    .ui-datepicker-title select {
        padding: 0.4rem 0.6rem !important;
        font-size: 0.8rem !important;
        min-width: 70px !important;
    }
    
    .ui-datepicker-prev,
    .ui-datepicker-next {
        width: 35px !important;
        height: 35px !important;
    }
    
    .ui-datepicker-prev {
        left: 8px !important;
    }
    
    .ui-datepicker-next {
        right: 8px !important;
    }
    
    .ui-datepicker-prev::before,
    .ui-datepicker-next::before {
        font-size: 1.5rem !important;
    }
    
    .ui-datepicker td a,
    .ui-datepicker td span {
        padding: 0.6rem 0.4rem !important;
        min-height: 35px !important;
    }
}

/* Prevent calendar from being cut off */
.age-calc-wrapper {
    position: relative;
    overflow: visible;
}

.main-card {
    position: relative;
    overflow: visible;
}

.input-section {
    position: relative;
    overflow: visible;
}