/**
 * style.css - Design do Site de Treinos
 * 
 * Este arquivo define todo o estilo visual da aplicação, incluindo:
 * 1. Temas dinâmicos baseados no body.theme-male e body.theme-female usando CSS Custom Properties (Variáveis).
 * 2. Estilização moderna e limpa usando a fonte Outfit e design Dark Mode Premium.
 * 3. Efeitos de Glassmorphism (efeito vidro embaçado) com gradientes discretos.
 * 4. Responsividade total para smartphones, tablets e desktops.
 * 5. Micro-animações para transições de cliques e hovers nos botões e cards.
 * 
 * Todos os códigos contêm comentários em português explicativos.
 */

/* ==========================================
   CONFIGURAÇÃO DE FONTES & RESET DE ESTILOS
   ========================================== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    -webkit-tap-highlight-color: transparent; /* Remove o highlight azul padrão do mobile ao clicar */
}

/* ==========================================
   VARIÁVEIS DE COR E TEMAS (CSS CUSTOM PROPS)
   ========================================== */
:root {
    /* Cores neutras base de fundo escuro */
    --bg-dark-base: #0f111a;
    --bg-card: rgba(26, 29, 46, 0.7);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --shadow-color: rgba(0, 0, 0, 0.4);
    --transition-speed: 0.3s;
    
    /* Configuração inicial padrão (Tema Masculino) */
    --accent-color: #00d2ff;
    --accent-glow: rgba(0, 210, 255, 0.15);
    --accent-gradient: linear-gradient(135deg, #00d2ff 0%, #0066ff 100%);
    --accent-rgb: 0, 210, 255;
}

/* Tema Masculino (Ativado por classe no body) */
body.theme-male {
    --bg-dark-base: #090d16;
    --bg-card: rgba(18, 25, 41, 0.75);
    --accent-color: #00d2ff;
    --accent-glow: rgba(0, 210, 255, 0.15);
    --accent-gradient: linear-gradient(135deg, #00d2ff 0%, #0066ff 100%);
    --accent-rgb: 0, 210, 255;
    background-color: var(--bg-dark-base);
}

/* Tema Feminino (Ativado por classe no body) */
body.theme-female {
    --bg-dark-base: #120b14;
    --bg-card: rgba(31, 18, 36, 0.75);
    --accent-color: #ff3385;
    --accent-glow: rgba(255, 51, 133, 0.15);
    --accent-gradient: linear-gradient(135deg, #ff3385 0%, #a800ff 100%);
    --accent-rgb: 255, 51, 133;
    background-color: var(--bg-dark-base);
}

/* ==========================================
   ESTRUTURA GERAL DO SITE
   ========================================== */
body {
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
    background-attachment: fixed;
    /* Adiciona um gradiente radial de fundo para dar sensação de profundidade */
    background-image: radial-gradient(circle at 50% 0%, rgba(var(--accent-rgb), 0.08) 0%, transparent 60%);
    transition: background-color var(--transition-speed) ease, background-image var(--transition-speed) ease;
}

.app-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 16px 140px 16px; /* Padding extra embaixo para não cobrir com o widget flutuante */
}

/* Cabeçalho do Aplicativo */
header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    text-align: center;
}

.logo-section h1 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 30%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.logo-section p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 4px;
}

/* ==========================================
   INTERRUPTOR DE GÊNERO (CARDS SELETORES)
   ========================================== */
