/* General mobile improvements */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .display-5 {
        font-size: 1.8rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
}

/* Beautiful Header Styling */
header.pb-3.mb-4.border-bottom {
    background: var(--gradient-primary);
    border-radius: 15px;
    padding: 2rem !important;
    margin-bottom: 2rem !important;
    border: none !important;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

header.pb-3.mb-4.border-bottom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

header.pb-3.mb-4.border-bottom h1 {
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.5px;
}

header.pb-3.mb-4.border-bottom h1::before {
    content: '💪';
    display: inline-block;
    margin-right: 0.5rem;
    font-size: 0.9em;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Mobile header adjustments */
@media (max-width: 768px) {
    header.pb-3.mb-4.border-bottom {
        padding: 1.5rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    header.pb-3.mb-4.border-bottom h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 576px) {
    header.pb-3.mb-4.border-bottom {
        padding: 1rem !important;
        margin-bottom: 1rem !important;
    }
    
    header.pb-3.mb-4.border-bottom h1 {
        font-size: 1.5rem;
    }
    
    header.pb-3.mb-4.border-bottom h1::before {
        font-size: 0.8em;
    }
}

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

.exercise-item:hover {
    transform: translateX(5px);
}

/* Exercise details styling */
.exercise-details {
    color: var(--text-secondary);
    font-style: italic;
}

/* Set row styling */
.set-row {
    transition: all 0.3s ease;
    margin-bottom: 0.75rem;
}

.set-row.completed {
    background-color: var(--primary-10);
    padding: 8px;
    border-radius: 6px;
    border-left: 4px solid var(--primary);
}

/* Input styling for mobile */
.weight-input, .reps-input {
    width: 100px;
    min-height: 38px;
}

@media (max-width: 576px) {
    .weight-input, .reps-input {
        width: 80px;
        font-size: 14px;
    }
    
    .set-row {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .set-row .col-auto {
        margin-bottom: 0.25rem;
    }
}

/* Complete button styling */
.complete-set {
    width: 40px;
    height: 38px;
    border-radius: 6px;
    font-weight: bold;
    transition: all 0.2s ease;
}

.complete-set:hover {
    transform: scale(1.05);
}

@media (max-width: 576px) {
    .complete-set {
        width: 44px;
        height: 44px;
        font-size: 16px;
    }
}

/* Mobile-friendly button group */
@media (max-width: 576px) {
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        border-radius: 6px !important;
        margin-bottom: 0.5rem;
    }
    
    .btn-group .btn:last-child {
        margin-bottom: 0;
    }
}

/* Mobile-friendly exercise header */
@media (max-width: 576px) {
    .exercise-item .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.5rem;
    }
    
    .exercise-variant {
        width: 100% !important;
        max-width: 200px;
    }
}

/* Mobile-friendly personal records */
@media (max-width: 576px) {
    .personal-records {
        font-size: 12px;
        line-height: 1.4;
    }
    
    .personal-records div {
        margin-bottom: 0.25rem;
    }
}

/* Mobile-friendly soreness/exertion section */
@media (max-width: 576px) {
    .mt-3 .row {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .mt-3 .col-auto {
        width: 100%;
        text-align: left;
    }
    
    .mt-3 .form-select {
        width: 100%;
        max-width: 150px;
    }
}

/* Mobile-friendly action buttons */
@media (max-width: 576px) {
    .d-flex.justify-content-between {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch !important;
    }
    
    .d-flex.justify-content-between > div:last-child {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    
    .d-flex.justify-content-between .btn {
        margin: 0 !important;
        width: 100%;
    }
}

/* Action buttons styling - stack them vertically */
.d-flex.justify-content-between > div:last-child {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: stretch;
}

.d-flex.justify-content-between .btn {
    margin: 0 !important;
    width: 100%;
    min-width: 120px;
}

/* Adjust the header layout for better spacing */
.d-flex.justify-content-between {
    align-items: flex-start !important;
    gap: 1rem;
}

@media (min-width: 577px) {
    .d-flex.justify-content-between > div:last-child {
        min-width: 140px;
    }
}

/* Improved touch targets for mobile */
@media (max-width: 576px) {
    .btn {
        min-height: 44px;
        padding: 0.5rem 1rem;
    }
    
    .form-control, .form-select {
        min-height: 44px;
    }
}

/* Better spacing for mobile */
@media (max-width: 576px) {
    .mb-4 {
        margin-bottom: 1.5rem !important;
    }
    
    .mt-4 {
        margin-top: 1.5rem !important;
    }
    
    .mt-3 {
        margin-top: 1rem !important;
    }
    
    .mt-2 {
        margin-top: 0.75rem !important;
    }
}

/* Improved card shadows for mobile */
@media (max-width: 576px) {
    .card {
        box-shadow: var(--shadow-sm);
        border: 1px solid var(--border);
    }
    
    .exercise-item .card {
        box-shadow: var(--shadow-sm);
    }
}

/* Better text readability on mobile */
@media (max-width: 576px) {
    body {
        font-size: 14px;
        line-height: 1.5;
    }
    
    h4 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    h5 {
        font-size: 1rem;
    }
}

/* Improved form labels for mobile */
@media (max-width: 576px) {
    .col-form-label, .col-form-label-sm {
        font-size: 13px;
        font-weight: 500;
        margin-bottom: 0.25rem;
    }
}

/* Custom Button Styling to match main site */
.btn-primary {
    background: var(--gradient-secondary);
    border: none;
    color: var(--dark-slate-gray);
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--gradient-warm);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--dark-slate-gray);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.btn-primary:focus {
    background: var(--gradient-secondary);
    box-shadow: 0 0 0 3px var(--secondary-20);
    color: var(--dark-slate-gray);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.btn-outline-primary {
    border-color: var(--primary);
    color: var(--primary);
    background: transparent;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline-primary:focus {
    box-shadow: 0 0 0 3px var(--primary-20);
}

.btn-success {
    background: var(--gradient-cool);
    border: none;
    color: var(--dark-slate-gray);
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.btn-success:hover {
    background: var(--gradient-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.btn-success:focus {
    box-shadow: 0 0 0 3px var(--primary-20);
}

.btn-warning {
    background: var(--gradient-secondary);
    border: none;
    color: var(--dark-slate-gray);
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.btn-warning:hover {
    background: var(--gradient-warm);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--dark-slate-gray);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.btn-warning:focus {
    box-shadow: 0 0 0 3px var(--secondary-20);
}

.btn-info {
    background: var(--gradient-accent);
    border: none;
    color: var(--dark-slate-gray);
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.btn-info:hover {
    background: var(--gradient-soft);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--dark-slate-gray);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.btn-info:focus {
    box-shadow: 0 0 0 3px var(--accent-20);
}

.btn-outline-success {
    border-color: var(--primary);
    color: var(--primary);
    background: transparent;
    transition: all 0.3s ease;
}

.btn-outline-success:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline-success:focus {
    box-shadow: 0 0 0 3px var(--primary-20);
}

/* Card styling to match main site */
.card {
    border-radius: 10px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    background: var(--surface);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-body {
    color: var(--text-secondary);
}

.card-title {
    color: var(--text-primary);
}

/* Form styling to match main site */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem var(--primary-20);
}

/* Personal records styling */
.personal-records {
    color: var(--primary) !important;
}

/* Text colors */
.text-muted {
    color: var(--text-secondary) !important;
}

.text-success {
    color: var(--primary) !important;
}

/* Badge styling */
.badge.bg-primary {
    background: var(--primary) !important;
}

/* Next Exercise Button */
.next-exercise-btn {
    transition: all 0.3s ease;
    border-width: 2px;
    font-weight: 500;
}

.next-exercise-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
    background-color: #0d6efd;
    color: white;
}

.next-exercise-btn:active {
    transform: translateY(0);
}

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

.badge.bg-success {
    background: var(--primary) !important;
}

.badge.bg-info {
    background: var(--accent) !important;
}

.badge.bg-warning {
    background: var(--secondary) !important;
    color: var(--dark-slate-gray) !important;
}


