/* Tool Pages Styles */

.tool-page {
    padding-top: 80px;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #4facfe 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    margin-top: 50px;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Page Header */
.page-header {
    margin-bottom: 4rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 3rem;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb, #f5576c, #4facfe);
    background-size: 300% 100%;
    animation: headerGradient 3s ease infinite;
}

@keyframes headerGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.page-header-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.page-info h1 {
    font-size: 3.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

.page-info h1 i {
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 4px 8px rgba(102, 126, 234, 0.3));
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.page-info p {
    font-size: 1.3rem;
    color: #555;
    line-height: 1.7;
    font-weight: 400;
}

.page-image {
    text-align: center;
    position: relative;
}

.page-image::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 30px;
    opacity: 0.1;
    z-index: -1;
    animation: imageBg 4s ease-in-out infinite;
}

@keyframes imageBg {
    0%, 100% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(1deg) scale(1.02); }
}

.page-image img {
    width: 100%;
    height: auto;
    border-radius: 25px;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.2);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.page-image img:hover {
    transform: scale(1.05) rotate(1deg);
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.3);
}

/* Tool Sections */
.tool-section {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.section-header h2 {
    font-size: 1.8rem;
    color: #333;
    margin: 0;
}

.section-header p {
    color: #666;
    margin: 0.5rem 0 0 0;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    cursor: pointer;
}

.checkbox-item:hover {
    background-color: #f8f9fa;
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

/* Button Styles */
.btn-large {
    padding: 15px 30px;
    font-size: 1.1rem;
    width: 100%;
    margin-top: 1rem;
}

.btn-success {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.4);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.6);
}

.plan-actions {
    display: flex;
    gap: 1rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #666;
}

.empty-state i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #333;
}

/* Workout Plan Display */
.workout-plan {
    margin-top: 2rem;
}

.workout-day {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid #667eea;
}

.workout-day h3 {
    color: #333;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.exercise-list {
    display: grid;
    gap: 1rem;
}

.exercise-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.exercise-info h4 {
    color: #333;
    margin-bottom: 0.25rem;
}

.exercise-info p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

.exercise-sets {
    font-weight: 600;
    color: #667eea;
}

/* Progress Indicators */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

/* Timer Display */
.timer-display {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    margin: 2rem 0;
}

.timer-display .time {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.timer-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-header-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .page-info h1 {
        font-size: 2rem;
        justify-content: center;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .plan-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .exercise-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .timer-display .time {
        font-size: 3rem;
    }
    
    .timer-controls {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .tool-section {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .page-info h1 {
        font-size: 1.8rem;
    }
    
    .timer-display .time {
        font-size: 2.5rem;
    }
}

/* Food Search Suggestions */
.food-suggestions {
    position: relative;
    margin-top: 0.5rem;
}

.suggestions-list {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
}

.suggestion-item {
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.suggestion-item:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateX(5px);
}

.food-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
    text-transform: capitalize;
}

.food-nutrition {
    font-size: 0.9rem;
    color: #666;
}

.no-suggestions {
    padding: 1rem;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* Nutrition Summary Cards */
.nutrition-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.nutrition-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.nutrition-card:hover {
    transform: translateY(-3px);
}

.nutrition-card h3 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nutrition-value {
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.25rem;
}

.nutrition-unit {
    font-size: 0.9rem;
    color: #666;
}
