/* Dashboard Styles */

/* Dashboard Header */
.dashboard-header {
    margin-top: 80px;
    padding: 2rem 0;
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    position: relative;
    min-height: 30vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.dashboard-welcome {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3rem;
    align-items: center;
}

.welcome-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.user-name {
    color: #dc2626;
    text-shadow: 0 0 15px rgba(220, 38, 38, 0.4);
}

.welcome-content p {
    font-size: 1.2rem;
    color: #b0b0b0;
    margin: 0;
}

.user-avatar {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.avatar-circle {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.2), rgba(220, 38, 38, 0.05));
    border: 2px solid rgba(220, 38, 38, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dc2626;
}

.avatar-circle svg {
    width: 40px;
    height: 40px;
}

.user-info h3 {
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
}

.membership-type {
    color: #dc2626;
    font-weight: 600;
    font-size: 0.9rem;
    margin: 0 0 0.25rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.member-since {
    color: #a1a1aa;
    font-size: 0.8rem;
    margin: 0;
}

/* Dashboard Stats */
.dashboard-stats {
    padding: 4rem 0;
    background: #0a0a0a;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.stat-card {
    background: linear-gradient(135deg, #1a1a1a, #0f0f0f);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    backdrop-filter: blur(10px);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(220, 38, 38, 0.05) 0%, 
        rgba(220, 38, 38, 0.02) 50%, 
        rgba(220, 38, 38, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 8px 24px rgba(220, 38, 38, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-color: rgba(220, 38, 38, 0.3);
}

.stat-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.15), rgba(220, 38, 38, 0.08));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: #dc2626;
    border: 1px solid rgba(220, 38, 38, 0.2);
    position: relative;
    flex-shrink: 0;
}

.stat-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

.stat-icon svg {
    width: 32px;
    height: 32px;
    position: relative;
    z-index: 1;
}

.stat-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.stat-number {
    font-size: 2.75rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 0.5rem 0;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.stat-label {
    color: #d4d4d8;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    line-height: 1.2;
}

.stat-change {
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: auto;
    text-align: center;
    letter-spacing: 0.02em;
    backdrop-filter: blur(10px);
    border: 1px solid transparent;
}

.stat-change.positive {
    color: #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.08));
    border-color: rgba(16, 185, 129, 0.2);
}

.stat-change.negative {
    color: #f87171;
    background: linear-gradient(135deg, rgba(248, 113, 113, 0.15), rgba(248, 113, 113, 0.08));
    border-color: rgba(248, 113, 113, 0.2);
}

.stat-change.neutral {
    color: #e4e4e7;
    background: linear-gradient(135deg, rgba(228, 228, 231, 0.15), rgba(228, 228, 231, 0.08));
    border-color: rgba(228, 228, 231, 0.2);
}

/* Dashboard Main Content */
.dashboard-main {
    padding: 4rem 0;
    background: #0a0a0a;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.dashboard-card {
    background: linear-gradient(135deg, #111111, #0f0f0f);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: fit-content;
    display: flex;
    flex-direction: column;
}

.dashboard-card.full-width {
    grid-column: 1 / -1;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.card-header h3 {
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
}

.card-header h3 {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.view-all-btn {
    background: transparent;
    color: #dc2626;
    border: 1px solid rgba(220, 38, 38, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-all-btn:hover {
    background: rgba(220, 38, 38, 0.1);
    border-color: #dc2626;
}

/* Program Info */
.program-info {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    flex: 1;
}

.program-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.program-title h4 {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.program-progress {
    color: #dc2626;
    font-size: 0.9rem;
    font-weight: 600;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #dc2626, #b91c1c);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.next-workout h5 {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.next-workout p {
    color: #a1a1aa;
    margin: 0 0 1rem 0;
}

.workout-exercises {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.exercise {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Video List */
.video-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.video-item {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    min-height: 80px;
}

.video-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.video-thumbnail {
    position: relative;
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
}

.video-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.video-placeholder svg {
    width: 24px;
    height: 24px;
}

.video-duration {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    font-size: 0.7rem;
    padding: 2px 4px;
    border-radius: 3px;
}

.video-info {
    flex: 1;
}

.video-info h5 {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
}

.video-info p {
    color: #a1a1aa;
    font-size: 0.875rem;
    margin: 0 0 0.5rem 0;
}

.analysis-score {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.score {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.score.excellent {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.score.good {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.score.poor {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.video-action {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
    border: 1px solid rgba(220, 38, 38, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.video-action:hover {
    background: rgba(220, 38, 38, 0.2);
    border-color: #dc2626;
}

.upload-new {
    text-align: center;
    margin-top: 1rem;
}

.upload-new .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.upload-new .btn svg {
    width: 20px;
    height: 20px;
}

/* Chart Container */
.chart-container {
    height: 300px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-style: italic;
}

.chart-controls {
    display: flex;
    gap: 0.5rem;
}

.chart-btn {
    background: transparent;
    color: #a1a1aa;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chart-btn.active,
.chart-btn:hover {
    background: rgba(220, 38, 38, 0.1);
    border-color: #dc2626;
    color: #dc2626;
}

/* Quick Actions */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.5rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #e0e0e0;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 100px;
    text-align: center;
}

.quick-action:hover {
    background: rgba(220, 38, 38, 0.05);
    border-color: rgba(220, 38, 38, 0.3);
    color: #dc2626;
    transform: translateY(-3px);
}

.quick-action svg {
    width: 32px;
    height: 32px;
    color: #dc2626;
}

/* Achievements */
.achievements-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.achievement-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    min-height: 70px;
}

.achievement-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

.achievement-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.achievement-icon.gold {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.1));
    color: #fbbf24;
}

.achievement-icon.silver {
    background: linear-gradient(135deg, rgba(156, 163, 175, 0.2), rgba(107, 114, 128, 0.1));
    color: #9ca3af;
}

.achievement-icon.bronze {
    background: linear-gradient(135deg, rgba(194, 120, 74, 0.2), rgba(168, 85, 45, 0.1));
    color: #c2784a;
}

.achievement-icon svg {
    width: 24px;
    height: 24px;
}

.achievement-info h5 {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
}

.achievement-info p {
    color: #a1a1aa;
    font-size: 0.9rem;
    margin: 0 0 0.25rem 0;
}

.achievement-date {
    color: #71717a;
    font-size: 0.8rem;
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        max-width: 800px;
    }
    
    .stat-card {
        padding: 2.25rem 2rem;
        min-height: 190px;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .dashboard-card.full-width {
        grid-column: 1;
    }
}

@media screen and (max-width: 768px) {
    .dashboard-header {
        min-height: 25vh;
        padding: 1.5rem 0;
    }
    
    .dashboard-welcome {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .welcome-content h1 {
        font-size: 2rem;
    }
    
    .user-avatar {
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .stat-card {
        padding: 2rem 1.5rem;
        min-height: 180px;
    }
    
    .stat-number {
        font-size: 2.25rem;
    }
    
    .stat-label {
        font-size: 1rem;
    }
    
    .stat-icon {
        width: 56px;
        height: 56px;
        margin-bottom: 1.25rem;
    }
    
    .stat-icon svg {
        width: 28px;
        height: 28px;
    }
    
    .dashboard-card {
        padding: 1.5rem;
    }
    
    .card-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .quick-actions-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .quick-action {
        min-height: 80px;
        padding: 1rem;
    }
    
    .video-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .video-info {
        order: 1;
    }
    
    .video-action {
        order: 2;
        width: 100%;
    }
}

@media screen and (max-width: 480px) {
    .welcome-content h1 {
        font-size: 1.75rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .stat-card {
        padding: 2rem 1.5rem;
        min-height: 160px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.95rem;
    }
    
    .stat-icon {
        width: 52px;
        height: 52px;
        margin-bottom: 1rem;
    }
    
    .stat-icon svg {
        width: 26px;
        height: 26px;
    }
    
    .dashboard-card {
        padding: 1rem;
    }
    
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
}
