/* ===== GOOGLE FONTS - MONTSERRAT ===== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800&display=swap');
/* ===== ГЛОБАЛЬНЫЕ ПЕРЕМЕННЫЕ ===== */
:root {
    --primary: #4a76a8;
    --primary-dark: #3a5f8a;
    --primary-light: #6b8fc0;
    --secondary: #ff6b6b;
    --success: #51cf66;
    --warning: #fcc419;
    --danger: #ff6b6b;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --border: #e2e8f0;
    --shadow-sm: 0 4px 6px -1px rgb(0 0 0 / 0.05);
    --shadow: 0 10px 25px -5px rgb(0 0 0 / 0.08), 0 8px 10px -6px rgb(0 0 0 / 0.02);
    --shadow-lg: 0 25px 50px -12px rgb(0 0 0 / 0.15);
    --radius-sm: 0.75rem;
    --radius: 1rem;
    --radius-lg: 1.5rem;
    --font-primary: 'Montserrat', sans-serif;
}

/* ===== БАЗОВЫЕ СТИЛИ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background: #ffffff;
    color: var(--dark);
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===== КНОПКИ ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.9rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    border: 2px solid transparent;
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 15px 25px -10px var(--primary);
}

.btn-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    box-shadow: 0 20px 30px -10px var(--primary-dark);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 10px;
    background: var(--light);
    color: var(--primary);
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: scale(1.1);
}

/* ===== КАРТОЧКИ ===== */
.card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* ===== ЗАГОЛОВКИ ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

h1 { font-size: 3rem; font-weight: 800; }
h2 { font-size: 2.5rem; font-weight: 700; }
h3 { font-size: 1.8rem; font-weight: 600; }
h4 { font-size: 1.4rem; font-weight: 600; }

/* ===== СЕКЦИИ ===== */
.section {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--gray);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== ГРИДЫ ===== */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* ===== ФОРМЫ ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 0.9rem 1.2rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    font-family: var(--font-primary);
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(74,118,168,0.1);
}

/* ===== УВЕДОМЛЕНИЯ ===== */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.alert-success {
    background: rgba(81,207,102,0.1);
    color: #2b8a3e;
    border-left: 4px solid var(--success);
}

.alert-error {
    background: rgba(255,107,107,0.1);
    color: #c92a2a;
    border-left: 4px solid var(--danger);
}

/* ===== ПУСТЫЕ СОСТОЯНИЯ ===== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.empty-state i {
    font-size: 3rem;
    color: var(--border);
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--gray);
    margin-bottom: 2rem;
}

/* ===== АНИМАЦИИ ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ===== АДАПТАЦИЯ ===== */
@media (max-width: 1200px) {
    .container {
        padding: 0 1.5rem;
    }
    h1 { font-size: 2.8rem; }
    h2 { font-size: 2.2rem; }
    .grid-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 992px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.5rem; }
    
    .section {
        padding: 3rem 0;
    }
    
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .btn {
        padding: 0.8rem 1.5rem;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.3rem; }
    
    .section-header p {
        font-size: 1rem;
    }
}
/* ===== ROOT VARIABLES ===== */
:root {
    --primary: #4a76a8;
    --primary-dark: #3a5f8a;
    --secondary: #ff6b6b;
    --success: #51cf66;
    --warning: #fcc419;
    --danger: #ff6b6b;
    --dark: #2d3436;
    --light: #f8f9fa;
    --gray: #adb5bd;
    --border: #e9ecef;
    --shadow: 0 8px 30px rgba(0,0,0,0.08);
    --shadow-lg: 0 15px 50px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
    
    /* Montserrat as primary font */
    --font-primary: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

h1 { 
    font-size: 3rem; 
    font-weight: 800;
    letter-spacing: -0.03em;
}
h2 { 
    font-size: 2.5rem; 
    font-weight: 700;
}
h3 { 
    font-size: 1.8rem; 
    font-weight: 600;
}
h4 { 
    font-size: 1.4rem; 
    font-weight: 600;
}

p {
    font-family: var(--font-primary);
    font-weight: 400;
    line-height: 1.7;
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { 
    color: var(--gray);
    font-weight: 400;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    border: 2px solid transparent;
    font-family: var(--font-primary);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 500;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 700;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    background: white;
    color: var(--primary);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

/* ===== ELEGANT BUTTONS ===== */
.btn-elegant {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    background: white;
    color: #4a76a8;
    border: 2px solid #e9ecef;
    font-family: var(--font-primary);
}

.btn-elegant:hover {
    background: #f8f9fa;
    border-color: #4a76a8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 118, 168, 0.1);
}

.btn-elegant.btn-primary {
    background: linear-gradient(135deg, #4a76a8, #3a5f8a);
    color: white;
    border: none;
}

.btn-elegant.btn-primary:hover {
    background: linear-gradient(135deg, #3a5f8a, #2d4a6c);
    box-shadow: 0 4px 15px rgba(74, 118, 168, 0.2);
}

.btn-elegant.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 500;
}

.btn-elegant.btn-outline {
    background: transparent;
    color: #4a76a8;
    border: 2px solid #4a76a8;
}

.btn-elegant.btn-outline:hover {
    background: #4a76a8;
    color: white;
}







/* Для мобильных */
@media (max-width: 768px) {
    .logo-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .logo span {
        display: none; /* Прячем текст на мобильных */
    }
}

.logo i {
    font-size: 2rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.user-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: var(--light);
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 500;
}

.avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius);
    padding: 1rem;
    min-width: 200px;
    display: none;
    z-index: 100;
}

.user-menu:hover .dropdown {
    display: block;
}

.dropdown a {
    display: block;
    padding: 10px 15px;
    color: var(--dark);
    text-decoration: none;
    transition: var(--transition);
    border-radius: var(--radius-sm);
    font-weight: 500;
}

.dropdown a:hover {
    background: var(--light);
    color: var(--primary);
}

/* ===== HERO SECTION ===== */
.hero {
    padding: 6rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    overflow: hidden;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--dark);
    font-weight: 800;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--gray);
    margin-bottom: 2rem;
    font-weight: 400;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
}

.floating-element {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float 6s ease-in-out infinite;
}

.floating-element i {
    font-size: 8rem;
    color: white;
    opacity: 0.8;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* ===== SECTIONS ===== */
.section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--gray);
    font-size: 1.1rem;
    font-weight: 400;
}

.bg-light {
    background: var(--light);
}

