/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Sora', sans-serif;
    background:
        radial-gradient(ellipse 70% 50% at 20% 10%, rgba(44, 167, 224, 0.25), transparent 55%),
        linear-gradient(160deg, #061526 0%, #0a2342 50%, #12375a 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.demo-back {
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 5000;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    color: #fff;
    background: rgba(6, 21, 38, 0.88);
    border: 1px solid rgba(94, 200, 245, 0.35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

#app {
    width: 100%;
    max-width: 400px;
    height: 100vh;
    max-height: 800px;
    background: #061526;
    border-radius: 32px;
    overflow: hidden;
    box-shadow:
        0 30px 70px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(94, 200, 245, 0.2);
    position: relative;
}

/* Mobile Frame */
.mobile-frame {
    width: 100%;
    height: 100%;
    background: #f4f8fb;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Status Bar */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: #000;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.status-icons {
    display: flex;
    gap: 5px;
}

.status-icons i {
    font-size: 12px;
}

/* App Header */
.app-header {
    background: linear-gradient(145deg, #0a2342 0%, #12375a 55%, #2ca7e0 140%);
    color: white;
    padding: 20px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatar {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.user-details h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.user-details p {
    font-size: 14px;
    opacity: 0.8;
}

.header-actions {
    position: relative;
}

.notification-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

/* Main Content */
.app-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
}

/* Stats Section */
.stats-section {
    margin-bottom: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    font-size: 18px;
    color: white;
}

.stat-card:nth-child(1) .stat-icon {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
}

.stat-card:nth-child(2) .stat-icon {
    background: linear-gradient(45deg, #ffa726, #ff9800);
}

.stat-card:nth-child(3) .stat-icon {
    background: linear-gradient(45deg, #66bb6a, #4caf50);
}

.stat-card:nth-child(4) .stat-icon {
    background: linear-gradient(45deg, #42a5f5, #2196f3);
}

.stat-info h3 {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
    font-weight: 500;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.stat-value span {
    font-size: 14px;
    color: #666;
    font-weight: 400;
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
}

.stat-trend.up {
    color: #4caf50;
}

.stat-trend.down {
    color: #f44336;
}

/* Quick Actions */
.quick-actions {
    margin-bottom: 30px;
}

.quick-actions h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.action-btn {
    background: white;
    border: none;
    border-radius: 15px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.action-btn i {
    font-size: 24px;
    color: #2ca7e0;
}

.action-btn span {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

/* Chart Section */
.chart-section {
    margin-bottom: 30px;
}

.chart-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.chart-container {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#healthChart {
    width: 100%;
    height: 100%;
}

/* Activities Section */
.activities-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.activities-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-item {
    background: white;
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.activity-item:hover {
    transform: translateY(-2px);
}

.activity-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.activity-item:nth-child(1) .activity-icon {
    background: linear-gradient(45deg, #66bb6a, #4caf50);
}

.activity-item:nth-child(2) .activity-icon {
    background: linear-gradient(45deg, #ffa726, #ff9800);
}

.activity-item:nth-child(3) .activity-icon {
    background: linear-gradient(45deg, #42a5f5, #2196f3);
}

.activity-info {
    flex: 1;
}

.activity-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.activity-info p {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.activity-time {
    font-size: 12px;
    color: #999;
}

.activity-calories {
    font-size: 14px;
    font-weight: 600;
    color: #4caf50;
}

/* Bottom Navigation */
.bottom-nav {
    display: flex;
    background: white;
    border-top: 1px solid #e0e0e0;
    padding: 10px 0;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: #666;
    padding: 10px;
    transition: color 0.3s ease;
}

.nav-item.active {
    color: #2ca7e0;
}

.nav-item i {
    font-size: 20px;
}

.nav-item span {
    font-size: 12px;
    font-weight: 500;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.close-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.close-btn:hover {
    background-color: #f0f0f0;
}

.modal-body {
    padding: 20px;
}

/* Workout Options */
.workout-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.workout-option {
    background: #f8f9fa;
    border: none;
    border-radius: 15px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.workout-option:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.workout-option i {
    font-size: 24px;
    color: #2ca7e0;
}

.workout-option span {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

/* Meal Options */
.meal-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.meal-option {
    background: #f8f9fa;
    border: none;
    border-radius: 15px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.meal-option:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.meal-option i {
    font-size: 24px;
    color: #ffa726;
}

.meal-option span {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

/* Water Tracker */
.water-tracker {
    text-align: center;
}

.water-goal h4 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.water-progress {
    width: 100%;
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.water-fill {
    height: 100%;
    background: linear-gradient(45deg, #42a5f5, #2196f3);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.water-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.water-btn {
    background: linear-gradient(45deg, #42a5f5, #2196f3);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
    font-weight: 600;
}

.water-btn:hover {
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    #app {
        max-height: 100vh;
        border-radius: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .actions-grid {
        grid-template-columns: 1fr;
    }
    
    .workout-options {
        grid-template-columns: 1fr;
    }
    
    .meal-options {
        grid-template-columns: 1fr;
    }
}