.gender-selector {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 6px;
    border-radius: 30px;
    width: 280px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.gender-btn {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    padding: 10px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
}

/* Cores e efeitos ativos dos botões de Gênero */
.gender-btn.active#btn-gender-male {
    background: linear-gradient(135deg, #00d2ff 0%, #0066ff 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(0, 210, 255, 0.3);
}

.gender-btn.active#btn-gender-female {
    background: linear-gradient(135deg, #ff3385 0%, #a800ff 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(255, 51, 133, 0.3);
}

.gender-btn:not(.active):hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* ==========================================
   SELETOR DE DIAS (TABS HORIZONTAIS)
   ========================================== */
.days-nav-wrapper {
    margin-bottom: 28px;
    overflow-x: auto;
    scrollbar-width: none; /* Oculta a barra de rolagem no Firefox */
    padding-bottom: 4px;
}

.days-nav-wrapper::-webkit-scrollbar {
    display: none; /* Oculta a barra de rolagem no Chrome/Safari */
}

.days-tabs {
    display: flex;
    gap: 12px;
    width: 100%;
}

.day-tab-btn {
    flex: 1;
    min-width: 110px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 12px 10px;
    border-radius: 16px;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.day-tab-btn .day-number {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.day-tab-btn .day-muscle {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    text-align: center;
}

/* Estado ativo do botão de Dia */
.day-tab-btn.active {
    border-color: var(--accent-color);
    box-shadow: 0 0 15px var(--accent-glow);
    background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.15) 0%, rgba(var(--accent-rgb), 0.02) 100%);
    transform: translateY(-2px);
}

.day-tab-btn:hover:not(.active) {
    border-color: rgba(var(--accent-rgb), 0.4);
    transform: translateY(-1px);
}

/* ==========================================
   BARRA DE PROGRESSO GLOBAL DO DIA
   ========================================== */
.progress-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 16px 20px;
    border-radius: 20px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.progress-header span {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.progress-header #progress-percentage {
    color: var(--accent-color);
    font-weight: 700;
    font-size: 1.1rem;
    text-shadow: 0 0 10px var(--accent-glow);
}

.progress-bar-container {
    height: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.02);
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--accent-gradient);
    border-radius: 10px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px var(--accent-color);
}

/* Animação de brilho quando o treino chega em 100% */
@keyframes completedPulse {
    0% { filter: drop-shadow(0 0 2px var(--accent-color)); }
    50% { filter: drop-shadow(0 0 10px var(--accent-color)); }
    100% { filter: drop-shadow(0 0 2px var(--accent-color)); }
}

.progress-bar-fill.completed-glow {
    animation: completedPulse 2s infinite ease-in-out;
}

/* ==========================================
   DETALHES E METADADOS DO TREINO
   ========================================== */
.workout-info-header {
    margin-bottom: 20px;
}

.workout-day-badge {
    display: inline-block;
    color: var(--accent-color);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 2px;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.workout-target-group {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.workout-meta-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(255, 255, 255, 0.02);
    border-left: 3px solid var(--accent-color);
    padding: 10px 14px;
    border-radius: 0 8px 8px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.workout-meta-box svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--accent-color);
}

/* Títulos de Subseções (Ex: Ombros, Bíceps) */
.workout-section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 24px 0 12px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    letter-spacing: 0.5px;
}

/* ==========================================
   CARDS DE EXERCÍCIO
   ========================================== */
.exercises-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.exercise-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

/* Efeito de hover no card de exercício */
.exercise-card:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--accent-rgb), 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25), 0 0 10px rgba(var(--accent-rgb), 0.05);
}

/* Estado do card marcado como concluído (Checkado) */
.exercise-card.checked {
    border-color: rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
    box-shadow: none;
    transform: none;
}

.exercise-card.checked .exercise-name {
    text-decoration: line-through;
    color: var(--text-muted);
}

.exercise-card.checked .series-value {
    color: var(--text-muted);
}

.exercise-card.checked .exercise-badge {
    opacity: 0.4;
}

.exercise-card-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

/* Wrapper customizado para checkbox redondo moderno */
.checkbox-wrapper {
    position: relative;
    width: 26px;
    height: 26px;
}

.checkbox-wrapper input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    cursor: pointer;
}

