/* Visual Enhancements CSS */

/* Profile bar styling */
.profile-item {
    margin-bottom: 1.5rem;
}

.profile-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.profile-bar-container {
    display: flex;
    align-items: center;
    background-color: #f0f0f0;
    border-radius: 30px;
    height: 24px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.profile-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--color-fitness), var(--color-mindbody));
    border-radius: 30px;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.profile-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, transparent 50%);
    border-radius: 30px;
}

.profile-percentage {
    margin-left: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
}

/* Enhanced Section Animations */
.section {
    transform: translateY(20px);
    transition: opacity var(--transition-speed), transform var(--transition-speed);
}

.section.active {
    transform: translateY(0);
}

/* Option Selection Enhancements */
.option {
    position: relative;
    overflow: hidden;
}

.option:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--color-fitness-bg), transparent);
    transition: width 0.4s ease;
    z-index: 0;
    pointer-events: none;
}

.option:hover:after {
    width: 100%;
}

.option.selected:after {
    width: 100%;
    background: var(--color-fitness-bg);
}

/* Option selection bounce animation */
@keyframes optionSelect {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1);
    }
}

.option.selected {
    animation: optionSelect 0.3s ease;
}

/* Button Enhancements */
.btn {
    position: relative;
    overflow: hidden;
}

.btn:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.btn:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }

    20% {
        transform: scale(25, 25);
        opacity: 0.5;
    }

    100% {
        opacity: 0;
        transform: scale(40, 40);
    }
}

/* Question transition animations */
@keyframes slideInRight {
    from {
        transform: translateX(50px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-50px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.question {
    animation: slideInRight 0.5s ease-out;
}

.question.slide-left {
    animation: slideInLeft 0.5s ease-out;
}

/* Result reveal animations */
@keyframes revealUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.result-card {
    animation: revealUp 0.8s ease-out;
}

.result-summary {
    animation: revealUp 0.8s ease-out 0.2s both;
}

.result-image {
    animation: scaleIn 0.8s ease-out 0.4s both;
}

.result-image img {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.result-details {
    animation: revealUp 0.8s ease-out 0.6s both;
}

.result-actions {
    animation: revealUp 0.8s ease-out 0.8s both;
}

/* Enhanced activity type cards */
.activity-type {
    position: relative;
    overflow: hidden;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.activity-type:nth-child(1) {
    border-left-color: var(--color-fitness);
}

.activity-type:nth-child(2) {
    border-left-color: var(--color-recreation);
}

.activity-type:nth-child(3) {
    border-left-color: var(--color-mindbody);
}

.activity-type:nth-child(4) {
    border-left-color: var(--color-sports);
}

.activity-type:hover {
    box-shadow: var(--shadow-md);
}

/* Activity icon styling */
.activity-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.75rem;
    line-height: 1;
}

/* Welcome section enhancements */
.welcome-content h2 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--color-fitness) 0%, var(--color-mindbody) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-content>p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 2rem auto;
    color: var(--light-text);
}

/* Processing section enhancements */
.processing-content h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.processing-content p {
    color: var(--light-text);
    font-size: 1rem;
}

/* Step indicators pulse animation */
@keyframes stepPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }
}

.step-dot.active {
    animation: stepPulse 1.5s ease-in-out infinite;
}

/* Results section celebration */
@keyframes celebrationShine {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.4) 50%,
            transparent 100%);
    background-size: 200% 100%;
    animation: celebrationShine 2s ease-out;
    pointer-events: none;
    border-radius: 20px;
}

/* Header gradient animation */
@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

header h1 {
    background-size: 200% auto;
    animation: gradientFlow 4s ease infinite;
}

/* Textarea focus state */
.open-ended textarea {
    transition: all 0.3s ease;
    border: 2px solid #e0e0e0;
}

.open-ended textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--color-fitness-bg);
}

/* Navigation buttons hover states */
.nav-btn:not(:disabled):hover {
    transform: translateY(-3px);
}

#prev-btn:not(:disabled) {
    background: linear-gradient(135deg, #78909C 0%, #90A4AE 100%);
}

#prev-btn:not(:disabled):hover {
    background: linear-gradient(135deg, #607D8B 0%, #78909C 100%);
}

/* Responsive improvements */
@media (max-width: 768px) {
    .profile-bar-container {
        height: 18px;
    }

    .profile-percentage {
        font-size: 0.85rem;
    }

    .activity-type {
        border-left-width: 5px;
    }

    .activity-icon {
        font-size: 2rem;
    }

    .welcome-content h2 {
        font-size: 1.8rem;
    }

    .step-indicators {
        padding: 0;
    }

    .step-dot {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .activity-icon {
        font-size: 1.75rem;
    }

    .step-dot {
        width: 8px;
        height: 8px;
    }
}