/* ===== WORKOUT CARDS ===== */
.workouts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.workout-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.workout-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.workout-card-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.workout-badge {
    background: rgba(255,255,255,0.2);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.workout-level {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.workout-level.новичок { background: var(--success); }
.workout-level.средний { background: var(--warning); }
.workout-level.продвинутый { background: var(--danger); }

.workout-card-body {
    padding: 1.5rem;
}

.workout-card-body h3 {
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.workout-description {
    color: var(--gray);
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.workout-meta {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--gray);
    font-size: 0.9rem;
    font-weight: 500;
}

.workout-card-footer {
    padding: 1.5rem;
    background: var(--light);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* ===== EXERCISE CARDS ===== */
.exercises-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.exercise-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.exercise-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.exercise-gif {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.exercise-gif img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.exercise-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.exercise-card:hover .exercise-overlay {
    opacity: 1;
}

.exercise-info {
    padding: 1.5rem;
}

.exercise-info h4 {
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.exercise-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.tag.muscle {
    background: rgba(74, 118, 168, 0.1);
    color: var(--primary);
}

.tag.difficulty {
    background: rgba(255, 107, 107, 0.1);
    color: var(--secondary);
}

.exercise-stats {
    display: flex;
    justify-content: space-between;
    color: var(--gray);
    font-size: 0.9rem;
    font-weight: 500;
}

/* ===== STEPS ===== */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.step {
    text-align: center;
}

.step-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
}

.step h3 {
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.step p {
    color: var(--gray);
    font-weight: 400;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gray);
}

.empty-state i {
    margin-bottom: 1.5rem;
    color: var(--border);
}

.empty-state h3 {
    color: var(--dark);
    margin-bottom: 0.5rem;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--dark);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    color: white;
    margin-bottom: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.footer-section a {
    display: block;
    color: var(--gray);
    text-decoration: none;
    margin-bottom: 0.8rem;
    transition: var(--transition);
    font-weight: 400;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: var(--gray);
    font-weight: 400;
}

/* ===== WORKOUT BUILDER ===== */
.builder-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    min-height: 600px;
}

.builder-sidebar {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.builder-main {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.day-card {
    background: var(--light);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 2px dashed var(--border);
    transition: var(--transition);
}

.day-card.active {
    border-color: var(--primary);
    background: rgba(74, 118, 168, 0.05);
}

.day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.exercise-in-day {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    border: 1px solid var(--border);
}

.exercise-params {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.param-input {
    width: 80px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

/* ===== TIMER ===== */
.timer-container {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.timer-display {
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary);
    margin: 1rem 0;
    font-family: monospace;
}

.timer-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* ===== WORKOUT SESSION ===== */
.session-exercise {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.set-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--light);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
}

.set-completed {
    background: rgba(81, 207, 102, 0.1);
    border-left: 4px solid var(--success);
}

/* ===== ПРОФИЛЬ ===== */
.profile-container {
    max-width: 1200px;
    margin: 0 auto;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
    padding: 2rem;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--primary);
}

.profile-info h1 {
    margin-bottom: 0.5rem;
}

.profile-email {
    color: var(--gray);
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.profile-join {
    color: var(--gray);
    font-size: 0.9rem;
    font-weight: 400;
}

.profile-stats {
    display: flex;
    gap: 2rem;
    margin-top: 1.5rem;
}

.stat-item {
    text-align: center;
}

.stat-item strong {
    display: block;
    font-size: 2rem;
    color: var(--primary);
    font-weight: 700;
}

.stat-item span {
    color: var(--gray);
    font-size: 0.9rem;
    font-weight: 500;
}

.trainer-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 10px;
}

.profile-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.profile-section {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.profile-section h2 {
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.become-trainer-card, .trainer-info-card {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
}

.become-trainer-card h3, .trainer-info-card h3 {
    margin-bottom: 0.5rem;
}

.trainer-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* Статистика */
.stats-cards {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--light);
    border-radius: var(--radius);
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.stat-content h3 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
    color: var(--gray);
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
}

/* Сессии тренировок */
.recent-workouts {
    margin-top: 2rem;
}

.sessions-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.session-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--light);
    border-radius: var(--radius);
    transition: var(--transition);
}

.session-item:hover {
    background: #e9ecef;
}

.session-info h4 {
    margin-bottom: 0.2rem;
    font-size: 1rem;
}

.session-info p {
    color: var(--gray);
    font-size: 0.9rem;
}

.session-duration {
    font-weight: 600;
    color: var(--primary);
}

/* Уведомления */
.alert {
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: rgba(81, 207, 102, 0.1);
    color: #155724;
    border-left: 4px solid #51cf66;
}

.alert i {
    font-size: 1.2rem;
}

/* Фильтры */
.filter-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    background: white;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--dark);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: white;
    border-radius: var(--radius);
}

.results-info {
    font-size: 1.1rem;
}

/* Современные фильтры */
.filters-modern {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.filter-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 50px;
    color: #495057;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: #4a76a8;
    border-color: #4a76a8;
    color: white;
    box-shadow: 0 4px 12px rgba(74, 118, 168, 0.2);
}

/* Тренер карточка */
.trainer-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    padding: 1.5rem;
    margin-top: 2rem;
    border-left: 4px solid #4a76a8;
}

.trainer-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* Статистика */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: #4a76a8;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3436;
}

/* Сессии */
.sessions-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.session-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 3px solid #4a76a8;
}

.session-time {
    font-weight: 600;
    color: #4a76a8;
}

/* Actions bar */
.actions-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem 0;
    border-bottom: 2px solid #f1f3f5;
}

/* Прогресс */
.workout-progress {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.progress-bar {
    height: 10px;
    background: #eee;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a76a8, #5a86b8);
    transition: width 0.5s ease;
}

.mt-3 { margin-top: 1rem; }
.mb-3 { margin-bottom: 1rem; }

/* ===== МЕТРИКИ И АНТРОПОМЕТРИЯ ===== */
.metrics-container {
    max-width: 800px;
    margin: 0 auto;
}

.metrics-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.metric-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: #4a76a8;
    margin: 0.5rem 0;
}

.metric-label {
    color: #666;
    font-size: 0.9rem;
}

/* Форма метрик */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #495057;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #4a76a8;
    outline: none;
}

