:root {
    --toast-bg: rgba(31, 41, 55, 0.8);
}

* {
    -webkit-tap-highlight-color: transparent;
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.check-animation {
    animation: checkMark 0.3s ease-out;
}

@keyframes checkMark {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.slide-up {
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
    }

    50% {
        box-shadow: 0 0 40px rgba(59, 130, 246, 0.8);
    }
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1f2937;
}

::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

.custom-checkbox {
    width: 24px;
    height: 24px;
    position: relative;
    appearance: none;
    background: #374151;
    border: 2px solid #4b5563;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.custom-checkbox:checked {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-color: #3b82f6;
}

.custom-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 16px;
    font-weight: bold;
}

@media (max-width: 640px) {
    .mobile-full {
        min-height: calc(100vh - 80px);
    }
}

input[type="number"] {
    -moz-appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.glass {
    background: rgba(31, 41, 55, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.toast-success {
    --toast-bg: rgba(22, 163, 74, 0.8);
}

.toast-error {
    --toast-bg: rgba(220, 38, 38, 0.8);
}

.toast-warning {
    --toast-bg: rgba(217, 119, 6, 0.8);
}

#toast {
    background-color: var(--toast-bg);
}

/* Estilos para Arrastar e Soltar */
.dragging {
    opacity: 0.5;
    background: #4b5563;
}

.drag-handle {
    cursor: grab;
    touch-action: none;
}

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

.workout-details-wrapper {
    transition: max-height 0.3s ease-out, opacity 0.2s ease-out, margin-top 0.3s ease-out;
    max-height: 2000px;
    overflow: hidden;
    opacity: 1;
}

#workoutsConfig.config-dragging-active .workout-card .workout-details-wrapper {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

#workoutsConfig.config-dragging-active .workout-card .workout-header {
    margin-bottom: 0 !important;
}

/* Loading Spinner Animation */
.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Bounce Animation for Loading Screen */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.bounce {
    animation: bounce 1s infinite;
}

/* Workouts List Collapse */
.workouts-list-collapsed {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.workouts-list-expanded {
    max-height: 3000px;
    transition: max-height 0.5s ease-in;
}

#workoutsListIcon.rotated {
    transform: rotate(180deg);
}

/* Bounce-in animation for rest timer */
@keyframes bounceIn {
    0% {
        transform: scale(0) translateY(100%);
        opacity: 0;
    }
    50% {
        transform: scale(1.1) translateY(0);
        opacity: 1;
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.animate-bounce-in {
    animation: bounceIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