.checkbox-custom {
    position: absolute;
    top: 0;
    left: 0;
    height: 26px;
    width: 26px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkbox-custom svg {
    width: 14px;
    height: 14px;
    color: #ffffff;
    opacity: 0;
    transform: scale(0.6);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Checkbox hovered */
.checkbox-wrapper:hover .checkbox-custom {
    border-color: var(--accent-color);
    box-shadow: 0 0 8px var(--accent-glow);
}

/* Checkbox checked */
.checkbox-wrapper input[type="checkbox"]:checked + .checkbox-custom {
    background: var(--accent-gradient);
    border-color: transparent;
    box-shadow: 0 2px 10px var(--accent-glow);
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkbox-custom svg {
    opacity: 1;
    transform: scale(1);
}

/* Detalhes do Exercício */
.exercise-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.exercise-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: color 0.2s ease;
}

/* Emblemas de tipos de exercícios */
.exercise-badge {
    display: inline-block;
    align-self: flex-start;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.badge-composto {
    background: rgba(var(--accent-rgb), 0.1);
    color: var(--accent-color);
}

.badge-isolador {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

.badge-isometria {
    background: rgba(234, 179, 8, 0.1);
    color: #eab308;
}

/* Parte Direita do Card */
.exercise-card-right {
    text-align: right;
    flex-shrink: 0;
}

.series-info {
    display: flex;
    flex-direction: column;
}

.series-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.series-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--accent-color);
    transition: color 0.2s ease;
}

/* ==========================================
   CIRCUITOS E FINALIZAÇÃO METABÓLICA
   ========================================== */
.circuit-panel {
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.08) 0%, rgba(0, 0, 0, 0) 100%), var(--bg-card);
    border: 1px dashed rgba(var(--accent-rgb), 0.3);
    border-radius: 20px;
    padding: 20px;
    margin-top: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.circuit-header {
    margin-bottom: 16px;
}

.circuit-badge {
    display: inline-block;
    background: var(--accent-gradient);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 20px;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.circuit-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.circuit-rules {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.circuit-rounds {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 6px 12px;
    display: inline-block;
    margin-bottom: 16px;
}

.rounds-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-color);
}

.circuit-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.circuit-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 10px 16px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.circuit-ex-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.circuit-ex-qty {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-color);
}

/* ==========================================
   WIDGET FLUTUANTE DO CRONÔMETRO (ESTILO WATCH)
   ========================================== */
.timer-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: rgba(15, 17, 26, 0.85);
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 15px rgba(var(--accent-rgb), 0.15);
    border-radius: 24px;
    padding: 16px;
    width: 300px;
    z-index: 100;
    backdrop-filter: blur(20px);
    /* Transição suave de todas as propriedades (incluindo altura ao colapsar) usando curva de animação premium */
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1), border-color var(--transition-speed) ease;
    /* Impede que o conteúdo interno transborde durante as animações de expansão/colapso */
    overflow: hidden;
}

/* Oculta o corpo do cronômetro quando a classe 'collapsed' estiver ativa no desktop */
.timer-widget.collapsed {
    padding-bottom: 12px;
}

.timer-widget.collapsed .timer-body {
    height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    margin: 0;
}

/* Rotaciona a seta do cabeçalho indicando o estado colapsado */
.timer-widget.collapsed .timer-toggle-btn svg {
    transform: rotate(180deg);
}

/* Remove a margem inferior do cabeçalho quando colapsado para manter alinhado */
.timer-widget.collapsed .timer-widget-header {
    margin-bottom: 0;
}

/* Pulsação quando clica em algum exercício */
@keyframes timerPulse {
    0% { transform: scale(1) translateY(0); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 15px rgba(var(--accent-rgb), 0.15); }
    50% { transform: scale(1.05) translateY(-5px); box-shadow: 0 15px 50px rgba(0, 0, 0, 0.6), 0 0 25px rgba(var(--accent-rgb), 0.4); }
    100% { transform: scale(1) translateY(0); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 15px rgba(var(--accent-rgb), 0.15); }
}

.timer-widget.pulse-highlight {
    animation: timerPulse 0.8s ease-in-out;
}

