/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

/* App Container */
.app-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.05);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

/* Header */
.header {
    padding: 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.day-selector {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.day-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.day-btn.active {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.day-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Workout Overview */
.workout-overview {
    margin-bottom: 10px;
}

.overview-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 20px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.overview-card h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
}

.workout-stats {
    display: flex;
    justify-content: space-around;
    gap: 20px;
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #4ecdc4;
}

.stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Timer Section */
.timer-section {
    text-align: center;
    margin-bottom: 20px;
}

.timer-display {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.timer-circle {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
    transform: translateZ(0); /* Force hardware acceleration */
    will-change: transform; /* Optimize for animations */
}

.timer-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.timer-background {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 8;
}

.timer-progress {
    fill: none;
    stroke: #4ecdc4;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.3s ease;
    transform: translateZ(0); /* Force hardware acceleration */
    will-change: stroke-dashoffset; /* Optimize for stroke animation */
}

.timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
}

.timer-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.control-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.control-btn.primary {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.control-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Current Exercise */
.current-exercise {
    margin-bottom: 20px;
}

.exercise-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 20px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.exercise-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #4ecdc4;
}

.exercise-card p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
    line-height: 1.5;
}

.biohack-tip {
    background: rgba(78, 205, 196, 0.1);
    border-radius: 15px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 4px solid #4ecdc4;
}

.tip-icon {
    font-size: 20px;
}

.biohack-tip span:last-child {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
}

/* Progress Section */
.progress-section {
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

/* Phases Section */
.phases-section {
    margin-bottom: 20px;
}

.phase-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 4px;
    margin-bottom: 15px;
}

.phase-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.phase-tab.active {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    color: white;
}

.phase-content {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-height: 300px;
    overflow-y: auto;
    transform: translateZ(0); /* Force hardware acceleration */
    will-change: scroll-position; /* Optimize for scrolling */
}

.exercise-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.exercise-item:last-child {
    border-bottom: none;
}

.exercise-item.completed {
    opacity: 0.6;
}

.exercise-item.current {
    background: rgba(78, 205, 196, 0.1);
    border-radius: 10px;
    padding: 12px;
    margin: 0 -12px;
    border-left: 4px solid #4ecdc4;
    animation: pulse 2s infinite;
}

.exercise-item.current .exercise-icon {
    background: rgba(78, 205, 196, 0.4);
    animation: pulse 1s infinite;
}

.exercise-icon {
    width: 40px;
    height: 40px;
    background: rgba(78, 205, 196, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.exercise-details {
    flex: 1;
}

.exercise-details h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.exercise-details p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.exercise-time {
    font-size: 12px;
    color: #4ecdc4;
    font-weight: 600;
}

.exercise-video-link {
    margin-left: auto;
}

.video-btn {
    background: rgba(78, 205, 196, 0.2);
    border: 1px solid rgba(78, 205, 196, 0.5);
    color: #4ecdc4;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.video-btn:hover {
    background: rgba(78, 205, 196, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(78, 205, 196, 0.3);
}

/* Video Notification */
.video-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    animation: slideInRight 0.3s ease;
}

/* Visual Notification */
.visual-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    animation: fadeInOut 2s ease;
}

.notification-content {
    background: rgba(78, 205, 196, 0.9);
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    font-size: 14px;
    font-weight: 500;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    20% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    80% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
}



/* Responsive Design */
@media (max-width: 480px) {
    .app-container {
        max-width: 100%;
    }
    
    .header {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 20px;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .timer-circle {
        width: 150px;
        height: 150px;
    }
    
    .timer-text {
        font-size: 24px;
    }
    
    .control-btn {
        padding: 10px 20px;
        font-size: 14px;
        min-width: 80px;
    }
    
    .workout-stats {
        gap: 15px;
    }
    
    .stat-value {
        font-size: 20px;
    }
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.timer-circle.active {
    animation: pulse 2s infinite;
    transform: translateZ(0); /* Force hardware acceleration */
}

/* Scrollbar Styling */
.phase-content::-webkit-scrollbar {
    width: 6px;
}

.phase-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.phase-content::-webkit-scrollbar-thumb {
    background: rgba(78, 205, 196, 0.5);
    border-radius: 3px;
}

.phase-content::-webkit-scrollbar-thumb:hover {
    background: rgba(78, 205, 196, 0.7);
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Success States */
.success {
    background: linear-gradient(45deg, #4ecdc4, #44a08d) !important;
}

/* Error States */
.error {
    background: linear-gradient(45deg, #ff6b6b, #ee5a52) !important;
} 