/* AliveFor Directory Custom Styles */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    
    /* Life progress colors */
    --life-color-low: #28a745;    /* Green - early life */
    --life-color-medium: #ffc107; /* Yellow - middle life */
    --life-color-high: #dc3545;   /* Red - later life */
    
    --sand-timer-color: #d4a574;
    --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
}

/* Navigation */
.navbar-brand .brand-text {
    font-weight: 600;
    font-size: 1.25rem;
}

.navbar {
    backdrop-filter: blur(10px);
    background-color: rgba(248, 249, 250, 0.95) !important;
}

/* User Cards */
.user-card {
    transition: all 0.3s ease;
    border: none;
    border-radius: 12px;
    overflow: hidden;
}

.user-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

.user-header {
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* Life Progress Bars */
.life-progress-bar {
    height: 8px;
    border-radius: 4px;
    background-color: #e9ecef;
    overflow: hidden;
}

.life-progress-large-bar {
    height: 12px;
    border-radius: 6px;
    background-color: #e9ecef;
    overflow: hidden;
}

.progress-bar {
    transition: width 1s ease-in-out;
}

/* Countdown Displays */
.countdown-display {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    padding: 1rem;
    margin: 0.5rem 0;
}

.countdown-grid {
    display: flex;
    justify-content: space-around;
    gap: 0.5rem;
}

.countdown-item {
    text-align: center;
    flex: 1;
}

.countdown-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.countdown-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.25rem;
}

/* Large Countdown for User Profile */
.countdown-large {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.countdown-large-item {
    text-align: center;
    padding: 1rem;
    background: rgba(0, 123, 255, 0.05);
    border-radius: 8px;
    border: 2px solid rgba(0, 123, 255, 0.1);
    transition: all 0.3s ease;
}

.countdown-large-item:hover {
    transform: scale(1.05);
    background: rgba(0, 123, 255, 0.1);
}

.countdown-large-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.countdown-large-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--secondary-color);
    font-weight: 500;
}

/* User Profile Card */
.user-profile-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
}

.user-stats {
    margin: 1.5rem 0;
}

.stat-item {
    padding: 0 1rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
}

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

/* Life Progress Colors */
.life-percentage {
    font-weight: 600;
}

/* Hourglass Icons */
.fas.fa-hourglass-half,
.fas.fa-hourglass-empty {
    color: var(--sand-timer-color);
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

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

/* Real-time Update Indicator */
#update-indicator {
    animation: pulse 1s infinite;
    border-radius: 20px;
    padding: 8px 12px;
    font-size: 0.8rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .countdown-large-number {
        font-size: 2rem;
    }
    
    .countdown-number {
        font-size: 1.25rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .countdown-grid {
        gap: 0.25rem;
    }
    
    .user-stats {
        gap: 2rem !important;
    }
}

@media (max-width: 576px) {
    .countdown-large {
        padding: 1rem;
    }
    
    .countdown-large-item {
        padding: 0.75rem 0.5rem;
    }
    
    .countdown-large-number {
        font-size: 1.75rem;
    }
    
    .countdown-large-label {
        font-size: 0.8rem;
    }
}

/* Button Styles */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

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

/* Card Hover Effects */
.card {
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Footer */
footer {
    background: rgba(248, 249, 250, 0.95) !important;
    backdrop-filter: blur(10px);
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Search Page Styles */
.search-filters {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
}

/* About Page Styles */
.display-1, .display-4 {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    border-color: var(--primary-color);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid var(--dark-color);
    }
    
    .countdown-large-item {
        border: 3px solid var(--primary-color);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .countdown-number {
        animation: none;
    }
}

/* Print styles */
@media print {
    .navbar,
    footer,
    .btn,
    #update-indicator {
        display: none !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #000 !important;
    }
    
    .countdown-large {
        background: white !important;
    }
}
