/* Современный дизайн в стиле скриншота с синими тонами */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #4c51bf 50%, #2d3748 100%);
    min-height: 100vh;
    color: #1a202c;
    line-height: 1.6;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* Карточки в стиле скриншота */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* Заголовки */
.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.header h1 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 12px;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.5px;
}

.header p {
    font-size: 18px;
    opacity: 0.9;
    font-weight: 400;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Кнопки в стиле скриншота */
.button {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    border: none;
    padding: 18px 28px;
    border-radius: 20px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    margin-bottom: 16px;
    box-shadow: 0 8px 25px rgba(66, 153, 225, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.button:hover::before {
    opacity: 1;
}

.button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(66, 153, 225, 0.6);
}

.button:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(66, 153, 225, 0.4);
}

.button:disabled {
    background: linear-gradient(135deg, #a0aec0 0%, #718096 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Второстепенные кнопки */
.button.secondary {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
    color: white;
}

.button.secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 12px 30px rgba(255, 255, 255, 0.2);
}

.button.danger {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    box-shadow: 0 8px 25px rgba(245, 101, 101, 0.4);
}

.button.danger:hover {
    box-shadow: 0 12px 30px rgba(245, 101, 101, 0.6);
}

/* Категории */
.category {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 600;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

/* Упражнения */
.exercise-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.exercise-item:hover {
    background: rgba(66, 153, 225, 0.05);
    margin: 0 -28px;
    padding: 24px 28px;
    border-radius: 16px;
}

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

.exercise-content {
    display: flex;
    align-items: center;
    flex: 1;
}

.exercise-info {
    flex: 1;
}

.exercise-name {
    font-weight: 700;
    font-size: 19px;
    margin-bottom: 6px;
    color: #1a202c;
    letter-spacing: -0.3px;
}

.exercise-photo {
    width: 90px;
    height: 90px;
    border-radius: 20px;
    overflow: hidden;
    margin-right: 20px;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border: 3px solid rgba(255, 255, 255, 0.8);
}

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

/* Поля ввода */
input, select, textarea {
    width: 100%;
    padding: 18px 20px;
    border: 2px solid rgba(66, 153, 225, 0.2);
    border-radius: 16px;
    font-size: 16px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #1a202c;
    font-weight: 500;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 6px rgba(66, 153, 225, 0.15);
    background: rgba(255, 255, 255, 0.98);
}

input::placeholder, textarea::placeholder {
    color: #a0aec0;
    font-weight: 400;
}

/* Сообщения */
.loading {
    text-align: center;
    padding: 48px;
    color: white;
    font-size: 17px;
    font-weight: 500;
}

.error {
    background: linear-gradient(135deg, #fc8181 0%, #f56565 100%);
    color: white;
    padding: 20px;
    border-radius: 16px;
    margin: 20px 0;
    box-shadow: 0 8px 20px rgba(245, 101, 101, 0.3);
    font-weight: 600;
}

.success {
    background: linear-gradient(135deg, #68d391 0%, #48bb78 100%);
    color: white;
    padding: 20px;
    border-radius: 16px;
    margin: 20px 0;
    box-shadow: 0 8px 20px rgba(72, 187, 120, 0.3);
    font-weight: 600;
}

/* История тренировок */
.workout-day {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.workout-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(66, 153, 225, 0.2);
}

.workout-day-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a202c;
    letter-spacing: -0.3px;
}

.workout-day-stats {
    font-size: 15px;
    color: #4a5568;
    font-weight: 600;
}

.exercise-in-history {
    background: rgba(66, 153, 225, 0.05);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(66, 153, 225, 0.1);
}

.exercise-in-history:hover {
    background: rgba(66, 153, 225, 0.1);
    transform: translateX(6px);
    box-shadow: 0 8px 20px rgba(66, 153, 225, 0.2);
}

/* Иконки упражнений */
.exercise-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-right: 18px;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 3px solid rgba(255, 255, 255, 0.8);
}

.exercise-icon:hover {
    transform: scale(1.1) rotate(5deg);
}

.exercise-icon.photo {
    background: white;
    border: 3px solid rgba(66, 153, 225, 0.3);
}

.exercise-icon.placeholder {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
}

/* Анимации */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(30px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes slideIn {
    from { 
        opacity: 0; 
        transform: translateX(-30px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

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

.fade-in {
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in {
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.pulse {
    animation: pulse 2s infinite;
}

/* Улучшенная структура интерфейса */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 24px;
    text-align: center;
    color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(255, 255, 255, 0.2);
}

.stat-number {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 500;
}

/* Навигация */
.nav-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-tab {
    flex: 1;
    padding: 12px 16px;
    border-radius: 16px;
    background: transparent;
    border: none;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

.nav-tab:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-tab.active {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.4);
}

/* Форма добавления упражнения */
.form-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Медиа запросы */
@media (max-width: 640px) {
    .container {
        padding: 16px;
    }
    
    .header h1 {
        font-size: 32px;
    }
    
    .card {
        padding: 24px;
        border-radius: 20px;
    }
    
    .button {
        padding: 16px 24px;
        font-size: 16px;
    }
    
    .exercise-photo {
        width: 70px;
        height: 70px;
        border-radius: 16px;
    }
    
    .exercise-name {
        font-size: 17px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Прокрутка */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(66, 153, 225, 0.6);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(66, 153, 225, 0.8);
}

/* Улучшенные тени и эффекты */
.glow {
    box-shadow: 0 0 20px rgba(66, 153, 225, 0.4);
}

.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}
