/* base.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-dashboard);
    color: var(--dark);
    line-height: 1.6;
    overflow: hidden;
    height: 100vh;
    height: 100dvh; /* Динамическая высота viewport для мобильных */
    margin: 0;
    padding: 0;
}

.container {
    max-width: 420px;
    margin: 0 auto;
    height: 100vh;
    height: 100dvh;
    background: var(--white);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.header {
    background: var(--gradient-primary);
    color: white;
    padding: 8px 32px 10px;
    border-radius: 0 0 12px 12px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    margin: 0 16px;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.header-top {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 6px;
}

.logo {
    font-size: 16px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 4px;
}

.back-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
    display: none;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 20px;
}

.back-btn.visible {
    display: flex;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.welcome-text {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
    position: relative;
}

.subtitle {
    font-size: 11px;
    opacity: 0.9;
    font-weight: 400;
}

.main-content {
    flex: 1;
    padding: 16px 32px 100px;
    overflow: hidden;
}

#nutrition .main-content,
#workouts .main-content {
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
}

#nutrition .main-content::-webkit-scrollbar,
#workouts .main-content::-webkit-scrollbar,
#active-workout .main-content::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* Защита видео от скачивания */
.exercise-video video {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    pointer-events: auto;
}

.exercise-video video::-webkit-media-controls-download-button {
    display: none;
}

.exercise-video video::-webkit-media-controls-fullscreen-button {
    display: none;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.screen {
    display: none;
    height: 100vh;
    flex-direction: column;
}

.screen.active {
    display: flex;
    animation: slideIn 0.3s ease-out;
}

.hidden {
    display: none !important;
}

/* Dashboard uses its own hero header, hide default .header */
#dashboard > .header {
    display: none !important;
}

.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-gray { color: var(--gray); }

