/* Mobile-First Design per Fit Box Trainer */

/* Reset e base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #f46d2f 100%);
    color: #333;
    overflow-x: hidden;
    min-height: 100vh;
}

.app-container {
    max-width: 100vw;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f8fafc;
}

/* Header Mobile Ottimizzato */
.mobile-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(135deg, #dc2626 0%, #f46d2f 100%);
    color: white;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-title {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.app-title i {
    margin-right: 0.5rem;
    color: #fbbf24;
}

.hamburger-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.hamburger-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.hamburger-btn.open {
    transform: rotate(90deg);
}

/* Stili per il menu a tendina */
.header-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out, padding 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.header-menu.open {
    max-height: 500px;
    padding-top: 1rem;
}

.mode-selector {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.mode-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.mode-btn.active {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.02);
}

.mode-btn i {
    margin-right: 0.5rem;
}

.session-info {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.timer-display, .calories-display {
    flex: 1;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.75rem;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.timer-display i, .calories-display i {
    margin-right: 0.5rem;
    color: #fbbf24;
}

.session-controls {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
}

.control-btn {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.start-btn {
    background: rgba(34, 197, 94, 0.3);
    border-color: rgba(34, 197, 94, 0.5);
}

.pause-btn {
    background: rgba(251, 191, 36, 0.3);
    border-color: rgba(251, 191, 36, 0.5);
}

.stop-btn {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.5);
}

/* Navigation Tabs */
.tab-navigation {
    display: flex;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 68px;
    z-index: 90;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tab-navigation::-webkit-scrollbar {
    display: none;
}

.tab-button {
    flex: 1;
    min-width: 80px;
    padding: 1rem 0.5rem;
    border: none;
    background: transparent;
    color: #6b7280;
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    border-bottom: 3px solid transparent;
}

.tab-button.active {
    color: #dc2626;
    border-bottom-color: #dc2626;
    background: rgba(220, 38, 38, 0.05);
}

.tab-button i {
    font-size: 1.2rem;
}

.tab-button span {
    font-size: 0.75rem;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    background: #f8fafc;
}

.content-body {
    max-width: 100%;
    margin: 0 auto;
}

/* Techniques Content */
.techniques-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.section-header {
    text-align: center;
    margin-bottom: 1rem;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: #6b7280;
    font-size: 0.95rem;
}

.techniques-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.technique-category {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.category-dropdown {
    margin-bottom: 0.5rem;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid #f1f5f9;
}

.category-header:hover {
    background: rgba(220, 38, 38, 0.05);
}

.category-dropdown.open .category-header {
    background: rgba(220, 38, 38, 0.05);
}

.category-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f2937;
    flex: 1;
    margin-left: 0.75rem;
}

.category-header i:first-child {
    font-size: 1.2rem;
    color: #dc2626;
}

.dropdown-arrow {
    font-size: 0.9rem;
    color: #6b7280;
    transition: transform 0.3s ease;
}

.category-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.technique-dropdown-content {
    display: none;
    background: #f8fafc;
    padding: 0.5rem;
}

.category-dropdown.open .technique-dropdown-content {
    display: block;
}

.technique-dropdown-content .technique-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: #374151;
}

.technique-dropdown-content .technique-item:last-child {
    margin-bottom: 0;
}

.technique-dropdown-content .technique-item:hover {
    border-color: #dc2626;
    background: rgba(220, 38, 38, 0.05);
    transform: translateX(4px);
}

.technique-dropdown-content .technique-item.active {
    background: #f46d2f;
    color: white;
    border-color: #b91c1c;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.technique-dropdown-content .technique-item i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.technique-dropdown-content .technique-item.active i {
    color: white;
}

/* Technique Detail */
.technique-detail {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-top: 1rem;
}

.technique-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f5f9;
}

.technique-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #f46d2f, #b91c1c);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.technique-info h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.technique-type {
    color: #6b7280;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.technique-description {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 12px;
    border-left: 4px solid #f46d2f;
}

.technique-description p {
    color: #374151;
    line-height: 1.6;
    font-size: 0.95rem;
}

.technique-steps h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: #1f2937;
    font-weight: 700;
}

.technique-steps i {
    color: #f46d2f;
}

.steps-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.step-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.step-number {
    width: 32px;
    height: 32px;
    background: #f46d2f;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content h5 {
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.step-content p {
    color: #6b7280;
    line-height: 1.5;
    font-size: 0.9rem;
}

.technique-tips {
    margin-top: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-radius: 12px;
    border: 1px solid #f59e0b;
}

.technique-tips h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: #92400e;
    font-weight: 700;
}

.technique-tips i {
    color: #f59e0b;
}

.tips-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tips-list li {
    color: #92400e;
    font-size: 0.9rem;
    line-height: 1.5;
    position: relative;
    padding-left: 1.5rem;
}

.tips-list li:before {
    content: '💡';
    position: absolute;
    left: 0;
    top: 0;
}

/* Combinations Detail */
.combinations-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f5f9;
}

.combinations-header h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.combinations-header p {
    color: #6b7280;
    line-height: 1.6;
}

.combinations-list h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: #1f2937;
    font-weight: 700;
}

.combinations-list i {
    color: #dc2626;
}

.combination-item {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.combo-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.combo-header h5 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.combo-meta {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.combo-duration {
    background: #f46d2f;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.combo-difficulty {
    background: #f59e0b;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.combo-description {
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.combo-sequence h6 {
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.sequence-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sequence-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
}

.sequence-step .step-number {
    width: 20px;
    height: 20px;
    background: #f46d2f;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
}

.sequence-step .step-name {
    font-weight: 600;
    color: #374151;
}

/* Workout Content */
.workout-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.workout-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.workout-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
}

.workout-card:hover {
    border-color: #f46d2f;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(220, 38, 38, 0.15);
}

.workout-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f5f9;
}

.workout-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #f46d2f, #b91c1c);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.workout-header h3 {
    font-size: 1.3rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.workout-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.workout-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #6b7280;
}

