/* General mobile optimizations */
@media (max-width: 600px) {
  .container, .card, .card-header, .card-content, .card-footer {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
  .page-header h1 {
    font-size: 1.5rem;
  }
  .hero h1 {
    font-size: 2rem;
  }
  .hero p, .features, .feature-grid, .card-content, .card-header {
    font-size: 1rem;
  }
  .tabs-list {
    flex-direction: column;
    gap: 0.5rem;
  }
  .tab-trigger {
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .stat-card {
    padding: 1rem;
  }
  .activity-calendar {
    gap: 2px;
  }
  .calendar-day {
    width: 22px;
    height: 22px;
    font-size: 0.65rem;
  }
  .routine-card, .exercise-card {
    margin-bottom: 1rem;
  }
  .modal-content, .player-modal-content {
    padding: 0.5rem !important;
    max-width: 98vw !important;
  }
  .player-gif, .exercise-gif {
    max-width: 100vw !important;
    max-height: 150px !important;
  }
  .form-actions {
    flex-direction: column;
    gap: 0.5rem;
    align-items: stretch;
  }
  .btn, .btn-primary, .btn-outline, .btn-danger {
    width: 100%;
    font-size: 1rem;
    padding: 0.75rem 0;
  }
  .login-card {
    padding: 10px !important;
    min-width: 0;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
}
/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: white;
}

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: white;
}

.btn-danger {
    background-color: var(--error);
    color: white;
}

.btn-danger:hover {
    background-color: #c62828;
    color: white;
}

.btn-icon {
    padding: 0.5rem;
    border-radius: 50%;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

/* Cards */
.card {
    background-color: var(--background);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.card-content {
    padding: 1.5rem;
}

.card-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Hero section */
.hero {
    padding: 4rem 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* Features section */
.features {
    padding: 4rem 0;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Icons */
.icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-right: 0.5rem;
}

.icon-dumbbell {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2320b2aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.5 6.5h11'/%3E%3Cpath d='M6.5 17.5h11'/%3E%3Cpath d='M6 12h12'/%3E%3Cpath d='M4 6.5v11'/%3E%3Cpath d='M20 6.5v11'/%3E%3C/svg%3E");
}

.icon-list-check {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2320b2  width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2320b2aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.8 3.8l16.4 16.4'/%3E%3Cpath d='M20.2 3.8l-16.4 16.4'/%3E%3Cpath d='M10 5H7.6a1.2 1.2 0 0 0-1.2 1.2v3.3'/%3E%3Cpath d='M17.4 5H14'/%3E%3Cpath d='M5 10V7.6a1.2 1.2 0 0 1 1.2-1.2H9'/%3E%3Cpath d='M19 10V7.6a1.2 1.2 0 0 0-1.2-1.2H14'/%3E%3Cpath d='M14 19h2.4a1.2 1.2 0 0 0 1.2-1.2v-3.3'/%3E%3Cpath d='M6.6 19H10'/%3E%3Cpath d='M19 14v2.4a1.2 1.2 0 0 1-1.2 1.2H15'/%3E%3Cpath d='M5 14v2.4a1.2 1.2 0 0 0 1.2 1.2H10'/%3E%3C/svg%3E");
}

.icon-play {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2320b2aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='5 3 19 12 5 21 5 3'%3E%3C/polygon%3E%3C/svg%3E");
}

.icon-arrow-right {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'%3E%3C/line%3E%3Cpolyline points='12 5 19 12 12 19'%3E%3C/polyline%3E%3C/svg%3E");
}

.icon-save {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z'%3E%3C/path%3E%3Cpolyline points='17 21 17 13 7 13 7 21'%3E%3C/polyline%3E%3Cpolyline points='7 3 7 8 15 8'%3E%3C/polyline%3E%3C/svg%3E");
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-light);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

/* Tabs */
.tabs {
    margin-bottom: 2rem;
}

.tabs-list {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.tab-trigger {
    padding: 1rem 1.5rem;
    font-weight: 500;
    color: var(--text-light);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.tab-trigger:hover {
    color: var(--primary);
}

.tab-trigger.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Exercise grid */
.exercise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.exercise-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.exercise-image {
    width: 100%;
    height: 200px;
    background-color: var(--secondary);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1rem;
}

.exercise-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.exercise-card .card-footer {
    margin-top: auto;
}

/* Routine builder */
.builder-exercise {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.builder-exercise-drag {
    margin-right: 1rem;
    cursor: move;
}

.builder-exercise-info {
    flex-grow: 1;
}

.builder-exercise-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.builder-exercise-field {
    width: 80px;
}

.builder-exercise-field label {
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}

.builder-exercise-field input {
    width: 100%;
    padding: 0.5rem;
    font-size: 0.875rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.builder-empty {
    text-align: center;
    padding: 3rem;
    background-color: var(--secondary);
    border-radius: var(--radius);
}

/* Exercise player */
.player-header {
    margin-bottom: 1.5rem;
}

.player-progress {
    height: 8px;
    background-color: var(--secondary);
    border-radius: 4px;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.player-progress-bar {
    height: 100%;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.player-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-light);
}

.player-demo {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.player-demo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.player-instructions {
    margin-bottom: 1.5rem;
}

.player-counter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background-color: var(--secondary);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

.player-count {
    font-size: 2.5rem;
    font-weight: 700;
}

.player-count span {
    font-size: 1.5rem;
    color: var(--text-light);
}

.player-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.player-controls-group {
    display: flex;
    gap: 0.5rem;
}

/* Progress tracking */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    padding: 1.5rem;
}

.stat-title {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-lighter);
}

.activity-calendar {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 1rem;
}

.calendar-day {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    border-radius: 4px;
}

.level-0 {
    background-color: #f0f0f0;
}

.level-1 {
    background-color: #c5efe9;
}

.level-2 {
    background-color: #8de0d6;
}

.level-3 {
    background-color: var(--primary);
    color: white;
}

.calendar-legend {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-lighter);
}

.legend-box {
    width: 16px;
    height: 16px;
    border-radius: 2px;
}

.activity-item {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-info {
    flex-grow: 1;
}

.activity-date {
    text-align: right;
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--background);
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 1rem;
    display: flex;
    align-items: flex-start;
    max-width: 350px;
    z-index: 1000;
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.toast-content {
    flex-grow: 1;
    margin-right: 1rem;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.toast-message {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0;
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-lighter);
}

.toast-close:hover {
    color: var(--text);
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--error);
}

.toast.warning {
    border-left: 4px solid var(--warning);
}

/* Section header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
/* Exercise GIF in Modal */
.exercise-gif {
    width: 100%;
    max-height: 250px;
    object-fit: contain;
    margin: 15px 0;
    border-radius: 4px;
    border: 1px solid #eee;
}

/* Modal adjustments for GIF display */
.modal-content {
    max-height: 90vh;
    overflow-y: auto;
}

/* Play button on exercise cards */
.play-gif-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
}

.exercise-card {
    position: relative;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .exercise-gif {
        max-height: 200px;
    }
}
/* Exercise Card Expansion Styles */
.exercise-card {
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.exercise-card.expanded {
    position: relative;
    z-index: 10;
}

.card-collapsed {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-expanded {
    display: none;
    padding: 15px;
}

.exercise-gif {
    width: 100%;
    max-height: 250px;
    object-fit: contain;
    margin-bottom: 15px;
    border-radius: 4px;
    border: 1px solid #eee;
}

/* Exercise card layout adjustments */
.exercise-card .exercise-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.exercise-card .exercise-actions {
    margin-top: auto;
    padding-top: 15px;
    display: flex;
    gap: 10px;
}

/* Animation for expansion */
@keyframes expandCard {
    from { transform: scaleY(0); }
    to { transform: scaleY(1); }
}

.exercise-card.expanded {
    animation: expandCard 0.3s ease forwards;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .exercise-gif {
        max-height: 200px;
    }
    .exercise-card .exercise-actions {
        flex-direction: column;
    }
    .exercise-card .exercise-actions .btn {
        width: 100%;
    }
    .routine-card, .exercise-card {
        margin-bottom: 1rem;
    }
    .modal-content, .player-modal-content {
        padding: 0.5rem !important;
        max-width: 98vw !important;
    }
    .player-gif, .exercise-gif {
        max-width: 100vw !important;
        max-height: 150px !important;
    }
    .form-actions {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
    .btn, .btn-primary, .btn-outline, .btn-danger {
        width: 100%;
        font-size: 1rem;
        padding: 0.75rem 0;
    }
    .login-card {
        padding: 10px !important;
        min-width: 0;
    }
    .feature-grid {
        grid-template-columns: 1fr;
    }
}
/* Login Page Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #f5f7fa;
    padding: 20px;
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-card h1 {
    margin-bottom: 30px;
    color: #2c3e50;
}

/* Admin Form Styles */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-row .form-group {
    flex: 1;
}

.form-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    margin-top: 5px;
}

textarea.form-input {
    min-height: 100px;
    resize: vertical;
}

/* Responsive Admin Form */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .login-card {
        padding: 20px;
    }
}