@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 10px 0 rgba(249, 115, 22, 0.3);
    }

    50% {
        box-shadow: 0 0 25px 5px rgba(239, 68, 68, 0.6);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }
}

body {
    background-color: #111827;
    color: white;
    overflow-x: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
}

.glass-morphism {
    backdrop-filter: blur(10px);
    background: rgba(31, 41, 55, 0.3);
    border: 1px solid rgba(249, 115, 22, 0.3);
    box-shadow: 0 0 15px 0 rgba(249, 115, 22, 0.2);
}

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

.animate-pulse-glow {
    animation: pulse-glow 3s infinite;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(75, 85, 99, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(249, 115, 22, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(249, 115, 22, 0.7);
}

/* Button hover effects */
button:hover {
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

button:disabled:hover {
    transform: none;
}

/* Online-only feature styles */
.online-only.disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.online-only.disabled:hover {
    transform: none;
}

/* Input focus effects */
input:focus {
    outline: none;
    ring: 2px;
    ring-color: rgba(249, 115, 22, 0.5);
}

/* Smooth transitions */
* {
    transition: all 0.3s ease;
}

/* Mobile Drawer Styles */
#mobileDrawer .absolute:nth-child(1) {
    transition: all 0.3s ease;
}

#mobileDrawer .absolute:nth-child(2) {
    transition: transform 0.3s ease-in-out;
}

/* Ensure main content doesn't scroll when drawer is open */
.drawer-open {
    overflow: hidden;
}

/* Custom loading animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

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

/* Mobile-specific improvements */
@media (max-width: 768px) {
    /* iOS Safe Area Insets - for notches and home indicators */
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
    
    /* Ensure the app content doesn't get covered by the status bar */
    #app {
        padding-top: env(safe-area-inset-top);
    }
    
    /* Adjust fixed headers to account for safe area */
    header.fixed {
        padding-top: env(safe-area-inset-top);
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
    
    /* Improve touch targets */
    button, .touch-target {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Better spacing for mobile */
    .space-y-8 > :not([hidden]) ~ :not([hidden]) {
        margin-top: 2rem;
    }
    
    /* Ensure modals are mobile-friendly */
    #editExerciseModal .max-w-md {
        max-width: calc(100% - 2rem);
    }
    
    /* Prevent input zoom on iOS */
    input, select, textarea {
        font-size: 16px;
    }
    
    /* Better scrollable areas */
    .overflow-y-auto {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Enhanced card styling for mobile */
    .exercise-card {
        border-radius: 1rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
    
    .exercise-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
    }
}

/* Exercises list styling */
.exercises-list.collapsed {
    display: none;
}

.exercises-list.expanded {
    display: block;
}