/* 
 * Flecks App - Main Stylesheet
 * Mobile-first design with responsive breakpoints
 */

:root {
    /* Color palette */
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --secondary-color: #2ecc71;
    --secondary-dark: #27ae60;
    --accent-color: #e74c3c;
    --light-bg: #f5f8fa;
    --dark-bg: #2c3e50;
    --text-color: #333;
    --text-light: #7f8c8d;
    --border-color: #ecf0f1;
    
    /* Sizes */
    --header-height: 60px;
    --footer-height: 70px;
    --border-radius: 12px;
    
    /* Transitions */
    --transition-speed: 0.3s;
}

/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

button, .btn {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    font-size: inherit;
}

/* App container layout */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 100%;
    margin: 0 auto;
    position: relative;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: -0.05em;
    margin: 0;
}

/* Header actions */
.header-actions {
    display: flex;
    align-items: center;
}

.feedback-link {
    font-size: 1.4rem;
    color: #333;
    margin-left: 15px;
    transition: color 0.3s ease;
}

.feedback-link:hover {
    color: #000;
}

/* Main content area */
main {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-y: auto;
    background-color: var(--light-bg);
}

/* Footer with input */
footer {
    background-color: white;
    min-height: var(--footer-height);
    padding: 12px 15px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 10;
}

/* Main input container */
.main-input-container {
    display: flex;
    align-items: center;
    background-color: var(--light-bg);
    border-radius: 30px;
    padding: 5px 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 5px;
    border: 1px solid var(--border-color);
}

.input-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    cursor: pointer;
    border-radius: 50%;
    transition: background-color var(--transition-speed);
}

.input-icon:hover {
    background-color: rgba(52, 152, 219, 0.1);
}

/* Input styles */
.text-input-container {
    flex: 1;
    margin-right: 10px;
    position: relative;
}

.text-input-container input[type="text"],
.text-input-container textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    font-size: 16px;
    color: var(--text-dark);
    background-color: var(--light-bg);
    transition: all var(--transition-speed);
}

.text-input-container textarea {
    min-height: 44px;
    max-height: 120px;
    resize: vertical;
    overflow-y: auto;
    line-height: 1.5;
    padding-top: 12px;
}

.text-input-container input[type="text"]:focus,
.text-input-container textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.2);
}

.input-hint {
    position: absolute;
    right: 15px;
    bottom: -18px;
    font-size: 11px;
    color: var(--text-light);
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.text-input-container:hover .input-hint {
    opacity: 1;
}

.submit-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-speed);
}

.submit-btn:hover {
    background-color: var(--primary-dark);
}

/* Main model selector in input bar */
.main-model-selector {
    position: relative;
    display: inline-block;
}

.main-model-selector select {
    font-size: 12px;
    padding: 4px 8px;
    padding-right: 16px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background-color: var(--light-bg);
    color: var(--text-light);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.main-model-selector::after {
    content: "";
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid var(--text-light);
    pointer-events: none;
}

.main-model-selector select:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.main-model-selector select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Advanced options panel */
.advanced-options {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    padding: 20px;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 50;
    max-height: 80vh;
    overflow-y: auto;
}

.advanced-options.active {
    transform: translateY(0);
}

/* Option group styling */
.option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.option-header h3 {
    font-size: 18px;
    color: var(--dark-bg);
}

.option-group {
    margin-bottom: 15px;
}

.option-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: var(--text-light);
}

.option-group input, 
.option-group select, 
.option-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    background-color: var(--light-bg);
    outline: none;
    transition: border-color var(--transition-speed);
}

.option-group input:focus, 
.option-group select:focus, 
.option-group textarea:focus {
    border-color: var(--primary-color);
}

.option-group textarea {
    height: 80px;
    resize: none;
}

/* Advanced options toggle button */
.advanced-options-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    margin: 0 0 0 auto;
    background-color: transparent;
    color: var(--primary-color);
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-speed);
    user-select: none;
    border: none;
    text-align: center;
    box-shadow: none;
    position: relative;
    z-index: 10;
}

.advanced-options-toggle span {
    margin-right: 5px;
}

.advanced-options-toggle i {
    display: none;
}

.advanced-options-toggle:hover {
    opacity: 0.8;
}

.advanced-options-toggle.active {
    color: var(--primary-dark);
}

/* Close button for advanced options */
.close-advanced-options {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--light-bg);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color var(--transition-speed);
}

.close-advanced-options:hover {
    background-color: var(--border-color);
}