/* ИМТ индикатор */
.bmi-indicator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.bmi-scale {
    flex: 1;
    height: 10px;
    background: linear-gradient(90deg, #51cf66, #fcc419, #ff6b6b);
    border-radius: 5px;
    margin: 0 1rem;
    position: relative;
}

.bmi-marker {
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border: 2px solid #4a76a8;
    border-radius: 50%;
    top: -5px;
    transform: translateX(-50%);
}

.bmi-categories {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #666;
}

/* Таблицы */
.history-table {
    width: 100%;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    margin-top: 2rem;
}

.history-table th {
    background: #f8f9fa;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #eee;
}

.history-table td {
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

/* Статусы ИМТ */
.bmi-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.bmi-underweight { background: #e7f5ff; color: #1864ab; }
.bmi-normal { background: #ebfbee; color: #2b8a3e; }
.bmi-overweight { background: #fff9db; color: #e67700; }
.bmi-obese { background: #ffe3e3; color: #c92a2a; }

/* Мини статистика на главной */
.user-stats-mini {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.stat-mini-item {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    flex: 1;
    min-width: 150px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    text-align: center;
}

.stat-mini-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4a76a8;
    margin: 0.5rem 0;
}

.stat-mini-label {
    color: #666;
    font-size: 0.8rem;
}

/* Карточка метрик на главной */
.metrics-summary {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
    border-left: 4px solid #4a76a8;
}

.metrics-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

/* Бейдж для незаполненных метрик */
.metrics-warning {
    background: #fff9db;
    border: 1px solid #fcc419;
    color: #e67700;
    padding: 1rem;
    border-radius: 10px;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.metrics-warning i {
    font-size: 1.2rem;
}

/* ===== КРАСИВЫЕ КНОПКИ ===== */
.btn-elegant {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    background: white;
    color: #4a76a8;
    border: 2px solid #e9ecef;
}

.btn-elegant:hover {
    background: #f8f9fa;
    border-color: #4a76a8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 118, 168, 0.1);
}

.btn-elegant.btn-primary {
    background: linear-gradient(135deg, #4a76a8, #3a5f8a);
    color: white;
    border: none;
}

.btn-elegant.btn-primary:hover {
    background: linear-gradient(135deg, #3a5f8a, #2d4a6c);
    box-shadow: 0 4px 15px rgba(74, 118, 168, 0.2);
}

.btn-elegant.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-elegant.btn-outline {
    background: transparent;
    color: #4a76a8;
    border: 2px solid #4a76a8;
}

.btn-elegant.btn-outline:hover {
    background: #4a76a8;
    color: white;
}

/* ===== КОМПАКТНЫЕ МЕТРИКИ ===== */
.metrics-compact-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.metrics-compact-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.08);
}

.metrics-compact-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f3f5;
}

.metrics-compact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.metric-compact-box {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.metric-compact-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2d3436;
    margin: 0.3rem 0;
}

.metric-compact-label {
    color: #666;
    font-size: 0.8rem;
    font-weight: 500;
}

.metric-change {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
}

.metric-change.up {
    background: rgba(81, 207, 102, 0.1);
    color: #2b8a3e;
}

.metric-change.down {
    background: rgba(255, 107, 107, 0.1);
    color: #c92a2a;
}

.metric-change.neutral {
    background: rgba(134, 142, 150, 0.1);
    color: #868e96;
}

/* ===== ПРОГРЕСС ИМТ ===== */
.bmi-progress-wrapper {
    margin: 1.5rem 0;
}

.bmi-progress-bar {
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.bmi-progress-fill {
    position: absolute;
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, #51cf66, #fcc419, #ff6b6b);
}

.bmi-marker-current {
    position: absolute;
    top: -3px;
    width: 14px;
    height: 14px;
    background: white;
    border: 2px solid #4a76a8;
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.bmi-marker-previous {
    position: absolute;
    top: -3px;
    width: 10px;
    height: 10px;
    background: rgba(74, 118, 168, 0.3);
    border: 1px solid #4a76a8;
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.bmi-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #868e96;
}

/* ===== СТАТУС КАРТОЧКИ ===== */
.status-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
}

.status-empty {
    text-align: center;
    padding: 3rem 2rem;
    color: #868e96;
}

.status-empty i {
    font-size: 3rem;
    color: #dee2e6;
    margin-bottom: 1rem;
}

.status-empty h3 {
    color: #868e96;
    margin-bottom: 0.5rem;
}

/* ===== ПРОФИЛЬ КОМПАКТ ===== */
.profile-compact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.profile-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    height: 100%;
}

.profile-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f3f5;
}

.profile-card-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.profile-card-header i {
    color: #4a76a8;
    font-size: 1.1rem;
}

/* ===== ТРЕНЕР КАРТОЧКА ===== */
.trainer-mini-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    border-left: 4px solid #4a76a8;
}

.trainer-mini-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* ===== ИСТОРИЯ КОМПАКТ ===== */
.history-compact {
    margin-top: 1rem;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.history-date {
    font-weight: 500;
    color: #495057;
}

.history-value {
    font-weight: 600;
    color: #4a76a8;
}

/* ===== АКТИВНЫЕ ТРЕНИРОВКИ ПРОФИЛЬ ===== */
.active-workouts-profile {
    margin-top: 1.5rem;
}

.workout-mini-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border-left: 3px solid #4a76a8;
    transition: all 0.3s ease;
}

.workout-mini-card:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.workout-mini-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.workout-mini-name {
    font-weight: 600;
    color: #2d3436;
    margin: 0;
    font-size: 1rem;
}

.workout-mini-day {
    background: #4a76a8;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

.workout-mini-progress {
    height: 4px;
    background: #dee2e6;
    border-radius: 2px;
    margin: 0.5rem 0;
    overflow: hidden;
}

.workout-mini-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a76a8, #5a86b8);
    border-radius: 2px;
}

.workout-mini-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

.workout-mini-percent {
    font-size: 0.8rem;
    color: #868e96;
}

/* ===== ФОРМА МЕТРИК КОМПАКТ ===== */
.metrics-form-compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.form-group-compact {
    margin-bottom: 0;
}

.form-group-compact label {
    display: block;
    margin-bottom: 0.5rem;
    color: #495057;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group-compact input,
.form-group-compact select {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.3s;
}

.form-group-compact input:focus,
.form-group-compact select:focus {
    border-color: #4a76a8;
    outline: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .workouts-grid,
    .exercises-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    .builder-container {
        grid-template-columns: 1fr;
    }
    
    .profile-content {
        grid-template-columns: 1fr;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-stats {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.5rem; }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .steps {
        grid-template-columns: 1fr;
    }
    
    .profile-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .trainer-actions {
        flex-direction: column;
    }
    
    .actions-bar {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .metrics-compact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .profile-compact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .workouts-grid,
    .exercises-grid {
        grid-template-columns: 1fr;
    }
    
    .workout-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .timer-display {
        font-size: 3rem;
    }
    
    .metrics-compact-grid {
        grid-template-columns: 1fr;
    }
    
    .metrics-form-compact {
        grid-template-columns: 1fr;
    }
}

/* ===== СПЕЦИАЛЬНЫЕ СТИЛИ ДЛЯ ТРЕНИРОВКИ ===== */
.workout-header {
    margin-bottom: 2rem;
}

.day-badge {
    background: #4a76a8;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    font-size: 1rem;
    display: inline-block;
    margin-bottom: 1rem;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(74, 118, 168, 0.2);
}

.exercise-container {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
}

.exercise-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.exercise-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.exercise-title h2 {
    margin: 0;
    font-size: 2rem;
}

.exercise-counter {
    background: var(--primary);
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
}

.exercise-gif-container {
    text-align: center;
    margin: 2rem 0;
    background: var(--light);
    border-radius: var(--radius);
    padding: 1rem;
}

.exercise-gif {
    max-height: 300px;
    max-width: 100%;
    border-radius: 10px;
}

.exercise-description {
    background: var(--light);
    padding: 1.5rem;
    border-radius: var(--radius);
    margin: 1.5rem 0;
    border-left: 4px solid var(--primary);
}

.exercise-meta {
    display: flex;
    gap: 1.5rem;
    margin: 2rem 0;
}

.meta-item {
    background: var(--light);
    padding: 1.2rem;
    border-radius: var(--radius);
    text-align: center;
    flex: 1;
}

.meta-item h4 {
    margin: 0 0 0.5rem 0;
    color: var(--gray);
    font-size: 0.95rem;
}

.meta-item p {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
}

.workout-timer {
    background: linear-gradient(135deg, var(--dark), #1e272e);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-lg);
}

.workout-timer i {
    color: var(--success);
}

.timer-display {
    font-family: 'Montserrat', monospace;
    font-size: 1.6rem;
    letter-spacing: 2px;
}

.summary-form {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

.result-card {
    background: var(--light);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.result-header h4 {
    font-weight: 700;
    margin: 0;
}

.result-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.body-weight-card {
    background: rgba(74, 118, 168, 0.05);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border: 2px dashed var(--primary);
}

.body-weight-card h4 {
    margin: 0 0 0.5rem 0;
    color: var(--primary);
}

.body-weight-input {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 300px;
}

.body-weight-input input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
}

.body-weight-input input:focus {
    border-color: var(--primary);
    outline: none;
}

.empty-day {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.empty-day i {
    font-size: 4rem;
    color: var(--gray);
    margin-bottom: 1rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .exercise-meta {
        flex-direction: column;
    }
    
    .result-inputs {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
    
    .workout-timer {
        width: 100%;
        justify-content: center;
    }
}
/* ===== МОБИЛЬНАЯ ОПТИМИЗАЦИЯ ===== */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    h1 {
        font-size: 2rem !important;
    }
    
    h2 {
        font-size: 1.6rem !important;
    }
    
    /* Навигация */
    .nav-links {
        gap: 1rem;
    }
    
    .nav-link {
        font-size: 0.9rem;
    }
    
    /* Герой */
    .hero {
        padding: 3rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .floating-element {
        width: 200px;
        height: 200px;
    }
    
    .floating-element i {
        font-size: 5rem;
    }
    
    /* Карточки */
    .workouts-grid,
    .exercises-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .workout-card-header {
        padding: 1rem;
    }
    
    .workout-card-body {
        padding: 1rem;
    }
    
    .workout-card-footer {
        padding: 1rem;
    }
    
    .workout-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    /* Метрики */
    .metrics-compact-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }
    
    .metric-compact-box {
        padding: 0.8rem;
    }
    
    .metric-compact-value {
        font-size: 1.1rem;
    }
    
    /* Шкала ИМТ */
    .bmi-labels span {
        font-size: 0.65rem;
    }
    
    /* Прогресс тренировок */
    .workout-mini-card {
        padding: 0.8rem;
    }
    
    .workout-mini-name {
        font-size: 0.9rem;
    }
    
    .workout-mini-day {
        font-size: 0.7rem;
    }
    
    /* Кнопки */
    .btn, .btn-elegant {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .btn-lg {
        padding: 12px 24px;
        font-size: 1rem;
    }
    
    /* Шаги */
    .steps {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .step-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .metrics-compact-grid {
        grid-template-columns: 1fr;
    }
    
    .bmi-progress-wrapper {
        margin: 1rem 0;
    }
    
    .bmi-labels {
        font-size: 0.6rem;
    }
    
    .workout-mini-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .workout-mini-footer .btn-elegant {
        width: 100%;
    }
    
    .filter-tabs {
        flex-direction: column;
    }
    
    .filter-btn {
        width: 100%;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 360px) {
    .logo span {
        display: none;
    }
    
    .hero-title {
        font-size: 1.6rem;
    }
    
    .day-badge {
        font-size: 0.8rem;
    }
}
/* ===== КРИТИЧЕСКИЕ ИСПРАВЛЕНИЯ ДЛЯ МОБИЛЬНЫХ ===== */
@media (max-width: 768px) {
    /* Исправление вылетающей кнопки профиля */
    .navbar .container {
        flex-wrap: wrap;
        padding: 0 10px;
    }
    
    .logo {
        font-size: 1.4rem;
    }
    
    .logo i {
        font-size: 1.5rem;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 0.5rem;
        width: 100%;
        margin-top: 10px;
    }
    
    .user-menu {
        padding: 5px 10px;
        font-size: 0.9rem;
    }
    
    .avatar-sm {
        width: 28px;
        height: 28px;
    }
    
    .user-menu span {
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    /* Исправление текста "Ожирение" и метрик */
    .metric-compact-box {
        min-width: 0; /* Предотвращает вылезание */
        word-break: break-word;
    }
    
    .metric-compact-box small {
        display: block;
        font-size: 0.7rem;
        line-height: 1.2;
        white-space: normal;
    }
    
    .metric-compact-value {
        font-size: 1.1rem;
        word-break: break-word;
    }
    
    .metric-compact-label {
        font-size: 0.7rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Исправление сетки метрик */
    .metrics-compact-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    /* Исправление карточек тренировок */
    .workouts-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .workout-card {
        width: 100%;
        margin: 0;
    }
    
    .workout-card-header {
        padding: 12px;
    }
    
    .workout-badge {
        font-size: 0.8rem;
        padding: 4px 8px;
    }
    
    .workout-level {
        font-size: 0.8rem;
        padding: 4px 8px;
    }
    
    .workout-card-body {
        padding: 12px;
    }
    
    .workout-card-body h3 {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }
    
    .workout-description {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }
    
    .workout-meta {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .meta-item {
        font-size: 0.8rem;
    }
    
    .workout-card-footer {
        padding: 12px;
        flex-direction: column;
        gap: 8px;
    }
    
    .workout-card-footer .btn-elegant {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    /* Исправление карточек упражнений */
    .exercises-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .exercise-card {
        width: 100%;
    }
    
    .exercise-gif {
        height: 180px;
    }
    
    .exercise-info {
        padding: 12px;
    }
    
    .exercise-info h4 {
        font-size: 1rem;
    }
    
    .exercise-tags .tag {
        font-size: 0.7rem;
        padding: 3px 8px;
    }
    
    .exercise-stats {
        font-size: 0.8rem;
    }
    
    /* Исправление шагов */
    .steps {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .step {
        padding: 0 10px;
    }
    
    .step h3 {
        font-size: 1.1rem;
    }
    
    .step p {
        font-size: 0.9rem;
    }
    
    /* Исправление футера */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .footer-section h3 {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }
    
    .footer-section a {
        font-size: 0.9rem;
    }
    
    /* Исправление контейнера */
    .container {
        padding: 0 12px;
        width: 100%;
        overflow-x: hidden;
    }
    
    /* Предотвращение горизонтального скролла */
    body {
        overflow-x: hidden;
        width: 100%;
    }
    
    /* Исправление прогресса */
    .workout-mini-card {
        padding: 12px;
    }
    
    .workout-mini-name {
        font-size: 0.95rem;
        max-width: 200px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .workout-mini-percent {
        font-size: 0.8rem;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .metrics-compact-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        justify-content: center;
    }
    
    .user-menu span {
        display: none;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .workout-meta {
        flex-direction: column;
    }
    
    .hero-title {
        font-size: 1.6rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .hero-actions .btn-elegant {
        width: 100%;
    }
    
    .bmi-labels span {
        font-size: 0.55rem;
    }
}

/* Исправление для планшетов */
@media (min-width: 769px) and (max-width: 1024px) {
    .workouts-grid,
    .exercises-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .metrics-compact-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .container {
        padding: 0 20px;
    }
}
@media (max-width: 768px) {
    .user-name {
        display: none;
    }
}
/* ===== ДОПОЛНИТЕЛЬНАЯ МОБИЛЬНАЯ ОПТИМИЗАЦИЯ ===== */
@media (max-width: 768px) {
    /* Фикс навигации и кнопок сверху */
    .navbar .container {
        flex-wrap: wrap;
    }
    
    .nav-links {
        flex-wrap: wrap;
        width: 100%;
        justify-content: space-between;
        gap: 0.5rem;
        margin-top: 0.5rem;
    }
    
    .nav-link {
        font-size: 0.85rem;
        padding: 0.4rem 0.6rem;
    }
    
    /* Кнопка профиля */
    .user-menu {
        padding: 0.3rem 0.8rem;
    }
    
    .user-menu span {
        display: none; /* Прячем имя на мобилках */
    }
    
    .avatar-sm {
        width: 28px;
        height: 28px;
    }
    
    /* Кнопки входа/регистрации */
    .btn-elegant.btn-outline,
    .btn-elegant.btn-primary {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }
    
    /* Заголовок "Все тренировки" и кнопка */
    .metrics-compact-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .metrics-compact-header h2 {
        font-size: 1.2rem;
        width: 100%;
    }
    
    .metrics-compact-header .btn-elegant {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }
    
    /* Карточки тренировок */
    .workout-mini-footer {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .workout-mini-footer .btn-elegant {
        width: 100%;
        text-align: center;
    }
    
    /* Кнопки в карточках программ */
    .workout-card-footer {
        flex-wrap: wrap;
    }
    
    .workout-card-footer .btn-elegant,
    .workout-card-footer .btn {
        flex: 1;
        min-width: 120px;
        text-align: center;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .nav-links {
        justify-content: center;
    }
    
    .nav-link {
        font-size: 0.75rem;
        padding: 0.3rem 0.5rem;
    }
    
    .workout-card-footer {
        flex-direction: column;
    }
    
    .workout-card-footer .btn-elegant,
    .workout-card-footer .btn {
        width: 100%;
    }
}
/* ===== ФИКС ВИДИМОСТИ МЕНЮ НА МОБИЛКАХ ===== */
@media (max-width: 768px) {
    /* Делаем навигацию видимой */
    .navbar {
        padding: 0.5rem 0;
        background: white;
        z-index: 1000;
    }
    
    .navbar .container {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
    }
    
    /* Логотип слева */
    .logo {
        font-size: 1.4rem;
    }
    
    /* Меню справа */
    .nav-links {
        display: flex !important; /* Принудительно показываем */
        flex-wrap: wrap;
        width: auto;
        justify-content: flex-end;
        gap: 0.3rem;
        margin-top: 0;
    }
    
    /* Кнопки навигации */
    .nav-link {
        font-size: 0.8rem;
        padding: 0.3rem 0.5rem;
        background: #f0f2f5;
        border-radius: 20px;
        color: #2d3436;
    }
    
    .nav-link i {
        margin-right: 0;
    }
    
    /* Кнопка профиля - делаем заметной */
    .user-menu {
        background: #4a76a8;
        color: white;
        padding: 0.3rem 0.6rem;
        border-radius: 30px;
        margin-left: 0.3rem;
    }
    
    .user-menu .avatar-sm {
        width: 28px;
        height: 28px;
        border: 2px solid white;
    }
    
    .user-menu span {
        display: none;
    }
    
    /* Кнопки входа/регистрации */
    .btn-elegant.btn-outline,
    .btn-elegant.btn-primary {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
        white-space: nowrap;
        border-radius: 30px;
    }
    
    .btn-elegant.btn-outline {
        background: white;
        color: #4a76a8;
        border: 1px solid #4a76a8;
    }
    
    .btn-elegant.btn-primary {
        background: #4a76a8;
        color: white;
    }
    
    /* Исправление hero чтобы не перекрывал */
    .hero {
        padding-top: 2rem;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .nav-links {
        gap: 0.2rem;
    }
    
    .nav-link {
        font-size: 0.7rem;
        padding: 0.25rem 0.4rem;
    }
    
    .user-menu {
        padding: 0.2rem 0.5rem;
    }
    
    .avatar-sm {
        width: 24px;
        height: 24px;
    }
    
    .btn-elegant.btn-outline,
    .btn-elegant.btn-primary {
        padding: 0.3rem 0.6rem;
        font-size: 0.7rem;
    }
}
/* ===== КНОПКИ В КАРТОЧКАХ ТРЕНИРОВОК ===== */
.workout-card-footer {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.workout-card-footer .btn,
.workout-card-footer .btn-sm {
    flex: 0 1 auto;
    min-width: 100px;
    text-align: center;
    white-space: nowrap;
}

/* Для трёх кнопок */
.workout-card-footer .btn:nth-child(1) { order: 1; } /* Подробнее */
.workout-card-footer .btn:nth-child(2) { order: 2; } /* Редактировать */
.workout-card-footer .btn:nth-child(3) { order: 3; } /* Удалить */

/* На мобильных устройствах */
@media (max-width: 768px) {
    .workout-card-footer {
        justify-content: stretch;
    }
    
    .workout-card-footer .btn,
    .workout-card-footer .btn-sm {
        flex: 1 1 calc(33.333% - 0.5rem);
        min-width: 0;
        font-size: 0.8rem;
        padding: 0.5rem 0.25rem;
        white-space: normal;
        word-break: break-word;
    }
}

@media (max-width: 480px) {
    .workout-card-footer .btn,
    .workout-card-footer .btn-sm {
        flex: 1 1 100%;
    }
}

/* ===== СТАТЬИ ===== */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.article-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(74, 118, 168, 0.15);
}

.article-image {
    height: 200px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.05);
}

.article-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    color: var(--dark);
    font-weight: 700;
}

.article-excerpt {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
    flex: 1;
}

.article-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f3f5;
}

.article-meta span {
    font-size: 0.85rem;
    color: #868e96;
    display: flex;
    align-items: center;
    gap: 5px;
}

.article-footer {
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
    align-items: center;
}

.article-footer .btn {
    flex: 1;
}

/* Страница одной статьи */
.article-page {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.article-page .article-image {
    height: 400px;
    border-radius: 15px;
    margin: 1.5rem 0;
}

.article-page .article-content {
    padding: 0;
}

.article-page .article-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.article-page .article-meta {
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.article-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #2d3436;
}

.article-text p {
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .article-page .article-image {
        height: 250px;
    }
    
    .article-page .article-content h1 {
        font-size: 1.8rem;
    }
}
/* Стили для форматированного текста статей */
.article-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #2d3436;
}

.article-text h2 {
    font-size: 1.8rem;
    margin: 2rem 0 1rem;
    color: var(--dark);
}

.article-text h3 {
    font-size: 1.4rem;
    margin: 1.5rem 0 1rem;
}

.article-text p {
    margin-bottom: 1.5rem;
}

.article-text img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1.5rem 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.article-text ul, .article-text ol {
    margin: 1rem 0 1.5rem 2rem;
}

.article-text li {
    margin-bottom: 0.5rem;
}

.article-text blockquote {
    background: #f8f9fa;
    border-left: 4px solid var(--primary);
    padding: 1rem 2rem;
    margin: 1.5rem 0;
    font-style: italic;
    border-radius: 0 10px 10px 0;
}

.article-text a {
    color: var(--primary);
    text-decoration: underline;
}

.article-text a:hover {
    color: var(--primary-dark);
}

/* Блок с упражнением в статье */
.article-exercise {
    background: #f8f9fa;
    border-left: 4px solid var(--primary);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 10px 10px 0;
}

.article-exercise h4 {
    margin-top: 0;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-exercise img {
    max-width: 200px;
    margin: 10px 0;
    border-radius: 8px;
}

.article-exercise a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.article-exercise a:hover {
    text-decoration: underline;
}

/* Изображения в тексте */
.article-inline-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1.5rem auto;
    display: block;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s;
}

.article-inline-image:hover {
    transform: scale(1.02);
}
/* ===== ИСПРАВЛЕНИЕ КНОПОК В КАРТОЧКАХ НА МОБИЛЬНЫХ ===== */
@media (max-width: 768px) {
    .workout-card-footer {
        flex-wrap: wrap;
        gap: 8px;
        padding: 12px;
    }
    
    .workout-card-footer .btn-elegant,
    .workout-card-footer .btn-sm {
        flex: 1 1 calc(50% - 4px);
        min-width: 0;
        font-size: 0.8rem;
        padding: 8px 4px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Для трех кнопок */
    .workout-card-footer .btn-elegant:nth-child(1),
    .workout-card-footer .btn-elegant:nth-child(2),
    .workout-card-footer .btn-elegant:nth-child(3) {
        flex: 1 1 calc(33.333% - 6px);
    }
}

@media (max-width: 480px) {
    .workout-card-footer {
        flex-direction: column;
        gap: 6px;
    }
    
    .workout-card-footer .btn-elegant,
    .workout-card-footer .btn-sm {
        flex: 1 1 100%;
        width: 100%;
        font-size: 0.9rem;
        padding: 10px;
    }
}

/* ===== ИСПРАВЛЕНИЕ ВЫПАДАЮЩЕГО МЕНЮ НА МОБИЛЬНЫХ ===== */
@media (max-width: 768px) {
    .user-menu {
        position: relative;
    }
    
    .user-menu .dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        padding: 20px;
        box-shadow: 0 -5px 30px rgba(0,0,0,0.2);
        transform: translateY(100%);
        transition: transform 0.3s ease;
        display: block;
        visibility: hidden;
        z-index: 2000;
    }
    
    .user-menu.active .dropdown {
        transform: translateY(0);
        visibility: visible;
    }
    
    .user-menu .dropdown a {
        padding: 15px 20px;
        font-size: 1.1rem;
        border-bottom: 1px solid #f1f3f5;
    }
    
    .user-menu .dropdown a:last-child {
        border-bottom: none;
    }
    
    /* Затемнение фона */
    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1999;
        display: none;
    }
    
    .menu-overlay.active {
        display: block;
    }
}
/* ===== ИСПРАВЛЕНИЕ МЕТЫ В КАРТОЧКАХ ===== */
.workout-meta {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--gray);
    font-size: 0.9rem;
    font-weight: 500;
}

/* На ПК мета в одну строку */
@media (min-width: 769px) {
    .workout-meta {
        flex-wrap: nowrap;
        gap: 1rem;
    }
    
    .meta-item {
        white-space: nowrap;
    }
}

/* На мобильных перенос */
@media (max-width: 768px) {
    .workout-meta {
        gap: 0.8rem;
    }
    
    .meta-item {
        font-size: 0.85rem;
    }
}
/* ===== ИСПРАВЛЕНИЕ КНОПОК В КАРТОЧКАХ ===== */
.workout-card-footer {
    padding: 1.5rem;
    background: var(--light);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    border-top: 1px solid var(--border);
}

/* ПК версия */
@media (min-width: 769px) {
    .workout-card-footer {
        flex-wrap: nowrap;
    }
    
    .workout-card-footer .btn-elegant,
    .workout-card-footer .btn-sm {
        flex: 0 1 auto;
        min-width: 110px;
        white-space: nowrap;
    }
}

/* Планшеты */
@media (max-width: 992px) and (min-width: 769px) {
    .workout-card-footer {
        flex-wrap: wrap;
    }
    
    .workout-card-footer .btn-elegant,
    .workout-card-footer .btn-sm {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 0;
        font-size: 0.85rem;
    }
}

/* Мобильные */
@media (max-width: 768px) {
    .workout-card-footer {
        flex-direction: column;
        gap: 8px;
        padding: 12px;
    }
    
    .workout-card-footer .btn-elegant,
    .workout-card-footer .btn-sm {
        width: 100%;
        margin: 0;
        padding: 10px;
        font-size: 0.9rem;
        justify-content: center;
    }
}
/* ===== МОБИЛЬНОЕ МЕНЮ ПРОФИЛЯ ===== */
@media (max-width: 768px) {
    .user-menu {
        position: relative;
        cursor: pointer;
    }
    
    .user-menu .dropdown {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        background: white;
        border-radius: 20px 20px 0 0;
        padding: 20px;
        box-shadow: 0 -5px 30px rgba(0,0,0,0.2);
        z-index: 2000;
        display: none;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .user-menu.active .dropdown {
        display: block !important;
        animation: slideUp 0.3s ease;
    }
    
    @keyframes slideUp {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }
    
    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1999;
        display: none;
    }
    
    .menu-overlay.active {
        display: block;
    }
    
    .user-menu .dropdown a {
        display: block;
        padding: 15px 20px;
        font-size: 1.1rem;
        border-bottom: 1px solid #f1f3f5;
        color: var(--dark);
        text-decoration: none;
    }
    
    .user-menu .dropdown a:last-child {
        border-bottom: none;
    }
    
    .user-menu .dropdown a i {
        width: 25px;
        color: var(--primary);
    }
    
    .user-menu .dropdown a:hover {
        background: var(--light);
    }
}

/* Фикс для времени тренировки */
@media (min-width: 769px) and (max-width: 992px) {
    .workout-meta {
        gap: 0.8rem;
    }
    
    .meta-item {
        font-size: 0.85rem;
    }
}
/* ===== НОВЫЙ ПРОФИЛЬ ДЛЯ МОБИЛЬНЫХ ===== */
.user-profile-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--dark);
    padding: 5px 10px;
    border-radius: 30px;
    background: var(--light);
    transition: all 0.3s ease;
}

.user-profile-link:hover {
    background: #e9ecef;
}

.user-name {
    font-weight: 500;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .user-name {
        display: none; /* Прячем имя на мобильных */
    }
    
    .user-profile-link {
        padding: 5px;
        background: transparent;
    }
    
    .user-profile-link:hover {
        background: transparent;
    }
    
    .avatar-sm {
        width: 32px;
        height: 32px;
        border: 2px solid var(--primary);
    }
}

/* ===== ИСПРАВЛЕНИЕ КАРТОЧЕК ТРЕНИРОВОК ===== */
.workouts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.workout-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.workout-card-body {
    padding: 1.5rem;
    flex: 1;
}

.workout-card-footer {
    padding: 1.5rem;
    background: var(--light);
    display: flex;
    gap: 0.8rem;
    border-top: 1px solid var(--border);
}

/* ПК версия */
@media (min-width: 1025px) {
    .workout-card-footer {
        flex-wrap: nowrap;
    }
    
    .workout-card-footer .btn-elegant {
        flex: 1;
        min-width: 100px;
        white-space: nowrap;
        font-size: 0.85rem;
        padding: 8px 12px;
    }
}

/* Планшеты */
@media (min-width: 769px) and (max-width: 1024px) {
    .workout-card-footer {
        flex-wrap: wrap;
    }
    
    .workout-card-footer .btn-elegant {
        flex: 1 1 calc(50% - 0.4rem);
        min-width: 0;
        font-size: 0.8rem;
        padding: 8px 4px;
    }
}

/* Мобильные */
@media (max-width: 768px) {
    .workout-card-footer {
        flex-direction: column;
        gap: 6px;
        padding: 12px;
    }
    
    .workout-card-footer .btn-elegant {
        width: 100%;
        margin: 0;
        padding: 12px 8px;
        font-size: 0.9rem;
        justify-content: center;
    }
    
    /* Особенно для кнопки "Подробнее" */
    .workout-card-footer .btn-elegant:first-child {
        background: #f0f2f5;
        color: var(--dark);
        border: 1px solid #dee2e6;
    }
    
    .workout-card-footer .btn-elegant:first-child:hover {
        background: #e9ecef;
    }
    
    /* Кнопка "Начать/Продолжить" */
    .workout-card-footer .btn-primary,
    .workout-card-footer .btn-elegant.btn-primary {
        background: linear-gradient(135deg, #4a76a8, #3a5f8a);
        color: white;
    }
}

/* ===== ИСПРАВЛЕНИЕ МЕТЫ В КАРТОЧКАХ ===== */
.workout-meta {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--gray);
    font-size: 0.85rem;
    font-weight: 500;
}

@media (min-width: 769px) {
    .workout-meta {
        flex-wrap: nowrap;
        justify-content: space-between;
    }
    
    .meta-item {
        white-space: nowrap;
    }
}

@media (max-width: 768px) {
    .workout-meta {
        gap: 0.8rem;
        justify-content: flex-start;
    }
    
    .meta-item {
        font-size: 0.8rem;
    }
}



.avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius);
    padding: 1rem;
    min-width: 200px;
    display: none;
    z-index: 100;
}

.user-menu:hover .dropdown {
    display: block;
}

.dropdown a {
    display: block;
    padding: 10px 15px;
    color: var(--dark);
    text-decoration: none;
    transition: var(--transition);
    border-radius: var(--radius-sm);
    font-weight: 500;
}

.dropdown a:hover {
    background: var(--light);
    color: var(--primary);
}

/* ===== МОБИЛЬНАЯ ВЕРСИЯ ===== */
@media (max-width: 768px) {
    .navbar {
        padding: 0.5rem 0;
    }
    
    .nav-links {
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    
    .nav-link {
        font-size: 0.8rem;
        padding: 0.3rem 0.5rem;
        background: #f0f2f5;
        border-radius: 20px;
    }
    
    .nav-link i {
        margin-right: 0;
    }
    
    .nav-link span {
        display: none; /* Прячем текст на мобильных, оставляем иконки */
    }
    
    .nav-link i {
        font-size: 1.1rem;
    }
    
    /* Профиль на мобильных */
    .user-menu {
        padding: 5px;
        background: transparent;
    }
    
    .user-menu span {
        display: none; /* Прячем имя */
    }
    
    .avatar-sm {
        width: 35px;
        height: 35px;
        border: 2px solid var(--primary);
    }
    
    /* Скрываем выпадающее меню на мобильных по умолчанию */
    .user-menu .dropdown {
        display: none !important; /* Полностью скрываем на мобильных */
    }
    
    /* Стили для тренерских кнопок на мобильных */
    .btn-elegant.btn-primary.btn-sm {
        padding: 0.3rem 0.6rem;
        font-size: 0.7rem;
        white-space: nowrap;
    }
}

/* Для планшетов */
@media (min-width: 769px) and (max-width: 1024px) {
    .nav-links {
        gap: 1rem;
    }
    
    .nav-link {
        font-size: 0.9rem;
    }
    
    .user-menu span {
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}
/* ===== КОМПАКТНЫЙ НАВБАР ДЛЯ АДМИНОВ ===== */
@media (min-width: 1025px) {
    .navbar {
        padding: 0.7rem 0;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .nav-link {
        font-size: 0.9rem;
        padding: 6px 14px;
    }
    
    .nav-link i {
        font-size: 0.95rem;
    }
    
    .btn-elegant.btn-sm {
        padding: 6px 14px;
        font-size: 0.85rem;
    }
    
    .user-menu {
        padding: 5px 15px;
        gap: 8px;
    }
    
    .avatar-sm {
        width: 30px;
        height: 30px;
    }
    
    .user-name {
        font-size: 0.9rem;
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .dropdown-arrow {
        font-size: 0.65rem;
    }
}

/* Очень большие экраны */
@media (min-width: 1440px) {
    .navbar .container {
        max-width: 1400px;
    }
}

/* ===== ПЕРЕНОС КНОПОК НА МОБИЛЬНЫХ ===== */
@media (max-width: 768px) {
    .workout-card-footer {
        flex-direction: column;
        gap: 10px;
    }
    
    .workout-card-footer .btn-elegant,
    .workout-card-footer .btn,
    .workout-card-footer .btn-sm {
        width: 100%;
        margin: 0;
    }
}
/* ===== ИСПРАВЛЕНИЕ КНОПОК В КАРТОЧКАХ ПРОГРАММ ===== */
@media (max-width: 768px) {
    .workout-card-footer {
        flex-direction: column !important;
        gap: 10px !important;
        padding: 15px !important;
        width: 100% !important;
    }
    
    .workout-card-footer .btn-elegant,
    .workout-card-footer .btn-sm {
        width: 100% !important;
        margin: 0 !important;
        padding: 12px 15px !important;
        font-size: 1rem !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }
    
    /* Убираем лишние отступы */
    .workout-card-footer .btn-elegant:last-child {
        margin-bottom: 0 !important;
    }
}
/* ===== УМЕНЬШАЕМ КНОПКИ В НАВБАРЕ НА МОБИЛЬНЫХ ===== */
@media (max-width: 768px) {
    .navbar .nav-links {
        gap: 5px;
    }
    
    .navbar .nav-link {
        padding: 6px 8px !important;
        font-size: 0.8rem !important;
    }
    
    .navbar .nav-link i {
        font-size: 0.9rem !important;
        margin-right: 3px;
    }
    
    .navbar .btn-elegant,
    .navbar .btn-sm,
    .navbar .btn-primary,
    .navbar .btn-outline {
        padding: 6px 10px !important;
        font-size: 0.8rem !important;
    }
    
    .navbar .btn-elegant i,
    .navbar .btn-sm i,
    .navbar .btn-primary i,
    .navbar .btn-outline i {
        font-size: 0.9rem !important;
    }
    
    /* Уменьшаем аватар */
    .navbar .avatar-sm {
        width: 28px !important;
        height: 28px !important;
    }
    
    /* Убираем текст у некоторых кнопок если совсем не влезает */
    .navbar .nav-link span {
        display: none;
    }
    
    .navbar .nav-link i {
        margin-right: 0;
    }
}
/* ===== СТИЛИ ДЛЯ ТРЕНИРОВКИ ===== */
.workout-header-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 20px;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.workout-title-section h1 {
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.02em;
}

.day-indicator {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    width: fit-content;
}

.day-indicator i {
    font-size: 1.2rem;
}

.day-indicator span {
    font-weight: 600;
    font-size: 1.1rem;
}

.timer-box {
    background: rgba(0,0,0,0.2);
    padding: 1rem 2rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
    border: 2px solid rgba(255,255,255,0.3);
}

.timer-box i {
    color: #fcc419;
}

.progress-box {
    margin-top: 1.5rem;
    width: 100%;
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

/* Желтый прогресс-бар */
.progress-box .progress-bar {
    height: 10px;
    background: rgba(255,255,255,0.2);
    border-radius: 5px;
    overflow: hidden;
}

.progress-box .progress-fill {
    height: 100%;
    background: #fcc419;
    border-radius: 5px;
    transition: width 0.5s ease;
}

/* Большой GIF */
.exercise-card {
    background: white;
    border-radius: 25px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
}

.exercise-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.exercise-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0;
    color: var(--dark);
}

.exercise-counter-badge {
    background: var(--primary);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(74, 118, 168, 0.3);
}

.gif-large {
    text-align: center;
    margin: 2rem 0;
    background: var(--light);
    border-radius: 20px;
    padding: 1.5rem;
    border: 2px dashed var(--border);
}

.gif-large img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.exercise-params-row {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.param-pill {
    background: var(--light);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.1rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.param-pill i {
    color: var(--primary);
    font-size: 1.2rem;
}

.param-pill strong {
    font-size: 1.2rem;
    color: var(--primary);
    margin-left: 0.3rem;
}

.description-box {
    background: var(--light);
    padding: 1.5rem;
    border-radius: 15px;
    margin: 1.5rem 0;
    border-left: 4px solid var(--primary);
    line-height: 1.6;
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    gap: 1rem;
}

.btn-next {
    background: var(--primary);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-next:hover {
    background: var(--primary-dark);
    transform: translateX(5px);
    box-shadow: var(--shadow);
}

.btn-prev {
    background: white;
    color: var(--primary);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.3s ease;
    border: 2px solid var(--primary);
}

.btn-prev:hover {
    background: var(--primary);
    color: white;
    transform: translateX(-5px);
}

.empty-day-card {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.empty-day-card i {
    font-size: 4rem;
    color: var(--gray);
    margin-bottom: 1rem;
}

.empty-day-card h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.summary-card {
    background: white;
    border-radius: 25px;
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.summary-card h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.body-weight-input {
    max-width: 300px;
    margin: 2rem auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.body-weight-input input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid var(--border);
    border-radius: 50px;
    font-size: 1rem;
}

.body-weight-input span {
    font-weight: 600;
    color: var(--primary);
}

@media (max-width: 768px) {
    .workout-header-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .exercise-header h2 {
        font-size: 1.6rem;
    }
    
    .nav-buttons {
        flex-direction: column;
    }
    
    .btn-prev, .btn-next {
        width: 100%;
        justify-content: center;
    }
}
/* ===== ИСПРАВЛЕНИЕ ДЛЯ БЛОКА ПРОДОЛЖИТЬ ТРЕНИРОВКУ ===== */
.workout-mini-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 3px solid transparent;
    background: #f8f9fa;
}

.workout-mini-card:hover {
    transform: translateX(5px);
    border-left-color: #4a76a8;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    background: #f8f9fa; /* Фиксированный фон без изменения */
}

/* ===== ЦЕНТРИРОВАНИЕ УПРАЖНЕНИЙ ===== */
.exercises-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin: 0 auto;
    justify-content: center;
}

/* ===== СЧЕТЧИК ПРОХОЖДЕНИЙ ===== */
.workout-meta .meta-item:last-child {
    margin-left: auto;
}

@media (max-width: 768px) {
    .workout-meta .meta-item:last-child {
        margin-left: 0;
    }
}