/* Cor especial quando o timer termina de rodar */
@keyframes timerEndFlash {
    0% { border-color: var(--accent-color); background: rgba(var(--accent-rgb), 0.2); }
    50% { border-color: #ef4444; background: rgba(239, 68, 68, 0.3); }
    100% { border-color: var(--border-color); background: rgba(15, 17, 26, 0.85); }
}

.timer-widget.timer-finished {
    animation: timerEndFlash 1s infinite alternate;
}

.timer-widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.timer-title {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.timer-title svg {
    color: var(--accent-color);
}

.timer-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

/* Área do display de tempo e controle */
.timer-timer-area {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    padding: 10px 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.timer-time-display {
    font-size: 2.2rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums; /* Evita que o texto trema enquanto os segundos rodam */
    letter-spacing: -1px;
    color: var(--text-primary);
}

.timer-actions {
    display: flex;
    gap: 8px;
}

/* Botões do Timer */
.timer-btn {
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.timer-btn-primary {
    background: var(--accent-gradient);
    color: #ffffff;
    box-shadow: 0 4px 10px var(--accent-glow);
}

.timer-btn-primary.running {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    box-shadow: none;
}

.timer-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.timer-btn:hover {
    transform: scale(1.08);
}

.timer-btn-primary:hover {
    box-shadow: 0 6px 15px var(--accent-color);
}

.timer-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* Linha de progresso no topo do widget do timer */
.timer-progress-track {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.timer-bar-fill {
    width: 0%;
    height: 100%;
    background: var(--accent-color);
    transition: width 1s linear;
}

/* Opções rápidas de segundos (presets) */
.timer-presets {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 6px;
}

.timer-btn-preset {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.timer-btn-preset:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: rgba(var(--accent-rgb), 0.3);
}

.timer-btn-preset.selected {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: rgba(var(--accent-rgb), 0.05);
}

/* ==========================================
   BOTÃO DE APAGAR HISTÓRICO
   ========================================== */
.reset-history-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.btn-reset-workout {
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-reset-workout:hover {
    background: rgba(239, 68, 68, 0.08);
    border-color: #ef4444;
    transform: translateY(-1px);
}

.btn-reset-workout svg {
    width: 16px;
    height: 16px;
}

/* ==========================================
   RESPONSIVIDADE (MEDIA QUERIES)
   ========================================== */

/* Telas menores (Mobile) */
@media (max-width: 600px) {
    .app-container {
        padding-top: 16px;
        padding-bottom: 160px; /* Mais espaço para o timer flutuante no celular */
    }
    
    header {
        margin-bottom: 24px;
    }
    
    .logo-section h1 {
        font-size: 1.8rem;
    }
    
    .workout-target-group {
        font-size: 1.4rem;
    }
    
    .day-tab-btn {
        min-width: 90px;
        padding: 10px 6px;
    }
    
    .day-tab-btn .day-number {
        font-size: 0.7rem;
    }
    
    .day-tab-btn .day-muscle {
        font-size: 0.75rem;
    }
    
    .exercise-card {
        padding: 12px 16px;
        border-radius: 14px;
    }
    
    .exercise-name {
        font-size: 0.95rem;
    }
    
    .series-value {
        font-size: 0.95rem;
    }
}

/* ===================================================================
   SISTEMA DE VIEWS (SPA) E CONTROLE DE EXIBIÇÃO
   =================================================================== */
/* Classe que define a transição suave e animação ao alternar de tela */
.app-view {
    transition: opacity 0.25s ease-in-out, transform 0.25s ease-in-out;
}

/* Classe para ocultar telas inativas */
.app-view.hidden {
    display: none !important;
    opacity: 0;
    transform: translateY(10px);
}

/* Classe para exibir a tela ativa */
.app-view.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* ===================================================================
   BARRA DE NAVEGAÇÃO SUPERIOR DO APLICATIVO
   =================================================================== */
.nav-bar {
    position: sticky;
    top: 0;
    z-index: 90;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: rgba(15, 17, 26, 0.8);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
}

/* Botão para retornar à tela inicial (Hub) */
.nav-back-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.nav-back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-glow);
}

.nav-back-btn svg {
    transition: transform 0.2s ease;
}

.nav-back-btn:hover svg {
    transform: translateX(-2px);
}

.nav-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-primary);
    text-transform: uppercase;
}

.nav-logo {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ===================================================================
   TELA INICIAL: HUB PRINCIPAL (CARDS E ESTATÍSTICAS)
   =================================================================== */
.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

/* Cards interativos de navegação do Hub */
.hub-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

/* Efeito luminoso de fundo no hover do card */
.hub-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.08) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hub-card:hover {
    transform: translateY(-4px);
    border-color: rgba(var(--accent-rgb), 0.4);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25), 0 0 20px rgba(var(--accent-rgb), 0.1);
}

.hub-card:hover::before {
    opacity: 1;
}

.hub-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: rgba(var(--accent-rgb), 0.08);
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.1);
    transition: all 0.3s ease;
}