.close-advanced-options i {
    font-size: 14px;
    color: var(--text-light);
}

/* Remove old swipe indicator */
.swipe-indicator {
    display: none;
}

/* Results area */
.results-area {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: none;
}

.results-area.active {
    display: block;
}

.results-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    padding: 0 5px;
}

.results-tabs::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.tab-btn {
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-light);
    border-bottom: 3px solid transparent;
    transition: all var(--transition-speed);
    white-space: nowrap;
    position: relative;
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 600;
}

.tab-content {
    display: none;
    animation: fadeOut 0.2s ease;
    padding: 0 10px;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

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

/* Loading spinner */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    color: var(--text-light);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(52, 152, 219, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s infinite linear;
    margin-bottom: 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Welcome message */
.welcome-message {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

.welcome-message h2 {
    font-size: 28px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.welcome-message p {
    color: var(--text-light);
    margin-bottom: 15px;
}

.welcome-instructions {
    margin-top: 30px;
    width: 100%;
    max-width: 320px;
    text-align: left;
}

.welcome-instructions p {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.welcome-instructions i {
    color: var(--primary-color);
}

/* Example prompts */
.example-prompts {
    position: relative;
    height: 40px;
    margin: 0 0 15px 25px;
    overflow: hidden;
}

.example-prompt {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    margin: 0;
    font-style: italic;
    color: var(--text-light);
    opacity: 0;
    font-size: 0.9em;
    animation: promptFade 35s infinite;
    animation-delay: calc(var(--prompt-index) * 5s);
    line-height: 1.3;
}

@keyframes promptFade {
    0%, 5% { opacity: 0; transform: translateY(5px); }
    10%, 19% { opacity: 0.7; transform: translateY(0); }
    20%, 100% { opacity: 0; transform: translateY(-5px); }
}

/* Share button */
.share-container {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.share-btn {
    background-color: var(--secondary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 500;
    transition: background-color var(--transition-speed);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    align-self: center;
    cursor: pointer;
    border: none;
    min-width: 160px;
}

.share-btn:hover {
    background-color: var(--secondary-dark);
}

.share-btn:disabled {
    background-color: #aaa;
    cursor: not-allowed;
}

.share-url {
    background-color: var(--light-bg);
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    word-break: break-all;
    display: none;
}

.share-url.active {
    display: block;
}

/* Share URL display */
.share-url-display {
    background-color: #f5f5f5;
    padding: 10px;
    border-radius: 5px;
    margin: 15px 0;
    word-break: break-all;
    font-family: monospace;
    font-size: 0.9rem;
}

/* Share buttons container */
.share-buttons {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    justify-content: space-between;
}

.share-buttons .share-btn {
    flex: 1;
    padding: 12px 20px;
    font-size: 15px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

.share-buttons .share-btn i {
    margin-right: 5px;
}

.share-buttons .share-btn:hover {
    background-color: var(--primary-dark);
}

/* Existing confirm-btn should have flex: 1 to match share-btn */
.confirm-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    margin-top: 10px;
    transition: background-color 0.2s;
    flex: 1;
}

.confirm-btn:hover {
    background-color: var(--primary-dark);
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 100;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
    animation: modalFadeIn 0.3s forwards;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 25px;
    max-width: 90%;
    width: 380px;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    animation: modalSlideUp 0.3s forwards;
}

/* Image preview styles */
#imagePreviewModal .modal-content {
    width: auto;
    max-width: 85%;
    max-height: 85vh;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#imagePreview {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
    margin-bottom: 15px;
    border-radius: 4px;
}

@media (max-width: 768px) {
    #imagePreviewModal .modal-content {
        max-width: 90%;
        max-height: 90vh;
        padding: 12px;
    }
    
    #imagePreview {
        max-height: 50vh;
    }
}

@keyframes modalSlideUp {
    to { transform: translateY(0); }
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 22px;
    color: var(--text-light);
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover {
    color: var(--text-color);
}

.cancel-btn {
    background-color: #f5f5f5;
    color: var(--text-color);
    border: 1px solid #ddd;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    width: 100%;
    margin-top: 10px;
}

.cancel-btn:hover {
    background-color: #eee;
}

/* Shared workout page */
.shared-workout-main {
    padding: 15px 0 0 0;
}

/* Hide the shared-workout-header for more space */
.shared-workout-header {
    display: none;
}

/* Adjust the results area to compensate for removed header */
.shared-workout-main .results-area {
    margin-top: 0;
}

.workout-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding: 10px;
    background-color: var(--light-bg);
    border-radius: 6px;
}

.workout-meta p {
    margin: 0;
    font-size: 15px;
}

/* Summary tab styling */
.workout-summary {
    padding: 15px;
    line-height: 1.6;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
}

.workout-summary p {
    margin-bottom: 15px;
}

.workout-summary ul, 
.workout-summary ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.workout-summary h1,
.workout-summary h2,
.workout-summary h3 {
    color: var(--primary-color);
    margin-top: 20px;
    margin-bottom: 10px;
}

.workout-summary strong {
    color: var(--text-dark);
}

/* Technical tab styling */
.json-display {
    background-color: var(--light-bg);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: monospace;
    white-space: pre-wrap;
    font-size: 14px;
}

.shared-footer {
    padding: 20px;
    text-align: center;
}

.create-own-btn {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 24px;
    border-radius: 24px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background-color var(--transition-speed);
}

.create-own-btn:hover {
    background-color: var(--primary-dark);
}

/* Media queries for larger screens */
@media (min-width: 768px) {
    .app-container {
        max-width: 800px;
        margin: 0 auto;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
        border-radius: var(--border-radius);
        height: 100vh;
        overflow: hidden;
    }
    
    main {
        padding: 30px;
    }
    
    .welcome-message h2 {
        font-size: 32px;
    }
    
    .welcome-instructions {
        max-width: 400px;
    }
    
    .modal-content {
        max-width: 500px;
        padding: 30px;
    }
    
    .shared-workout-header h2 {
        font-size: 32px;
    }
    
    .workout-meta {
        font-size: 16px;
    }
}

/* Dark mode - for future implementation */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles would go here */
}

/* Workout display - Full details tab */
.full-workout {
    max-width: 100%;
    padding: 10px;
}

.full-workout h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 24px;
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 10px;
}

.full-workout h3 {
    margin-top: 25px;
    font-size: 20px;
    color: var(--text-dark);
    background-color: var(--light-bg);
    padding: 8px 12px;
    border-radius: 6px;
    display: flex;
    align-items: center;
}

.workout-segment {
    margin-bottom: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.segment-header {
    background-color: #f2f6fc;
    padding: 12px 15px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.segment-header h3 {
    margin: 0;
    color: #3a7bd5;
}

.segment-header small {
    color: #6c757d;
    font-size: 13px;
    font-weight: normal;
}

.segment-header + .segment-meta {
    margin-top: 0;
}

.segment-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 10px 0;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.segment-meta p {
    margin: 0;
    display: flex;
    align-items: center;
    font-size: 14px;
}

.segment-meta p strong {
    margin-right: 5px;
}

/* Workout tables */
.movements-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    border-radius: 5px;
    overflow: hidden;
}

.movements-table th {
    background-color: #f2f6fc;
    color: #3a7bd5;
    text-align: left;
    padding: 12px;
    font-weight: 600;
    border-bottom: 1px solid #ddd;
}

.movements-table td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
}

.workout-table .set-header {
    background-color: #f2f6fc;
    font-weight: bold;
    text-align: center;
    color: #3a7bd5;
    border-top: 1px solid #dee2e6;
}

.workout-table .set-header td {
    padding: 8px 12px;
}

/* Collapsible notes for mobile */
.movement-notes {
    display: none;
    padding: 12px;
    margin-top: 0;
    background-color: #f9f9f9;
    border-top: 1px dashed #e0e0e0;
    font-size: 0.9em;
    color: #666;
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
}

.has-notes {
    position: relative;
    cursor: pointer;
}

.has-notes::after {
    content: "Notes ▼";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #3a7bd5;
    background-color: #f2f6fc;
    padding: 3px 8px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

.has-notes.expanded::after {
    content: "Notes ▲";
}

@media (max-width: 768px) {
    /* Mobile improvements for results area */
    .results-area {
        border-radius: 0;
        padding: 10px 0;
        margin: 0 0 10px 0;
        box-shadow: none;
        max-width: 100%;
        width: 100%;
    }
    
    .results-tabs {
        padding: 0;
        margin-bottom: 10px;
    }
    
    .tab-btn {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    main {
        padding: 0;
    }
    
    /* Full details tab - fix left alignment */
    #fullContent {
        padding: 0;
        margin: 0;
    }
    
    /* Fix for the title hugging the left edge */
    .full-workout > h2 {
        padding-left: 10px;
        padding-right: 10px;
        margin: 0 0 8px 0;
        padding-bottom: 5px;
        font-size: 20px;
    }
    
    /* Ensure segment content is properly aligned */
    .movements-list {
        padding: 0;
        margin: 0;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Fix for movement items alignment and spacing */
    .movement-item, .movement-item.has-notes {
        padding-right: 0 !important; /* Remove any special padding */
        width: 100%;
        box-sizing: border-box;
        border-bottom: 1px solid #eee;
    }
    
    .movement-item:last-child {
        border-bottom: none;
    }
    
    /* Remove the notes indicator for mobile too */
    .movement-item.has-notes::after {
        display: none;
    }
    
    .movement-item.has-notes.expanded::after {
        display: none;
    }
    
    /* Convert mobile movement row to grid layout */
    .movement-row {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
        padding: 10px;
        width: 100%;
        box-sizing: border-box;
        gap: 5px; /* Small gap between name and count */
    }
    
    .movement-name {
        font-weight: 500;
        font-size: 0.95em;
        min-width: 0; /* Allow text wrapping */
        padding-right: 0; /* No padding needed with grid gap */
    }
    
    .movement-count {
        text-align: right;
        white-space: nowrap;
        font-size: 0.95em;
    }
    
    /* Adjust movement item with notes styling for mobile */
    .movement-item.has-notes {
        padding-right: 0 !important; /* No extra padding needed */
        border-left: 3px solid #3a7bd5; /* Slightly thinner border for mobile */
    }
    
    /* Make the indicator invisible */
    .movement-item.has-notes::after {
        display: none;
    }
    
    /* Expanded state - also invisible */
    .movement-item.has-notes.expanded::after {
        display: none;
    }
    
    /* Optimize segment containers */
    .workout-segment {
        margin: 0 0 15px 0;
        border-radius: 8px;
        width: 100%;
        box-sizing: border-box;
        border-left: none;
        border-right: none;
        border-radius: 0;
    }
    
    /* Consistent segment header styling */
    .segment-header {
        padding: 10px;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Set header styling consistency */
    .set-header {
        padding: 8px 10px;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Consistent padding for movement notes */
    .movement-notes {
        padding: 10px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .notes-content {
        padding: 0;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Other mobile adjustments */
    .full-workout h2 {
        font-size: 1.3em;
        padding: 0 10px;
        box-sizing: border-box;
        width: 100%;
    }
    
    .workout-overview h3 {
        font-size: 1.1em;
    }
    
    .segment-header h3 {
        font-size: 1em;
    }
    
    /* Full-width container adjustments */
    .app-container {
        max-width: 100%;
        width: 100%;
        margin: 0;
        padding: 0;
    }
    
    .results-content {
        padding: 0;
        width: 100%;
        max-width: 100%;
    }
    
    .tab-content {
        padding: 0;
        width: 100%;
        max-width: 100%;
    }
    
    #snapshotContent {
        padding: 0;
        width: 100%;
        max-width: 100%;
    }
    
    /* Fix for segment notes and other containers */
    .segment-notes-container {
        padding: 0 10px;
        width: 100%;
        box-sizing: border-box;
    }
}

.workout-overview {
    background-color: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
    border-left: 4px solid #3a7bd5;
}

.workout-overview h3 {
    margin-top: 0;
    color: #3a7bd5;
}

.workout-segment {
    margin-bottom: 25px;
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.segment-header {
    background-color: #f2f6fc;
    padding: 12px 15px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.segment-header h3 {
    margin: 0;
    color: #3a7bd5;
}

.segment-header small {
    color: #6c757d;
    font-size: 13px;
    font-weight: normal;
}

.segment-meta {
    padding: 12px 15px;
    background-color: #fcfcfc;
}

@media (max-width: 768px) {
    .results-tabs {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 5px;
    }
    
    .tab-btn {
        flex: 0 0 auto;
        font-size: 14px;
        padding: 8px 15px;
    }
    
    .movements-table tr {
        margin-bottom: 8px;
        position: relative;
    }
    
    .movement-notes {
        padding: 10px;
        margin: 0;
        border-top: 1px dashed #e0e0e0;
    }
}

/* Workout result optimizations for mobile */
.full-workout {
    margin-bottom: 20px;
}

.full-workout h2 {
    margin-bottom: 10px;
}

.workout-overview {
    margin: 10px 0 20px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.overview-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.description-container {
    position: relative;
}

.description-text {
    margin: 0;
    line-height: 1.5;
}

.description-text.collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 4.5em; /* Approximately 3 lines */
}

.read-more-btn {
    background: none;
    border: none;
    color: #3a7bd5;
    font-size: 0.9em;
    font-weight: 500;
    padding: 4px 0;
    cursor: pointer;
    text-align: left;
    margin-top: 5px;
}

.duration-info {
    font-size: 0.9em;
    margin: 5px 0 0;
}

.difficulty-level {
    font-size: 0.9em;
    margin: 5px 0 0;
}

/* Segment styling */
.workout-segment {
    margin-bottom: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.segment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #f5f5f5;
    border-bottom: 1px solid #eee;
}

.segment-header h3 {
    margin: 0;
    font-size: 1.1em;
}

.segment-header small {
    font-size: 0.8em;
    color: #666;
}

/* Segment notes */
.segment-notes-container {
    padding: 0 15px;
    border-bottom: 1px solid #eee;
}

.segment-notes-container.collapsed .segment-notes {
    display: none;
}

.segment-notes-toggle {
    background: none;
    border: none;
    color: #3a7bd5;
    font-size: 0.85em;
    padding: 8px 0;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.segment-notes {
    padding-bottom: 10px;
}

.segment-notes p {
    margin: 0;
    font-size: 0.9em;
    line-height: 1.5;
}

/* Movements list */
.movements-list {
    padding: 0;
}

.set-header {
    padding: 8px 15px;
    background-color: #f8f8f8;
    color: #666;
    font-size: 0.85em;
    font-weight: 500;
    border-bottom: 1px solid #eee;
}

.movement-item {
    border-bottom: 1px solid #eee;
}

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

/* Movement items with notes - remove the indicator */
.movement-item.has-notes {
    position: relative;
    cursor: pointer;
    border-left: 4px solid #3a7bd5;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    margin: 2px 0;
    background-color: #f9faff;
}

/* Remove the notes indicator entirely */
.movement-item.has-notes::after {
    content: none;
    display: none;
}

.movement-item.has-notes.expanded::after {
    content: none;
    display: none;
}

.movement-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 10px 15px;
    width: 100%;
    box-sizing: border-box;
}

.movement-name {
    font-weight: 500;
    font-size: 0.95em;
    padding-right: 15px;
    min-width: 0; /* Allow text to truncate/wrap properly */
}

.movement-count {
    text-align: right;
    color: #444;
    font-size: 0.95em;
    white-space: nowrap;
}

/* Movement notes */
.movement-notes {
    background-color: #f0f5ff;
    padding: 0;
    border-top: 1px solid #d0e0ff;
    overflow: hidden;
    display: block;
}

.notes-content {
    padding: 8px 15px 12px 15px;
    font-size: 0.9em;
    line-height: 1.6;
    color: #444;
    max-height: 500px;
    transition: all 0.3s ease;
}

.notes-content.collapsed {
    display: none;
    max-height: 0;
}

/* Image options modal styles */
.image-options-content {
    width: 300px;
}

.image-options-content h3 {
    text-align: center;
    margin-bottom: 20px;
}

.option-btn {
    background-color: white;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 12px 15px;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.option-btn:hover {
    background-color: var(--light-bg);
}

.option-btn i {
    font-size: 14px;
    color: var(--text-light);
}

#replaceImage {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

#replaceImage:hover {
    background-color: var(--primary-color);
    color: white;
}

#replaceImage:hover i {
    color: white;
}

#removeImage {
    border-color: var(--error-color);
    color: var(--error-color);
}

#removeImage:hover {
    background-color: var(--error-color);
    color: white;
}

#removeImage:hover i {
    color: white;
}

/* Version info */
.version-info {
    position: fixed;
    bottom: 15px;
    right: 15px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.version-info.active {
    opacity: 1;
    transform: translateY(0);
}

/* Dark mode - for future implementation */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles would go here */
}

/* Snapshot Tab Styling */
.snapshot-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin: 0 auto 20px;
    padding: 10px;
    max-width: 800px;
    min-height: 300px;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.snapshot-card h2 {
    color: var(--primary-color);
    font-size: 24px;
    margin-bottom: 15px;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.snapshot-segment {
    margin-bottom: 12px;
    padding: 8px;
    background-color: #fdfdfd;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.snapshot-segment h3 {
    color: #3a7bd5;
    margin: 0 0 8px 0;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
}

.snapshot-segment h3 .duration {
    font-size: 16px;
    color: #6c757d;
    font-weight: normal;
}

.snapshot-notes {
    margin-top: 6px;
    font-size: 14px;
    color: #666;
    font-style: italic;
}

.snapshot-movements {
    margin-top: 6px;
}

.snapshot-set {
    margin-bottom: 8px;
    padding: 6px;
    background-color: white;
    border-radius: 4px;
}

.snapshot-set-header {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    font-size: 16px;
    color: #3a7bd5;
    margin-bottom: 6px;
}

.snapshot-movement {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.snapshot-movement:last-child {
    border-bottom: none;
}

.snapshot-movement-name {
    font-weight: 600;
    font-size: 16px;
}

.snapshot-movement-count {
    color: #333;
    font-weight: 500;
    font-size: 16px;
}

.snapshot-branding {
    margin-top: 15px;
    text-align: center;
    font-size: 12px;
    color: #aaa;
    position: absolute;
    bottom: 5px;
    width: calc(100% - 20px);
}

.snapshot-branding a {
    color: #3a7bd5;
    text-decoration: none;
}

.snapshot-actions {
    text-align: center;
    margin: 20px 0;
}

.snapshot-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s;
}

.snapshot-btn:hover {
    background-color: var(--primary-dark);
}

.snapshot-btn i {
    font-size: 14px;
}

.snapshot-notes-section {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.snapshot-notes-section h4 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: #555;
}

.snapshot-note-item {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #666;
}

.snapshot-note-item .segment-name {
    font-weight: 500;
    color: #444;
}

.snapshot-branding {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: #888;
}

@media (max-width: 768px) {
    .snapshot-card {
        padding: 8px;
        margin: 0 0 15px;
        max-width: 100%;
        width: 100%;
        border-radius: 4px;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    }
    
    .snapshot-card h2 {
        font-size: 20px;
        margin-bottom: 10px;
        padding-bottom: 6px;
    }
    
    .snapshot-segment {
        margin-bottom: 8px;
        padding: 6px;
        border-radius: 4px;
    }
    
    .snapshot-segment h3 {
        font-size: 20px;
        margin-bottom: 6px;
    }
    
    .snapshot-movement {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 6px 0;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .snapshot-movement-name {
        font-size: 15px;
        font-weight: 600;
        max-width: 70%;
    }
    
    .snapshot-movement-count {
        font-size: 15px;
        font-weight: 500;
    }
    
    .snapshot-set {
        margin-bottom: 8px;
        padding: 6px;
        background-color: white;
        border-radius: 3px;
        box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    }
    
    .snapshot-set-header {
        display: flex;
        justify-content: space-between;
        font-size: 12px;
        margin-bottom: 5px;
        padding-bottom: 3px;
    }
    
    .snapshot-note-item {
        font-size: 0.85rem;
        line-height: 1.3;
        margin-bottom: 0.4rem;
    }
    
    .snapshot-notes-section h4 {
        margin-bottom: 0.4rem;
        font-size: 0.95rem;
    }
    
    .snapshot-notes-section {
        margin-top: 1.2rem;
        padding-top: 0.8rem;
    }
    
    .snapshot-branding {
        margin-top: 1.2rem;
        font-size: 0.75rem;
    }
    
    .snapshot-actions {
        margin: 15px 0;
    }
    
    .snapshot-btn {
        padding: 8px 15px;
        font-size: 14px;
        border-radius: 4px;
    }
    
    .app-container {
        max-width: 100%;
        width: 100%;
        margin: 0;
        padding: 0;
    }
    
    .results-content {
        padding: 0;
        width: 100%;
        max-width: 100%;
    }
    
    .tab-content {
        padding: 0;
        width: 100%;
        max-width: 100%;
    }
    
    #snapshotContent {
        padding: 0;
        width: 100%;
        max-width: 100%;
    }
}

/* Add styles for the refinement feature */

/* Create New Workout button */
.new-workout-btn {
    display: block;
    width: 100%;
    max-width: 250px;
    margin: 10px auto 0;
    padding: 10px 15px;
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    transition: all 0.2s ease;
}

.new-workout-btn:hover {
    background-color: #e9e9e9;
}

.new-workout-btn i {
    margin-right: 8px;
}

/* Refinement label */
.refinement-label {
    font-size: 12px;
    color: #666;
    background-color: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 4px;
    display: inline-block;
    font-weight: 500;
}

/* Adjust goal input when in refinement mode */
.text-input-container {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Make the create new workout button also work on mobile */
@media (max-width: 768px) {
    .new-workout-btn {
        max-width: 100%;
        margin-top: 15px;
    }
    
    .refinement-label {
        font-size: 11px;
    }
} 