.workout-meta i {
    color: #f46d2f;
}

.workout-description {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.workout-structure h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: #1f2937;
    font-weight: 700;
}

.workout-structure i {
    color: #f46d2f;
}

.round-item {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.round-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.round-name {
    font-weight: 700;
    color: #1f2937;
}

.round-duration {
    background: #f46d2f;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.round-exercises {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.5;
}

.workout-btn {
    background: linear-gradient(135deg, #f46d2f, #b91c1c);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
    margin-top: 1rem;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.workout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.4);
}

/* Calories Content */
.calories-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.calculator-form {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.calculator-form h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: #1f2937;
    font-weight: 700;
}

.calculator-form i {
    color: #f46d2f;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #f46d2f;
}

.calculator-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.primary-btn {
    background: linear-gradient(135deg, #f46d2f, #b91c1c);
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 140px;
    justify-content: center;
}

.primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.secondary-btn {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 120px;
    justify-content: center;
}

.secondary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

.export-btn {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 120px;
    justify-content: center;
}

.export-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.results-section {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-top: 1rem;
}

.results-card {
    text-align: center;
}

.results-card h3 {
    color: #1f2937;
    font-weight: 700;
    margin-bottom: 1rem;
}

.result-value {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem 0;
}

.calories-number {
    font-size: 3rem;
    font-weight: 800;
    color: #f46d2f;
}

.calories-unit {
    font-size: 1.2rem;
    font-weight: 600;
    color: #6b7280;
}

.result-details {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
}

.result-details p {
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.chart-container {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-top: 1rem;
    height: 300px;
    position: relative;
}

.chart-container canvas {
    max-height: 250px !important;
}

/* Stats Content */
.stats-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #f46d2f;
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #f46d2f, #b91c1c);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 1.2rem;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 600;
}

.stats-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.charts-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.charts-section .chart-container {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.charts-section .chart-container h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: #1f2937;
    font-weight: 700;
}

.charts-section .chart-container i {
    color: #f46d2f;
}

.workout-config {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-top: 1.5rem;
}

.workout-config h3 {
    color: #1f2937;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.config-section {
    margin-bottom: 2rem;
}

.config-section h4 {
    color: #1f2937;
    font-weight: 700;
    margin-bottom: 1rem;
}

.workout-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.workout-type-card {
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.workout-type-card:hover {
    border-color: #f46d2f;
    background: rgba(220, 38, 38, 0.05);
}

.workout-type-card h5 {
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.workout-type-card p {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.select-workout-btn {
    background: #f46d2f;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.select-workout-btn:hover {
    background: #b91c1c;
}

/* Animations */
.slide-in {
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mt-1 {
    margin-top: 1rem;
}

/* Responsive adjustments for very small screens */
@media (max-width: 320px) {
    .app-title {
        font-size: 1rem;
    }
    
    .tab-button {
        padding: 0.75rem 0.25rem;
    }
    
    .tab-button span {
        font-size: 0.7rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .calculator-actions {
        flex-direction: column;
    }
    
    .stats-actions {
        flex-direction: column;
    }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 500px) {
    .mobile-header {
        padding: 0.5rem 1rem;
    }
    
    .header-menu {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }
    
    .session-info {
        flex-direction: row;
        gap: 0.5rem;
    }
}



/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 90vw;
    max-height: 90vh;
    width: 600px;
    overflow-y: auto;
    animation: slideIn 0.3s ease-out;
    position: relative;
}

.modal-header {
    background: linear-gradient(135deg, #f46d2f 0%, #b91c1c 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.modal-body {
    padding: 2rem;
}

.profile-section {
    margin-bottom: 2rem;
}

.profile-section h4 {
    color: #f46d2f;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-section h4::before {
    content: "👤";
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.input-group input,
.input-group select {
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #f46d2f;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.input-group input[type="range"] {
    padding: 0;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    appearance: none;
}

.input-group input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    background: #f46d2f;
    border-radius: 50%;
    cursor: pointer;
}

.workout-type-section {
    margin-bottom: 2rem;
}

.workout-type-section h4 {
    color: #f46d2f;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.workout-type-section h4::before {
    content: "🏋️";
}

.workout-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.workout-type-btn {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.workout-type-btn:hover {
    border-color: #f46d2f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.workout-type-btn.active {
    border-color: #f46d2f;
    background: #fef2f2;
    color: #f46d2f;
}

.workout-type-btn i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.workout-type-btn span {
    font-weight: 600;
    font-size: 0.9rem;
}

.workout-type-btn small {
    color: #6b7280;
    font-size: 0.8rem;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    border-radius: 0 0 16px 16px;
    background: #f9fafb;
}

.btn-secondary {
    padding: 0.75rem 1.5rem;
    border: 2px solid #6b7280;
    background: white;
    color: #6b7280;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #6b7280;
    color: white;
}

.btn-primary {
    padding: 0.75rem 1.5rem;
    border: none;
    background: linear-gradient(135deg, #f46d2f 0%, #b91c1c 100%);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

/* Animazioni */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive per mobile */
@media (max-width: 768px) {
    .modal-content {
        width: 95vw;
        max-height: 95vh;
        margin: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .workout-types {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .btn-secondary,
    .btn-primary {
        width: 100%;
        justify-content: center;
    }
}

