/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Navegação por tabs */
.tab-button {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    font-size: 0.95rem;
}

.tab-button:hover {
    color: #8b5cf6;
    background-color: #f8fafc;
}

.tab-button.active {
    color: #8b5cf6;
    border-bottom-color: #8b5cf6;
    background-color: #faf5ff;
}

/* Seções de treino */
.workout-day {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.workout-day.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.workout-header {
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
    color: white;
    padding: 32px;
    border-radius: 16px;
    margin-bottom: 32px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.2);
}

.workout-header h2 {
    font-size: 2rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.workout-header p {
    opacity: 0.9;
    font-size: 1.1rem;
}

/* Tabela de exercícios */
.exercise-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    margin-bottom: 32px;
}

.table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 100px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 20px 24px;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
    gap: 16px;
}

.table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 100px;
    padding: 24px;
    border-bottom: 1px solid #f1f5f9;
    align-items: center;
    transition: background-color 0.2s ease;
    gap: 16px;
}

.table-row:hover {
    background-color: #fafafa;
}

.table-row:last-child {
    border-bottom: none;
}

.exercise-name strong {
    display: block;
    color: #1f2937;
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 1rem;
}

.exercise-name small {
    color: #6b7280;
    font-size: 0.85rem;
    font-weight: 400;
}

.table-row > div:not(.exercise-name) {
    text-align: center;
    font-weight: 500;
    color: #374151;
}

/* Links de tutorial */
.tutorial-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.tutorial-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Notas do treino */
.workout-notes {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
}

.workout-notes h3 {
    color: #075985;
    margin-bottom: 16px;
    font-size: 1.2rem;
    font-weight: 600;
}

.workout-notes ul {
    list-style: none;
    padding-left: 0;
}

.workout-notes li {
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
    color: #0c4a6e;
}

.workout-notes li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #0ea5e9;
    font-weight: bold;
}

/* Grid de orientações */
.guidelines-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.guideline-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #f1f5f9;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.guideline-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.guideline-card h3 {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    color: #1f2937;
    font-size: 1.2rem;
    font-weight: 600;
}

.guideline-card h3 i {
    margin-right: 12px;
    font-size: 1.3rem;
}

.guideline-card ul {
    list-style: none;
    padding-left: 0;
}

.guideline-card li {
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
    color: #4b5563;
}

.guideline-card li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #8b5cf6;
    font-weight: bold;
}

.guideline-card p {
    color: #4b5563;
    margin-bottom: 8px;
}

.guideline-card strong {
    color: #1f2937;
}

/* Avisos importantes */
.important-notes {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1px solid #fca5a5;
    border-radius: 12px;
    padding: 24px;
    margin-top: 32px;
}

.important-notes h3 {
    color: #dc2626;
    margin-bottom: 16px;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.important-notes h3 i {
    margin-right: 12px;
    font-size: 1.3rem;
}

.important-notes ul {
    list-style: none;
    padding-left: 0;
}

.important-notes li {
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
    color: #991b1b;
}

.important-notes li:before {
    content: "⚠";
    position: absolute;
    left: 0;
    font-size: 1.1rem;
}

/* Responsividade */
@media (max-width: 1024px) {
    .table-header,
    .table-row {
        grid-template-columns: 2fr 0.8fr 0.8fr 0.8fr 80px;
        gap: 12px;
    }
    
    .guidelines-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .tab-button {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
    
    .tab-button i {
        display: none;
    }
    
    .workout-header {
        padding: 24px 16px;
    }
    
    .workout-header h2 {
        font-size: 1.6rem;
    }
    
    .table-header,
    .table-row {
        grid-template-columns: 1fr;
        gap: 8px;
        text-align: left;
        padding: 16px;
    }
    
    .table-header {
        display: none;
    }
    
    .table-row {
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        margin-bottom: 12px;
    }
    
    .table-row > div:not(.exercise-name) {
        text-align: left;
        padding: 4px 0;
    }
    
    .table-row > div:not(.exercise-name):before {
        font-weight: 600;
        color: #6b7280;
        margin-right: 8px;
    }
    
    .table-row > div:nth-child(2):before {
        content: "Séries: ";
    }
    
    .table-row > div:nth-child(3):before {
        content: "Repetições: ";
    }
    
    .table-row > div:nth-child(4):before {
        content: "Descanso: ";
    }
    
    .table-row > div:nth-child(5):before {
        content: "Tutorial: ";
    }
    
    .guidelines-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .guideline-card,
    .workout-notes,
    .important-notes {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .tab-button {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    
    .workout-header h2 {
        font-size: 1.4rem;
    }
    
    .tutorial-link {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .exercise-name strong {
        font-size: 0.95rem;
    }
    
    .exercise-name small {
        font-size: 0.8rem;
    }
}

/* Animações e transições suaves */
.workout-day {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.exercise-table {
    transition: box-shadow 0.3s ease;
}

.exercise-table:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

/* Melhorias na acessibilidade */
.tutorial-link:focus,
.tab-button:focus {
    outline: 2px solid #8b5cf6;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .tab-button,
    footer {
        display: none;
    }
    
    .workout-day {
        display: block !important;
        page-break-after: always;
    }
    
    .workout-day:last-child {
        page-break-after: auto;
    }
}