.hub-card:hover .hub-card-icon {
    background: var(--accent-gradient);
    color: #ffffff;
    box-shadow: 0 6px 16px var(--accent-glow);
    transform: scale(1.05);
}

.hub-card-info h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.hub-card-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.hub-card-badge {
    align-self: flex-start;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 4px;
}

.hub-card-badge::after {
    content: '→';
    transition: transform 0.2s ease;
}

.hub-card:hover .hub-card-badge::after {
    transform: translateX(4px);
}

/* Painel de Resumo Semanal no Hub */
.hub-summary-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 20px 24px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.hub-summary-panel h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.summary-stats-grid {
    display: flex;
    gap: 16px;
}

.summary-stat-box {
    flex: 1;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.summary-stat-box .stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--accent-color);
    text-shadow: 0 0 10px var(--accent-glow);
}

.summary-stat-box .stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-align: center;
}

/* ===================================================================
   SELETORES DE NÍVEL DE INTENSIDADE E BOTÕES ADICIONAIS
   =================================================================== */
.level-selector-wrapper {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.section-subtitle {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.level-selector {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 4px;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 450px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

.level-btn {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    padding: 10px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.level-btn.active {
    background: var(--accent-gradient);
    color: #ffffff;
    box-shadow: 0 4px 12px var(--accent-glow);
}

.level-btn:not(.active):hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.workout-actions-wrapper {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 32px;
}

/* Botão para customizar treinos */
.btn-custom-workout {
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.15) 0%, rgba(var(--accent-rgb), 0.05) 100%);
    border: 1px solid rgba(var(--accent-rgb), 0.3);
    color: var(--accent-color);
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-custom-workout:hover {
    background: var(--accent-gradient);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 12px var(--accent-glow);
    transform: translateY(-1px);
}

/* Botão para restaurar o treino padrão do dia selecionado (tom laranja-âmbar harmonioso com o tema escuro) */
.btn-restore-default {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.05) 100%);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #f59e0b;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-restore-default:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
    transform: translateY(-1px);
}

.btn-restore-default svg {
    width: 16px;
    height: 16px;
}

/* ===================================================================
   FORMULÁRIOS E CALCULADORA DE IMC (EVOLUÇÃO FÍSICA)
   =================================================================== */
.progress-form-panel, .imc-calculator-panel, .history-panel, .diet-presets-panel, .custom-diet-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 24px;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.progress-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input, .form-group select, .form-group textarea {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    width: 100%;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 10px var(--accent-glow);
}

/* Botões padrões de envio de formulário */
.btn-submit-form {
    background: var(--accent-gradient);
    border: none;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px var(--accent-glow);
    text-align: center;
}

.btn-submit-form:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

/* Área de resultados da calculadora de IMC */
.imc-result-wrapper {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
}

.imc-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 4px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.02);
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Cores de status de peso do IMC */
.imc-circle.imc-underweight { border-color: #3b82f6; box-shadow: 0 0 15px rgba(59, 130, 246, 0.25); }
.imc-circle.imc-normal { border-color: #10b981; box-shadow: 0 0 15px rgba(16, 185, 129, 0.25); }
.imc-circle.imc-overweight { border-color: #f59e0b; box-shadow: 0 0 15px rgba(245, 158, 11, 0.25); }
.imc-circle.imc-obese { border-color: #ef4444; box-shadow: 0 0 15px rgba(239, 68, 68, 0.25); }

#imc-number {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
}

.imc-circle .imc-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.imc-feedback h4 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.imc-feedback p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Pointer indicador sobre a barra de IMC */
.imc-bar-container {
    position: relative;
    padding-top: 10px;
}

.imc-bar-pointer {
    position: absolute;
    top: -2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
    transform: translateX(-50%);
    transition: left 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.imc-bar-segments {
    display: flex;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.imc-segment {
    flex: 1;
}

.segment-underweight { background: #3b82f6; }
.segment-normal { background: #10b981; }
.segment-overweight { background: #f59e0b; }
.segment-obese { background: #ef4444; }

/* Histórico de registros físicos */
.history-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-item-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.history-item-left .date {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-color);
}

.history-item-left .metrics {
    font-size: 0.95rem;
    color: var(--text-primary);
}

.history-item-right {
    text-align: right;
    display: flex;
    align-items: center;
    gap: 12px;
}

.history-imc-badge {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
}

.history-imc-badge.imc-underweight { color: #3b82f6; border-color: rgba(59, 130, 246, 0.3); }
.history-imc-badge.imc-normal { color: #10b981; border-color: rgba(16, 185, 129, 0.3); }
.history-imc-badge.imc-overweight { color: #f59e0b; border-color: rgba(245, 158, 11, 0.3); }
.history-imc-badge.imc-obese { color: #ef4444; border-color: rgba(239, 68, 68, 0.3); }

/* Botão de excluir registro físico */
.btn-delete-record {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.btn-delete-record:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.history-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 24px 0;
    font-size: 0.95rem;
}

/* ===================================================================
   ESTILOS DE DIETAS E CARDÁPIOS
   =================================================================== */
.diet-presets-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 4px;
    border-radius: 16px;
    margin-bottom: 20px;
}

.diet-tab-btn {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    padding: 10px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
}

.diet-tab-btn.active {
    background: var(--accent-gradient);
    color: #ffffff;
    box-shadow: 0 4px 12px var(--accent-glow);
}

.diet-tab-btn:hover:not(.active) {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.diet-preset-details {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
}

.diet-preset-details h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 8px;
}

.diet-preset-details p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
}

.diet-preset-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.diet-preset-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-bottom: 10px;
}

.diet-preset-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.diet-preset-item strong {
    font-size: 0.85rem;
    color: var(--text-primary);
    text-transform: uppercase;
}

.diet-preset-item span {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.custom-diet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.custom-diet-header h3 {
    margin-bottom: 0;
}

.btn-edit-diet {
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.15) 0%, rgba(var(--accent-rgb), 0.05) 100%);
    border: 1px solid rgba(var(--accent-rgb), 0.3);
    color: var(--accent-color);
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-edit-diet:hover {
    background: var(--accent-gradient);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 12px var(--accent-glow);
}

.meals-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.meal-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    gap: 16px;
}

.meal-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(var(--accent-rgb), 0.08);
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.meal-card-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meal-card-content h4 {
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-primary);
}

.meal-card-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ===================================================================
   WIDGET FLUTUANTE DO SPOTIFY
   =================================================================== */
.spotify-widget {
    position: fixed;
    bottom: 24px;
    left: 24px;
    background: rgba(15, 17, 26, 0.85);
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 15px rgba(29, 185, 84, 0.1);
    border-radius: 24px;
    width: 300px;
    z-index: 100;
    backdrop-filter: blur(20px);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.spotify-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.01);
}

.spotify-logo-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.spotify-widget-title {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-primary);
}

.spotify-toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spotify-widget.collapsed .spotify-body {
    height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
    pointer-events: none;
}

.spotify-widget.collapsed .spotify-toggle-btn {
    transform: rotate(180deg);
}

.spotify-body {
    padding: 0 16px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Área não autenticada no Spotify */
.spotify-logged-out {
    text-align: center;
    padding: 12px 8px;
}

.spotify-logged-out p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 16px;
}

.btn-spotify-connect {
    background: #1DB954;
    border: none;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(29, 185, 84, 0.3);
    width: 100%;
}

.btn-spotify-connect:hover {
    background: #1ed760;
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(29, 185, 84, 0.4);
}

/* Área conectada no Spotify */
.spotify-user-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.spotify-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
}

.spotify-user-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.spotify-track-info {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 8px;
    border-radius: 16px;
}

.spotify-album-art {
    width: 54px;
    height: 54px;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.spotify-album-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.spotify-track-metadata {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.spotify-track-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spotify-track-artist {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spotify-playlists-select-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.spotify-select-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.spotify-select-dropdown {
    background: rgba(255, 255, 255, 0.03) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23b3b3b3" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" width="16" height="16"><polyline points="6 9 12 15 18 9"></polyline></svg>') no-repeat right 12px center;
    background-size: 16px;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 36px 10px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    cursor: pointer;
    outline: none;
    width: 100%;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    transition: all 0.25s ease;
}

.spotify-select-dropdown:focus {
    border-color: #1DB954;
    box-shadow: 0 0 10px rgba(29, 185, 84, 0.15);
}

/* Controle de volume integrado */
.spotify-volume-container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    margin-top: 4px;
}

.spotify-volume-icon {
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.spotify-volume-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.spotify-volume-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
}

.spotify-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    margin-top: -4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transition: all 0.15s ease;
}

.spotify-volume-slider:hover::-webkit-slider-thumb {
    background: #1DB954;
    transform: scale(1.2);
}

.spotify-volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border: none;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transition: all 0.15s ease;
}

.spotify-volume-slider:hover::-moz-range-thumb {
    background: #1DB954;
    transform: scale(1.2);
}

.spotify-volume-value {
    font-size: 0.75rem;
    color: var(--text-secondary);
    min-width: 32px;
    text-align: right;
    font-family: monospace;
}

.spotify-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
}

.spotify-media-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 50%;
}

.spotify-media-btn:hover {
    color: var(--text-primary);
    transform: scale(1.1);
}

.spotify-media-btn-play {
    background: #ffffff;
    color: #000000;
    width: 40px;
    height: 40px;
    box-shadow: 0 4px 10px rgba(255, 255, 255, 0.15);
}

.spotify-media-btn-play:hover {
    background: #1DB954;
    color: #ffffff;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(29, 185, 84, 0.3);
}

/* ===================================================================
   ESTILIZAÇÃO DE MODAIS
   =================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(9, 13, 22, 0.85);
    backdrop-filter: blur(12px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    transition: opacity 0.3s ease;
}

.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 28px;
    width: 100%;
    max-width: 500px;
    padding: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(var(--accent-rgb), 0.1);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    scrollbar-width: thin;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-bottom: 12px;
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.btn-close-modal {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s ease;
}

.btn-close-modal:hover {
    color: #ef4444;
}

.modal-dynamic-fields {
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.01);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-dynamic-fields .fields-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.custom-exercise-field-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.custom-exercise-field-row:last-child {
    margin-bottom: 0;
}

.custom-exercise-field-row input {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
}

.custom-ex-name-input {
    flex: 2;
}

.custom-ex-series-input {
    flex: 1;
}

.custom-ex-type-select {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85rem;
}

.btn-remove-row {
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-remove-row:hover {
    transform: scale(1.1);
}

.btn-add-field {
    background: transparent;
    border: 1px dashed rgba(var(--accent-rgb), 0.4);
    color: var(--accent-color);
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.btn-add-field:hover {
    background: rgba(var(--accent-rgb), 0.05);
    border-style: solid;
}

/* ===================================================================
   RESPONSIVIDADE ADICIONAL PARA NOVOS ELEMENTOS
   =================================================================== */
@media (max-width: 600px) {
    .nav-bar {
        padding: 10px 16px;
    }
    
    .nav-section-title {
        font-size: 0.95rem;
    }
    
    .nav-back-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .hub-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 12px;
    }
    
    .imc-result-wrapper {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 16px;
    }
    
    .diet-presets-tabs, .diet-presets-tabs .diet-tab-btn {
        font-size: 0.75rem;
    }
    
    .custom-diet-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .btn-edit-diet {
        width: 100%;
        text-align: center;
    }
    
    .custom-exercise-field-row {
        flex-wrap: wrap;
    }
    
    .custom-ex-name-input {
        width: 100%;
        flex: none;
    }
    
    .custom-ex-series-input {
        flex: 2;
    }
    
    .custom-ex-type-select {
        flex: 2;
    }
    
    /* ===================================================================
     * CONFIGURAÇÕES DE WIDGETS FLUTUANTES RESPONSIVOS (CELULAR)
     * =================================================================== */
     
    /* Estilização para o widget do Spotify colapsado no celular (Bolha FAB à Esquerda) */
    .spotify-widget.collapsed {
        bottom: 16px;
        left: 16px;
        right: auto;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        padding: 0;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 10px rgba(29, 185, 84, 0.2);
    }
    
    /* Centraliza o cabeçalho e o ícone do Spotify na bolha */
    .spotify-widget.collapsed .spotify-header {
        padding: 0;
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        background: transparent;
    }
    
    .spotify-widget.collapsed .spotify-logo-title {
        gap: 0;
        margin: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        height: 100%;
    }
    
    /* Aumenta levemente o ícone do Spotify para se destacar na bolha */
    .spotify-widget.collapsed .spotify-logo-title svg {
        width: 28px;
        height: 28px;
    }
    
    /* Oculta os textos e botões de seta do Spotify Connect na visualização de bolha */
    .spotify-widget.collapsed .spotify-widget-title,
    .spotify-widget.collapsed .spotify-toggle-btn {
        display: none !important;
    }
    
    /* Estilização para o widget do Cronômetro colapsado no celular (Bolha FAB à Direita) */
    .timer-widget.collapsed {
        bottom: 16px;
        right: 16px;
        left: auto;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        padding: 0;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 10px rgba(var(--accent-rgb), 0.2);
    }
    
    /* Oculta a linha de progresso do timer na bolha */
    .timer-widget.collapsed .timer-progress-track {
        display: none !important;
    }
    
    /* Centraliza o cabeçalho e o conteúdo do timer na bolha */
    .timer-widget.collapsed .timer-widget-header {
        padding: 0;
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 0;
    }
    
    .timer-widget.collapsed .timer-title {
        gap: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        height: 100%;
    }
    
    /* Oculta o texto do título do cronômetro completamente na visualização de bolha para não afetar o alinhamento */
    .timer-widget.collapsed .timer-title-text {
        display: none !important;
    }
    
    /* Aumenta o ícone de relógio na bolha */
    .timer-widget.collapsed .timer-title svg {
        width: 28px;
        height: 28px;
        margin: 0;
    }
    
    /* Oculta o botão de expandir do timer na bolha */
    .timer-widget.collapsed .timer-toggle-btn {
        display: none !important;
    }
    
    /* Caso o timer esteja rodando ativamente e colapsado no celular, exibe a contagem numérica em vez do ícone */
    .timer-widget.collapsed.timer-active-running .timer-title svg {
        display: none !important;
    }
    
    .timer-widget.collapsed.timer-active-running .timer-title::after {
        content: attr(data-time-left);
        font-size: 0.9rem;
        font-weight: 800;
        color: var(--accent-color);
        text-shadow: 0 0 8px var(--accent-glow);
        display: block;
    }
    
    /* Quando expandido no celular, o widget do Spotify ocupa a parte inferior em largura cheia */
    .spotify-widget:not(.collapsed) {
        bottom: 16px;
        left: 16px;
        right: 16px;
        width: calc(100% - 32px);
        border-radius: 20px;
    }
    
    /* Quando expandido no celular, o widget do Cronômetro ocupa a parte inferior em largura cheia */
    .timer-widget:not(.collapsed) {
        bottom: 16px;
        left: 16px;
        right: 16px;
        width: calc(100% - 32px);
        border-radius: 20px;
    }

    /* Empilha verticalmente os botões do rodapé de treinos no celular para evitar que fiquem esmagados */
    .workout-actions-wrapper {
        flex-direction: column;
        gap: 12px;
        width: 100%;
        margin-top: 24px;
    }
    
    /* Garante largura total e centralização dos ícones e textos nos botões no celular */
    .btn-custom-workout, 
    .btn-restore-default, 
    .btn-reset-workout {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}

