/* Main Container */
.ft-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Dashboard Layout */
.ft-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.ft-dashboard-section {
    background: #fff;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Profile Summary */
.ft-dashboard-header {
    background: #fff;
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ft-profile-summary {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.ft-profile-picture {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
}

.ft-profile-info h2 {
    margin: 0;
    color: #333;
}

.ft-fitness-level {
    color: #666;
    margin: 0.5rem 0;
    text-transform: capitalize;
}

/* Statistics */
.ft-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.ft-stat-box {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.ft-stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

.ft-stat-label {
    display: block;
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.25rem;
}

/* Activity List */
.ft-activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ft-activity-list li {
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.ft-activity-list li:last-child {
    border-bottom: none;
}

.ft-activity-date {
    display: block;
    font-size: 0.875rem;
    color: #666;
}

.ft-activity-title {
    display: block;
    font-weight: bold;
    color: #333;
    margin: 0.25rem 0;
}

.ft-activity-meta {
    display: block;
    font-size: 0.875rem;
    color: #666;
}

/* Buttons */
.ft-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.2s;
}

.ft-button:hover {
    background: #0056b3;
    color: #fff;
}

/* Exercise Tracker */
.ft-exercise-tracker {
    padding: 2rem 0;
}

.ft-tracker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.ft-tracker-nav {
    display: flex;
    gap: 1rem;
}

.ft-exercise-card {
    background: #fff;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ft-exercise-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.ft-sets-container {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.ft-sets-header {
    display: grid;
    grid-template-columns: 60px 1fr 1fr 2fr;
    gap: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
    font-weight: bold;
}

.ft-set-row {
    display: grid;
    grid-template-columns: 60px 1fr 1fr 2fr;
    gap: 1rem;
    padding: 0.5rem 0;
    align-items: center;
}

.ft-exercise-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
}

.ft-completed {
    opacity: 0.7;
}

.ft-completed .ft-exercise-form {
    display: none;
}

.ft-exercise-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
}

.ft-completed-sets {
    display: flex;
    gap: 1rem;
}

.ft-completed-set {
    background: #fff;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: bold;
}

/* Profile Page */
.ft-profile {
    padding: 2rem 0;
}

.ft-profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.ft-profile-section {
    background: #fff;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ft-profile-picture-container {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
}

.ft-profile-picture-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ft-profile-picture-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    opacity: 0;
    transition: opacity 0.2s;
    cursor: pointer;
}

.ft-profile-picture-container:hover .ft-profile-picture-overlay {
    opacity: 1;
}

.ft-form-row {
    margin-bottom: 1rem;
}

.ft-form-row label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.ft-form-row input,
.ft-form-row select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.ft-form-actions {
    margin-top: 1.5rem;
}

.ft-measurement-table {
    width: 100%;
    border-collapse: collapse;
}

.ft-measurement-table th,
.ft-measurement-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.ft-measurement-table th {
    background: #f8f9fa;
    font-weight: bold;
}

/* Measurement Progress Styles */
.ft-measurement-row {
    margin-bottom: 20px;
}

.ft-measurement-input {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ft-measurement-progress {
    background-color: #f5f5f5;
    padding: 8px;
    border-radius: 4px;
}

.ft-progress-values {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 0.9em;
}

.ft-initial {
    color: #666;
}

.ft-difference {
    font-weight: bold;
}

.ft-difference.positive {
    color: #28a745;
}

.ft-difference.negative {
    color: #dc3545;
}

.ft-progress-bar {
    height: 6px;
    background-color: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.ft-progress-fill {
    height: 100%;
    background-color: #007bff;
    transition: width 0.3s ease;
}

.ft-difference.positive + .ft-progress-bar .ft-progress-fill {
    background-color: #28a745;
}

.ft-difference.negative + .ft-progress-bar .ft-progress-fill {
    background-color: #dc3545;
}

/* Progress Pictures Styles */
.ft-progress-pictures {
    text-align: center;
}

.ft-initial-upload {
    padding: 40px 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

.ft-initial-upload p {
    margin-bottom: 20px;
    color: #666;
}

.ft-progress-slider {
    margin: 20px 0;
}

.ft-slider-container {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 20px;
}

.ft-slider-before,
.ft-slider-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.ft-slider-after {
    width: 50%;
    border-right: 2px solid #fff;
}

.ft-slider-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    cursor: ew-resize;
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.ft-slider-handle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 800px;
    background: #fff;
    transform: translate(-50%, -50%);
}

.ft-slider-label {
    position: absolute;
    top: 20px;
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border-radius: 4px;
    font-size: 14px;
}

.ft-slider-before .ft-slider-label {
    left: 20px;
}

.ft-slider-after .ft-slider-label {
    right: 20px;
}

.ft-progress-form {
    margin-top: 20px;
}

/* Custom File Input */
.ft-profile-picture {
    margin-bottom: 20px;
    text-align: center;
}

.ft-picture-preview {
    width: 150px;
    height: 150px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ft-picture-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ft-no-picture {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #ccc;
}

.ft-picture-upload {
    position: relative;
    margin-top: 10px;
}

.ft-file-input {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

.ft-file-input + label {
    display: inline-block;
    padding: 8px 16px;
    background-color: #007bff;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.ft-file-input + label:hover {
    background-color: #0056b3;
}

.ft-upload-note {
    margin-top: 8px;
    font-size: 0.9em;
    color: #666;
}

/* File Upload Styles */
.ft-file-upload-wrapper {
    margin-bottom: 20px;
    text-align: center;
}

.ft-file-input {
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    z-index: -1;
}

.ft-file-input + label {
    display: inline-block;
    cursor: pointer;
    margin-right: 10px;
}

.selected-file-name {
    display: inline-block;
    margin-left: 10px;
    color: #666;
    font-style: italic;
}

.ft-button.ft-secondary {
    background-color: #6c757d;
    color: white;
}

.ft-button.ft-secondary:hover {
    background-color: #5a6268;
}

.ft-button.ft-primary {
    background-color: #007bff;
    color: white;
}

.ft-button.ft-primary:hover {
    background-color: #0056b3;
}

/* Message Styles */
.ft-message {
    margin: 20px 0;
    padding: 15px;
    border-radius: 4px;
}

.ft-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.ft-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Login Form Styles */
.ft-login-required {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
}

.ft-login-container {
    background: #fff;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ft-login-container h2 {
    margin: 0 0 1rem;
    color: #333;
    text-align: center;
}

.ft-login-container p {
    margin-bottom: 1.5rem;
    text-align: center;
    color: #666;
}

#ft-login-form {
    margin-top: 1.5rem;
}

#ft-login-form p {
    margin-bottom: 1rem;
}

#ft-login-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

#ft-login-form input[type="text"],
#ft-login-form input[type="password"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 1rem;
}

#ft-login-form .login-remember {
    display: flex;
    align-items: center;
    margin: 1rem 0;
}

#ft-login-form .login-remember label {
    margin: 0 0 0 0.5rem;
}

