/* style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

* {
    box-sizing: border-box;
}

html, body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    height: 100%;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
    overscroll-behavior: none;
}

#root {
    height: 100vh;
    overflow: auto;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 2px;
}

::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.5);
}

/* Glassmorphism effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-dark {
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Gradient animations */
@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.gradient-animate {
    background: linear-gradient(-45deg, #6366f1, #8b5cf6, #ec4899, #f59e0b);
    background-size: 400% 400%;
    animation: gradient-shift 6s ease infinite;
}

/* Pulse animation for active elements */
@keyframes pulse-glow {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 20px rgba(99, 102, 241, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
    }
}

.pulse-active {
    animation: pulse-glow 2s infinite;
}

/* Floating animation */
@keymmas float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* Progress bullets */
.progress-bullets {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.progress-bullets::-webkit-scrollbar {
    display: none;
}

.progress-bullet {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-bullet.active {
    transform: scale(1.5);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3);
}

.progress-bullet.completed {
    transform: scale(1.2);
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Button press animation */
.btn-press {
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-press:active {
    transform: scale(0.95);
}

/* Drag handle */
.drag-handle {
    cursor: grab;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.drag-handle:hover {
    opacity: 1;
}

.drag-handle:active {
    cursor: grabbing;
}

/* Toast notifications */
.toast-enter {
    opacity: 0;
    transform: translateX(-50%) translateY(100px);
}

.toast-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast-exit {
    opacity: 0;
    transform: translateX(-50%) translateY(-100px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark mode support */
.dark {
    color-scheme: dark;
}

/* Responsive font sizes */
.timer-display {
    font-size: clamp(4rem, 12vw, 8rem);
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: -0.05em;
}

/* Neumorphism shadows */
.neomorphism {
    box-shadow:
        20px 20px 60px rgba(0, 0, 0, 0.1),
        -20px -20px 60px rgba(255, 255, 255, 0.1);
}

/* Loading spinner */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.spin {
    animation: spin 1s linear infinite;
}

/* View transitions */
.view-transition {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Custom range input */
.range-slider {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.range-track {
    height: 6px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
    margin-top: -19px;
    position: relative;
    z-index: 1;
}

.range-slider::-webkit-slider-track {
    background: transparent;
    height: 6px;
    border-radius: 3px;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #6366f1;
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.range-slider::-moz-range-track {
    background: transparent;
    height: 6px;
    border-radius: 3px;
    border: none;
}

.range-slider::-moz-range-thumb {
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #6366f1;
    cursor: pointer;
    border: none;
    position: relative;
    z-index: 2;
}

/* Navigation */
.nav-button {
    transition: all 0.3s ease;
}

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

/* Exercise list */
.exercise-item {
    transition: all 0.3s ease;
}

.exercise-item:hover {
    background-color: rgba(99, 102, 241, 0.1);
}

/* Workout player controls */
.player-control {
    transition: all 0.2s ease;
}

.player-control:active {
    transform: scale(0.9);
}

/* Blog styles */
.blog-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.blog-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    color: #374151;
}

.blog-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: #4b5563;
}

.blog-content ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.blog-content li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

/* Truncate text */
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Description button */
#descriptionButton {
    display: block;
    margin: 0 auto;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    background-color: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

#descriptionButton:hover {
    background-color: rgba(99, 102, 241, 0.2);
    transform: translateY(-1px);
}

/* Ensure the phase display container is properly centered */
#phaseDisplay {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* description modal */
.bg-white\/80 {
    background-color: rgba(255, 255, 255, 0.8);
}

.backdrop-blur-sm {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.hover\:bg-gray-200\/50:hover {
    background-color: rgba(209, 213, 219, 0.5);
}

/* Next exercise preview */
.next-exercise-preview {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin: 10px auto;
    color: #374151;
    display: inline-block;
}

/* Stats progress bars */
.progress-bar {
    height: 8px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Milestone badges */
.milestone-badge {
    background: linear-gradient(135deg, #fcd34d, #f59e0b);
    color: white;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* Lock screen state */
.screen-locked button:not(#lockButton) {
    opacity: 0.5;
    pointer-events: none;
}