/* Enhanced Dashboard Styles */

/* Hero Welcome Section */
.hero-welcome-section {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0 60px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
}

.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    animation: float-particles 20s ease-in-out infinite;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.welcome-text {
    display: block;
    font-size: 1.5rem;
    font-weight: 400;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.username-text {
    background: linear-gradient(45deg, #fff, #f0f8ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 600px;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.hero-stat-item {
    text-align: center;
}

.hero-stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
}

.hero-stat-label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-illustration {
    position: relative;
    z-index: 2;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-elements {
    position: relative;
    width: 200px;
    height: 200px;
}

.floating-icon {
    position: absolute;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: float 3s ease-in-out infinite;
    animation-delay: var(--delay);
}

.floating-icon:nth-child(1) { top: 20px; left: 20px; }
.floating-icon:nth-child(2) { top: 20px; right: 20px; }
.floating-icon:nth-child(3) { bottom: 20px; left: 20px; }
.floating-icon:nth-child(4) { bottom: 20px; right: 20px; }

/* Enhanced Stats Cards */
.enhanced-stats-card {
    position: relative;
    background: #fff;
    border-radius: 20px;
    padding: 0;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
    height: 200px;
}

.enhanced-stats-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.stats-card-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.stats-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
}

.calories-gradient {
    background: linear-gradient(135deg, #ff6b6b, #ffa500);
}

.bmi-gradient {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
}

.activities-gradient {
    background: linear-gradient(135deg, #45b7d1, #96c93d);
}

.friends-gradient {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.stats-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23000000' fill-opacity='0.1'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.stats-content {
    position: relative;
    z-index: 2;
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.stats-icon {
    width: 50px;
    height: 50px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.calories-card .stats-icon {
    background: linear-gradient(135deg, #ff6b6b, #ffa500);
}

.bmi-card .stats-icon {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
}

.activities-card .stats-icon {
    background: linear-gradient(135deg, #45b7d1, #96c93d);
}

.friends-card .stats-icon {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.stats-trend {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
}

.stats-trend.up {
    background: rgba(76, 175, 80, 0.1);
    color: #4caf50;
}

.stats-trend.down {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
}

.stats-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stats-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.stats-progress {
    background: rgba(0, 0, 0, 0.05);
    height: 4px;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar-custom {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.stats-badge {
    margin-bottom: 0.5rem;
}

.stats-secondary {
    margin-bottom: 0.5rem;
}

.calories-burned {
    font-size: 0.8rem;
    color: #ff6b6b;
    font-weight: 600;
}

.pending-requests {
    font-size: 0.8rem;
    color: #f093fb;
    font-weight: 600;
}

.stats-footer {
    margin-top: auto;
}

.stats-footer small {
    color: #999;
    font-size: 0.75rem;
}

.stats-badge-notification {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

/* Quick Actions Section */
.quick-actions-section {
    margin-bottom: 3rem;
}

.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.section-title i {
    color: #667eea;
}

.section-subtitle {
    color: #666;
    font-size: 1rem;
    margin: 0;
}

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

.quick-action-btn {
    position: relative;
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quick-action-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: inherit;
}

.quick-action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.quick-action-btn:hover::before {
    opacity: 1;
}

.action-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.meal-action .action-icon {
    background: linear-gradient(135deg, #ff6b6b, #ffa500);
}

.activity-action .action-icon {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
}

.bmi-action .action-icon {
    background: linear-gradient(135deg, #45b7d1, #96c93d);
}

.post-action .action-icon {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.action-content {
    flex: 1;
}

.action-content h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    color: #333;
}

.action-content p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

.action-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.action-arrow {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.quick-action-btn:hover .action-arrow {
    background: #667eea;
    color: white;
    transform: translateX(5px);
}

/* Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes float-particles {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .welcome-text {
        font-size: 1.2rem;
    }
    
    .hero-stats {
        gap: 1rem;
    }
    
    .hero-stat-number {
        font-size: 1.5rem;
    }
    
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-action-btn {
        padding: 1.5rem;
    }
    
    .enhanced-stats-card {
        height: auto;
        min-height: 180px;
    }
}

@media (max-width: 576px) {
    .hero-welcome-section {
        padding: 60px 0 40px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .stats-content {
        padding: 1rem;
    }
    
    .stats-number {
        font-size: 2rem;
    }
}

/* Date Grouping Styles */
.date-section {
    margin-bottom: 2rem;
}

.date-header {
    position: relative;
    margin-bottom: 1rem;
}

.date-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin: 0;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    border-left: 4px solid #667eea;
    display: flex;
    align-items: center;
}

.date-title i {
    color: #667eea;
}

.date-count {
    font-size: 0.9rem;
    color: #666;
    font-weight: 400;
    margin-left: auto;
}

/* Dark Mode Support */
[data-theme="dark"] .enhanced-stats-card {
    background: #2d3748;
    color: #e2e8f0;
}

[data-theme="dark"] .date-title {
    background: linear-gradient(135deg, #2d3748, #4a5568);
    color: #e2e8f0;
    border-left-color: #667eea;
}

[data-theme="dark"] .date-count {
    color: #a0aec0;
}

[data-theme="dark"] .stats-number {
    color: #e2e8f0;
}

[data-theme="dark"] .stats-label {
    color: #a0aec0;
}

[data-theme="dark"] .quick-action-btn {
    background: #2d3748;
    border-color: #4a5568;
}

[data-theme="dark"] .action-content h4 {
    color: #e2e8f0;
}

[data-theme="dark"] .action-content p {
    color: #a0aec0;
}

[data-theme="dark"] .section-title {
    color: #e2e8f0;
}

[data-theme="dark"] .section-subtitle {
    color: #a0aec0;
}

/* Meal Card Enhancements */
.meal-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    overflow: hidden;
}

.meal-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.meal-card .card-header {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.meal-card .card-header strong,
.meal-card .card-header small {
    color: #2c3e50 !important;
    font-weight: 600;
}

.meal-card .card-header .text-end strong {
    color: #27ae60 !important;
    font-weight: 700;
}

.meal-card .card-header .text-end small {
    color: #7f8c8d !important;
}

/* Goal Card Enhancements */
.goal-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    overflow: hidden;
}

.goal-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .date-section {
        margin-bottom: 1.5rem;
    }
    
    .date-title {
        font-size: 1rem;
        padding: 0.5rem 0.75rem;
    }
    
    .meal-card,
    .goal-card {
        margin-bottom: 1rem;
    }
    
    .mobile-card-actions {
        display: flex;
        gap: 0.5rem;
        margin-top: 1rem;
    }
    
    .mobile-card-actions .btn {
        flex: 1;
        font-size: 0.8rem;
        padding: 0.5rem;
    }
}

/* Dark Mode for Cards */
[data-theme="dark"] .meal-card,
[data-theme="dark"] .goal-card {
    background: #2d3748;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .meal-card .card-header {
    background: linear-gradient(135deg, #2d3748, #4a5568);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .meal-card .card-header strong,
[data-theme="dark"] .meal-card .card-header small {
    color: #e2e8f0 !important;
}

[data-theme="dark"] .meal-card .card-header .text-end strong {
    color: #68d391 !important;
}

[data-theme="dark"] .meal-card .card-header .text-end small {
    color: #a0aec0 !important;
}

/* BMI Card Enhancements */
.bmi-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    overflow: hidden;
}

.bmi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.bmi-card .card-header {
    background: linear-gradient(135deg, #cce7ff, #80bfff);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

/* BMI Category Colors */
.text-warning { color: #ffc107 !important; }
.text-success { color: #28a745 !important; }
.text-danger { color: #dc3545 !important; }
.text-info { color: #17a2b8 !important; }

/* Dark Mode for BMI Cards */
[data-theme="dark"] .bmi-card {
    background: #2d3748;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .bmi-card .card-header {
    background: linear-gradient(135deg, #2d3748, #4a5568);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}