#ft-login-form .login-submit {
    text-align: center;
}

#ft-login-form input[type="submit"] {
    background: #007bff;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    width: 100%;
}

#ft-login-form input[type="submit"]:hover {
    background: #0056b3;
}

.ft-register-link {
    margin-top: 1.5rem !important;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.ft-register-link a {
    color: #007bff;
    text-decoration: none;
}

.ft-register-link a:hover {
    text-decoration: underline;
}

/* Modal */
.ft-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.ft-modal-content {
    position: relative;
    background: #fff;
    margin: 5% auto;
    padding: 1.5rem;
    width: 90%;
    max-width: 800px;
    border-radius: 10px;
}

.ft-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
}

.ft-video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.ft-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ft-container {
        padding: 1rem;
    }

    .ft-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .ft-profile-summary {
        flex-direction: column;
        text-align: center;
    }

    .ft-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ft-tracker-header {
        flex-direction: column;
        gap: 1rem;
    }

    .ft-sets-header,
    .ft-set-row {
        grid-template-columns: 60px 1fr 1fr;
    }

    .ft-sets-header span:last-child {
        display: none;
    }

    .ft-profile-grid {
        grid-template-columns: 1fr;
    }

    .ft-measurement-table {
        display: block;
        overflow-x: auto;
    }
}

/* User Plan Badge */
.ft-plan-badge {
    display: inline-block;
    background: #28a745;
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 10px;
    vertical-align: middle;
}

/* Exercise Row Layout */
.ft-exercise-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 10px;
    align-items: end;
    margin-bottom: 15px;
}

.ft-recent-workouts .ft-exercise-row {
    display: block;
}

/* Mobile responsive for exercise rows */
@media (max-width: 768px) {
    .ft-exercise-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .ft-exercise-row .ft-form-group:first-child {
        grid-column: 1 / -1;
    }
    
    .ft-exercise-row .ft-form-group:nth-child(2),
    .ft-exercise-row .ft-form-group:nth-child(3) {
        display: inline-block;
        width: 100%;
        vertical-align: top;
    }
    
    .ft-exercise-row .ft-form-group:nth-child(2) {
        margin-right: 10px;
    }
    
    .ft-exercise-row .ft-remove-exercise {
        width: 100%;
        margin-top: 10px;
    }
}
