/* Additional Features Styles */

/* Audio Controls */
.audio-controls {
    margin-top: 20px;
    padding: 20px;
    background: rgba(232, 168, 124, 0.1);
    border-radius: 15px;
    text-align: center;
}

.audio-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.audio-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    margin: 5px 10px;
}

.audio-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.volume-slider {
    width: 120px;
    height: 6px;
    border-radius: 5px;
    background: #e5e7eb;
    outline: none;
    cursor: pointer;
    margin: 0 10px;
}

.volume-label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-left: 5px;
}

/* Audio status styling */
.audio-status {
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(133, 163, 163, 0.1);
    border-radius: 8px;
    text-align: center;
}

.audio-status small {
    color: var(--text-light);
    font-size: 0.8rem;
    font-style: italic;
}

/* Responsive adjustments for new audio controls */
@media (max-width: 768px) {
    .audio-section {
        flex-direction: column;
        gap: 10px;
    }
    
    .audio-toggle {
        margin: 3px 0;
        justify-content: center;
    }
    
    .volume-slider {
        width: 200px;
    }
}
@media (max-width: 768px) {
    .audio-section {
        flex-direction: column;
        gap: 15px;
    }
    
    .audio-toggle {
        margin: 5px 0;
    }
    
    .volume-slider {
        width: 150px;
    }
}

.volume-slider::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.volume-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
}

/* Progress Tracking Styles */
.progress-stats {
    background: white;
    padding: 30px;
    border-radius: 20px;
    margin: 30px 0;
    box-shadow: var(--gentle-shadow);
    text-align: center;
}

.stats-header h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 25px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 25px;
    margin: 25px 0;
}

.stat-item {
    background: var(--soft-gray);
    padding: 20px;
    border-radius: 15px;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-3px);
}

.stat-number {
    font-size: 2.2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.milestone-check {
    background: linear-gradient(135deg, rgba(232, 168, 124, 0.1), rgba(195, 141, 158, 0.1));
    padding: 20px;
    border-radius: 15px;
    margin-top: 25px;
    font-size: 1.1rem;
    color: var(--text-dark);
    border-left: 4px solid var(--primary-color);
}

/* Sharing Section Styles */
.sharing-section {
    background: white;
    padding: 25px;
    border-radius: 20px;
    margin: 30px 0;
    box-shadow: var(--gentle-shadow);
    text-align: center;
}

.sharing-section h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.sharing-section p {
    color: var(--text-light);
    margin-bottom: 20px;
}

.sharing-options {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.sharing-options .secondary-btn {
    font-size: 0.9rem;
    padding: 10px 20px;
}

.privacy-note {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

.privacy-note small {
    color: var(--accent-color);
    font-style: italic;
}

/* Reset data button styling */
.reset-data-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.reset-btn {
    background: #dc2626;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 8px;
}

.reset-btn:hover {
    background: #b91c1c;
    transform: translateY(-1px);
}

.reset-warning {
    display: block;
    color: #6b7280;
    font-size: 0.8rem;
    font-style: italic;
    margin-top: 5px;
}

/* Personalization Styles */
.personalization-section {
    background: var(--secondary-color);
    padding: 20px;
    border-radius: 15px;
    margin: 25px 0;
    text-align: center;
}

.personal-greeting input {
    width: 100%;
    max-width: 300px;
    padding: 12px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 25px;
    font-size: 1rem;
    text-align: center;
    background: white;
    transition: border-color 0.3s ease;
    margin-bottom: 8px;
}

.personal-greeting input:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.personal-greeting small {
    color: #ffffff;
    font-style: italic;
}

/* Daily Reminders Styles */
.reminder-section {
    background: white;
    padding: 25px;
    border-radius: 20px;
    margin: 30px 0;
    box-shadow: var(--gentle-shadow);
    text-align: center;
}

.reminder-section h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.reminder-section p {
    color: var(--text-light);
    margin-bottom: 20px;
}

.reminder-options {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.reminder-options input[type="time"] {
    padding: 10px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    color: var(--text-dark);
}

.reminder-options input[type="time"]:focus {
    outline: none;
    border-color: var(--primary-color);
}

.reminder-status {
    margin-top: 15px;
    padding: 10px;
    border-radius: 8px;
    font-weight: 500;
    min-height: 20px;
}

.reminder-status:not(:empty) {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Toast Messages */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.toast-message {
    animation: slideUp 0.3s ease;
}

/* Enhanced Accessibility */
.sharing-options button:focus,
.reminder-options button:focus,
.audio-toggle:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Reflection Animation Styles - Fixed for viewport visibility */
.reflection-animations {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 9999;
}

.floating-element {
    position: fixed;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    pointer-events: none;
    will-change: transform, opacity;
}

.floating-emoji {
    font-size: 2.5rem;
    margin-bottom: 8px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    animation: gentleBob 3s ease-in-out infinite;
    will-change: transform;
}

.floating-label {
    font-size: 0.9rem;
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 12px;
    border-radius: 15px;
    white-space: nowrap;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(232, 168, 124, 0.3);
}

/* Gentle bobbing motion for emojis */
@keyframes gentleBob {
    0%, 100% {
        transform: translateY(0px) rotate(-2deg);
    }
    25% {
        transform: translateY(-5px) rotate(1deg);
    }
    50% {
        transform: translateY(-2px) rotate(0deg);
    }
    75% {
        transform: translateY(-3px) rotate(-1deg);
    }
}

/* Special animations for different types of elements */
.floating-element:nth-child(3n) .floating-emoji {
    animation: gentleBob 4s ease-in-out infinite, gentleSpin 12s linear infinite;
}

.floating-element:nth-child(5n) .floating-emoji {
    animation: gentleBob 3.5s ease-in-out infinite, pulseGlow 6s ease-in-out infinite;
}

.floating-element:nth-child(7n) .floating-emoji {
    animation: gentleBob 2.8s ease-in-out infinite, gentleScale 8s ease-in-out infinite;
}

@keyframes gentleSpin {
    from { transform: rotate(0deg) translateY(-2px); }
    to { transform: rotate(360deg) translateY(-2px); }
}

@keyframes pulseGlow {
    0%, 100% {
        filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(232, 168, 124, 0.8)) drop-shadow(0 0 40px rgba(195, 141, 158, 0.4));
    }
}

@keyframes gentleScale {
    0%, 100% {
        transform: scale(1) translateY(-2px);
    }
    50% {
        transform: scale(1.1) translateY(-4px);
    }
}

/* Responsive adjustments for animations */
@media (max-width: 768px) {
    .floating-emoji {
        font-size: 2rem;
    }
    
    .floating-label {
        font-size: 0.8rem;
        padding: 4px 8px;
    }
}

@media (max-width: 480px) {
    .floating-emoji {
        font-size: 1.8rem;
    }
    
    .floating-label {
        font-size: 0.75rem;
        padding: 3px 6px;
    }
}

/* Ensure animations are visible above all content */
.reflection-animations {
    z-index: 9999 !important;
}

/* Add a subtle overlay effect during animations */
.reflection-animations::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(232, 168, 124, 0.02) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* Accessibility: Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .floating-element,
    .floating-emoji,
    .floating-label {
        animation: none !important;
        transition: none !important;
    }
    
    .floating-element {
        display: none; /* Hide animations for users who prefer reduced motion */
    }
    
    .reflection-animations {
        display: none;
    }
}
@media (max-width: 768px) {
    .audio-section {
        flex-direction: column;
        gap: 15px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .sharing-options {
        flex-direction: column;
        align-items: center;
    }
    
    .sharing-options .secondary-btn {
        width: 100%;
        max-width: 250px;
    }
    
    .reminder-options {
        flex-direction: column;
        gap: 15px;
    }
    
    .reminder-options input[type="time"] {
        width: 100%;
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-item {
        padding: 15px;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .progress-stats,
    .sharing-section,
    .reminder-section {
        padding: 20px;
        margin: 20px 0;
    }
    
    .audio-controls {
        padding: 15px;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .progress-stats,
    .sharing-section,
    .reminder-section {
        background: #374151;
        color: #f9fafb;
    }
    
    .stat-item {
        background: #4b5563;
    }
    
    .personal-greeting input,
    .reminder-options input[type="time"] {
        background: #374151;
        color: #f9fafb;
        border-color: #6b7280;
    }
}
    /* style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #218589 ; /* - Teal*/
    --secondary-color: #1f4172 ; /* - Navy blue */
    --accent-color: #85a3a3;
    --warm-white: #fef7f0;
    --soft-gray: #f5f3f0;
    --text-dark: #3d4142;
    --text-light: #6b7280;
    --success-color: #10b981;
    --gentle-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    --soft-border: 1px solid rgba(196, 181, 253, 0.2);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, var(--primary-color) 20%, var(--primary-color) 100%);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 20px;
    background: white;
    border-radius: 20px;
    box-shadow: var(--gentle-shadow);
}

.heart-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    animation: gentle-pulse 2s ease-in-out infinite;
}

@keyframes gentle-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
    font-style: italic;
}

/* Screen Management */
.screen {
    display: none;
    flex: 1;
    animation: fadeIn 0.5s ease-in;
}

.screen.active {
    display: block;

}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(232, 168, 124, 0.2);
    border-radius: 10px;
    margin-bottom: 30px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    transition: width 0.8s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Welcome Screen */
.welcome-content {
    text-align: center;
    padding: 40px 20px;
    background: var(--primary-color);
    border-radius: 20px;
    box-shadow: var(--gentle-shadow);
}

.welcome-content h2 {
    font-size: 2rem;
    color: #ffffff);
    margin-bottom: 20px;
}

.welcome-content p {
    font-size: 1.2rem;
    color: #ffffff;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.three-components {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.component {
    padding: 30px 20px;
    background: var(--soft-gray);
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease;
}

.component:hover {
    transform: translateY(-5px);
}

.component-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.component h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.component p {
    font-size: 0.95rem;
    color: var(--text-light);
}

/* Buttons */
.primary-btn, .secondary-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 10px;
}

.primary-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: var(--gentle-shadow);
}

.primary-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(232, 168, 124, 0.3);
}

.primary-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.secondary-btn {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.secondary-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* Situation Selection */
.situation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.situation-card {
    background: white;
    border: 2px solid transparent;
    border-radius: 15px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 15px;
}

.situation-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--gentle-shadow);
}

.situation-card.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(232, 168, 124, 0.1), rgba(195, 141, 158, 0.1));
}

.situation-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.situation-text {
    font-size: 1.1rem;
    color: var(--text-dark);
    font-weight: 500;
}

.custom-situation {
    margin: 30px 0;
}

.custom-situation label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-dark);
}

.custom-situation textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.custom-situation textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Step Screens */
.step-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px;
    background: white;
    border-radius: 20px;
    box-shadow: var(--gentle-shadow);
}

.step-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.step-header h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.step-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    font-style: italic;
}

.instruction-box {
    background: linear-gradient(135deg, rgba(232, 168, 124, 0.1), rgba(195, 141, 158, 0.1));
    padding: 25px;
    border-radius: 15px;
    margin: 25px 0;
    border-left: 5px solid var(--primary-color);
}

.instruction-box p {
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Breathing Guide */
.breathing-guide {
    text-align: center;
    margin: 40px 0;
}

.breath-circle {
    width: 200px;
    height: 200px;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    margin: 0 auto 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(232, 168, 124, 0.1), rgba(195, 141, 158, 0.1));
    transition: all 0.3s ease;
    position: relative;
}

.breath-circle.breathing {
    /* Remove the automatic animation, we'll control it with JavaScript */
}

@keyframes breatheIn {
    0% { transform: scale(1); }
    100% { transform: scale(1.2); }
}

@keyframes breatheOut {
    0% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Enhanced breath circle with smooth animations */
.breath-circle {
    width: 200px;
    height: 200px;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    margin: 0 auto 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(232, 168, 124, 0.1), rgba(195, 141, 158, 0.1));
    position: relative;
    box-shadow: 0 0 20px rgba(232, 168, 124, 0.3);
    transform: scale(1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.breath-circle.breathing {
    box-shadow: 0 0 40px rgba(232, 168, 124, 0.6);
    border-color: var(--secondary-color);
}

/* Breathing animation states */
.breath-circle.inhaling {
    background: linear-gradient(135deg, rgba(232, 168, 124, 0.2), rgba(195, 141, 158, 0.2));
}

.breath-circle.exhaling {
    background: linear-gradient(135deg, rgba(133, 163, 163, 0.1), rgba(195, 141, 158, 0.1));
}

.breath-text {
    font-size: 1rem;
    color: #ffffff;
    font-weight: 500;
    text-align: center;
    padding: 20px;
    line-height: 1.4;
    transition: all 0.3s ease;
    max-width: 160px;
}

.breath-text {
    color: #ffffff; 
}

/* Breathing guidance text styles */
.breath-circle.breathing .breath-text {
    font-weight: 600;
    color: #ffffff;
}

/* Add a subtle pulse effect during breathing */
.breath-circle.breathing::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    opacity: 0.3;
    animation: breathePulse 2s ease-in-out infinite;
}

@keyframes breathePulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 0.3;
    }
    50% { 
        transform: scale(1.05);
        opacity: 0.1;
    }
}

/* Better visual feedback for breathing phases */
.breathing-phase-indicator {
    text-align: center;
    margin-top: 15px;
    font-size: 0.9rem;
    color: var(--text-light);
    min-height: 20px;
}

/* Responsive breathing circle */
@media (max-width: 480px) {
    .breath-circle {
        width: 160px;
        height: 160px;
    }
    
    .breath-text {
        font-size: 0.9rem;
        padding: 15px;
        max-width: 130px;
    }
    
    .breath-circle::before {
        top: -8px;
        left: -8px;
        right: -8px;
        bottom: -8px;
    }
}

.breath-text {
    font-size: 1.1rem;
    color: white;
    font-weight: 500;
    text-align: center;
    padding: 20px;
}

.breath-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.breath-btn:hover {
    background: #6b8e8e;
    transform: translateY(-2px);
}

/* Phrase Text */
.phrase-text {
    background: white;
    padding: 30px;
    border-radius: 15px;
    font-size: 1.3rem;
    line-height: 1.8;
    color: var(--text-dark);
    text-align: center;
    box-shadow: var(--gentle-shadow);
    margin: 20px 0;
    border-left: 5px solid var(--secondary-color);
}

/* Humanity Visualization */
.humanity-visualization {
    text-align: center;
    margin: 40px 0;
    padding: 30px;
    background: white;
    border-radius: 15px;
    box-shadow: var(--gentle-shadow);
}

.connection-circles {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.person-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    animation: connectPulse 2s ease-in-out infinite;
}

.person-circle.me {
    background: var(--primary-color);
    animation-delay: 0s;
}

.person-circle:nth-child(2) {
    background: var(--secondary-color);
    animation-delay: 0.5s;
}

.person-circle:nth-child(3) {
    background: var(--accent-color);
    animation-delay: 1s;
}

.person-circle:nth-child(4) {
    background: #9ca3af;
    animation-delay: 1.5s;
}

@keyframes connectPulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
}

.connection-text {
    font-size: 1.1rem;
    color: var(--text-light);
    font-style: italic;
}

/* Reflection */
.reflection-prompt {
    background: white;
    padding: 25px;
    border-radius: 15px;
    margin: 25px 0;
    box-shadow: var(--gentle-shadow);
}

.reflection-prompt h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.reflection-timer {
    margin-top: 20px;
    text-align: center;
}

.timer-bar {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 10px;
    margin-top: 15px;
    overflow: hidden;
}

.timer-bar.active::after {
    content: '';
    display: block;
    height: 100%;
    background: var(--success-color);
    width: 0%;
    animation: timer-progress 30s linear forwards;
}

@keyframes timer-progress {
    to { width: 100%; }
}

/* Kindness Gesture */
.kindness-gesture {
    text-align: center;
    margin: 30px 0;
    padding: 30px;
    background: white;
    border-radius: 15px;
    box-shadow: var(--gentle-shadow);
}

.gesture-guide h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.gesture-demo {
    font-size: 4rem;
    margin: 20px 0;
    animation: gentle-pulse 3s ease-in-out infinite;
}

/* Personal Message */
.personal-message {
    background: white;
    padding: 25px;
    border-radius: 15px;
    margin: 25px 0;
    box-shadow: var(--gentle-shadow);
}

.personal-message h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.personal-message textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    margin: 15px 0;
    transition: border-color 0.3s ease;
}

.personal-message textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Completion Screen */
.completion-content {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border-radius: 20px;
    box-shadow: var(--gentle-shadow);
}

.celebration-icon {
    font-size: 4rem;
    margin-bottom: 30px;
    animation: celebrate 2s ease-in-out infinite;
}

@keyframes celebrate {
    0%, 100% { transform: rotate(-5deg) scale(1); }
    50% { transform: rotate(5deg) scale(1.1); }
}

.completion-content h2 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 30px;
}

.completion-summary {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.summary-item {
    text-align: center;
    padding: 20px;
    background: var(--soft-gray);
    border-radius: 15px;
    min-width: 200px;
}

.summary-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.neff-quote {
    margin: 40px 0;
    padding: 30px;
    background: linear-gradient(135deg, rgba(232, 168, 124, 0.1), rgba(195, 141, 158, 0.1));
    border-radius: 15px;
    border-left: 5px solid var(--secondary-color);
}

.neff-quote blockquote {
    font-size: 1.3rem;
    font-style: italic;
    color: var(--text-dark);
    line-height: 1.6;
}

.neff-quote cite {
    display: block;
    margin-top: 15px;
    font-size: 1rem;
    color: var(--text-light);
}

.next-steps {
    text-align: left;
    margin: 40px 0;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.next-steps h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.next-steps ul {
    list-style: none;
    padding: 0;
}

.next-steps li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.next-steps li::before {
    content: "💝";
    position: absolute;
    left: 0;
    top: 10px;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: wrap;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: auto;
    padding: 30px 20px;
    color: white;
    font-size: 0.9rem;
}

.footer a {
    color: white;
    text-decoration: none;
    font-weight: 600;
}

.footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .three-components {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .situation-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .situation-card {
        padding: 20px;
    }
    
    .breath-circle {
        width: 150px;
        height: 150px;
    }
    
    .phrase-text {
        font-size: 1.1rem;
        padding: 20px;
    }
    
    .connection-circles {
        gap: 15px;
    }
    
    .person-circle {
        width: 60px;
        height: 60px;
        font-size: 0.8rem;
    }
    
    .completion-summary {
        flex-direction: column;
        gap: 20px;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .primary-btn, .secondary-btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 20px 15px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .step-header {
        padding: 20px;
    }
    
    .step-header h2 {
        font-size: 1.6rem;
    }
    
    .welcome-content h2 {
        font-size: 1.8rem;
    }
    
    .completion-content h2 {
        font-size: 1.8rem;
    }
}

/* Animation for elements entering view */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: slideInUp 0.6s ease-out forwards;
}

/* Loading states */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary-color);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for accessibility */
button:focus,
textarea:focus,
.situation-card:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #d97706;
        --secondary-color: #be185d;
        --text-dark: #000000;
        --text-light: #374151;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Integration & Finale Screen Styles */

#integration-screen {
    background: var(--primary-color);
    color: white;
}

.integration-header {
    background: white;
    color: var(--text-dark);
    text-align: center;
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: var(--gentle-shadow);
    margin-bottom: 30px;
}

.integration-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
    animation: gentle-grow 3s ease-in-out infinite;
}

@keyframes gentle-grow {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.integration-header h2 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 700;
}

.integration-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    font-style: italic;
}

/* Section Base Styles */
.transformation-section,
.insights-section,
.commitment-section,
.next-steps-section,
.future-self-section,
.completion-certificate {
    background: white;
    color: var(--text-dark);
    padding: 30px;
    border-radius: 20px;
    margin: 25px 0;
    box-shadow: var(--gentle-shadow);
}

.transformation-section h3,
.insights-section h3,
.commitment-section h3,
.next-steps-section h3,
.future-self-section h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-align: center;
}

/* Before/After Comparison */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 30px;
    margin: 30px 0;
    align-items: center;
}

.comparison-side {
    background: var(--soft-gray);
    padding: 25px;
    border-radius: 15px;
    min-height: 300px;
}

.comparison-side.before {
    border-left: 5px solid #ef4444;
}

.comparison-side.after {
    border-left: 5px solid #10b981;
}

.comparison-side h4 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 20px;
    text-align: center;
}

.comparison-arrow {
    font-size: 2rem;
    color: var(--primary-color);
    font-weight: bold;
}

.before-data {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.before-item {
    background: rgba(239, 68, 68, 0.1);
    padding: 12px 15px;
    border-radius: 8px;
    border-left: 3px solid #ef4444;
}

.before-label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.before-value {
    color: var(--text-light);
    font-size: 1rem;
}

/* Post-Assessment Sliders */
.after-assessment {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.assessment-item {
    background: rgba(16, 185, 129, 0.1);
    padding: 15px;
    border-radius: 10px;
    border-left: 3px solid #10b981;
}

.assessment-item label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.post-slider {
    flex: 1;
    height: 8px;
    border-radius: 5px;
    background: linear-gradient(to right, #10b981 0%, #f59e0b 50%, #ef4444 100%);
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
}

.post-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    cursor: pointer;
    border: 3px solid #10b981;
}

.slider-value {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.2rem;
    min-width: 30px;
    text-align: center;
}

/* Change Insight */
.change-insight {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(232, 168, 124, 0.1));
    padding: 25px;
    border-radius: 15px;
    margin-top: 30px;
    border-left: 5px solid var(--success-color);
    animation: slideInUp 0.6s ease-out;
}

.insight-content h4 {
    color: var(--success-color);
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.insight-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-dark);
}

/* Insights Section */
.insight-prompts {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin: 25px 0;
}

.prompt-group label {
    display: block;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.prompt-group textarea {
    width: 100%;
    min-height: 100px;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.3s ease;
}

.prompt-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(232, 168, 124, 0.05);
    box-shadow: 0 0 0 3px rgba(232, 168, 124, 0.1);
}

/* Commitment Section */
.commitment-options {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin: 25px 0;
}

.commitment-frequency h4,
.commitment-triggers h4,
.commitment-reminder h4 {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.frequency-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.frequency-btn {
    background: var(--soft-gray);
    border: 2px solid transparent;
    border-radius: 15px;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    text-align: center;
}

.frequency-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.frequency-btn.selected {
    background: var(--secondary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(195, 141, 158, 0.3);
}

.trigger-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trigger-option {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 12px 15px;
    border-radius: 10px;
    transition: background-color 0.3s ease;
}

.trigger-option:hover {
    background: rgba(232, 168, 124, 0.1);
}

.trigger-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary-color);
}

.trigger-option span {
    font-size: 1.05rem;
    color: var(--text-dark);
}

.reminder-setup {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.reminder-setup label {
    font-weight: 500;
    color: var(--text-dark);
}

.reminder-setup input[type="time"] {
    padding: 10px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
}

/* Next Steps Section */
.personalized-recommendations {
    background: linear-gradient(135deg, rgba(232, 168, 124, 0.1), rgba(195, 141, 158, 0.1));
    padding: 25px;
    border-radius: 15px;
    margin: 20px 0;
    border-left: 5px solid var(--primary-color);
}

.recommendation-item {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin: 15px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 4px solid var(--secondary-color);
}

.recommendation-title {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.recommendation-description {
    color: var(--text-dark);
    line-height: 1.5;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.resource-card {
    background: var(--soft-gray);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease;
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.resource-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.resource-title {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 10px;
}

.resource-description {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Future Self Letter */
.letter-writing {
    margin: 25px 0;
}

#future-self-letter {
    width: 100%;
    min-height: 200px;
    padding: 20px;
    border: 2px solid #e5e7eb;
    border-radius: 15px;
    font-family: 'Georgia', serif;
    font-size: 1.1rem;
    line-height: 1.8;
    resize: vertical;
    transition: all 0.3s ease;
    background: rgba(232, 168, 124, 0.05);
}

#future-self-letter:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(232, 168, 124, 0.1);
}

.letter-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.letter-option {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.letter-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

/* Completion Certificate */
.completion-certificate {
    background: linear-gradient(135deg, rgba(232, 168, 124, 0.1), rgba(195, 141, 158, 0.1));
    border: 3px solid var(--primary-color);
    text-align: center;
    position: relative;
}

.completion-certificate::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 2px solid var(--secondary-color);
    border-radius: 25px;
    z-index: -1;
}

.certificate-header {
    margin-bottom: 25px;
}

.certificate-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    animation: gentle-pulse 2s ease-in-out infinite;
}

.certificate-header h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 0;
}

.certificate-body p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 15px 0;
    color: var(--text-dark);
}

.certificate-body strong {
    color: var(--secondary-color);
    font-size: 1.2rem;
}

.practice-stats {
    display: flex;
    justify-content: space-around;
    margin: 25px 0;
    flex-wrap: wrap;
    gap: 20px;
}

.stat {
    text-align: center;
    background: white;
    padding: 20px;
    border-radius: 15px;
    min-width: 120px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.stat-number {
    display: block;
    font-size: 2.2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Final Actions */
.final-actions {
    background: white;
    padding: 30px;
    border-radius: 20px;
    margin: 25px 0;
    text-align: center;
    box-shadow: var(--gentle-shadow);
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.final-message {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #e5e7eb;
}

.final-message p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-dark);
    margin: 15px 0;
}

.final-message em {
    color: var(--primary-color);
    font-style: italic;
    font-size: 1.2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .comparison-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .comparison-arrow {
        transform: rotate(90deg);
        justify-self: center;
    }
    
    .frequency-buttons {
        grid-template-columns: 1fr;
    }
    
    .resources-grid {
        grid-template-columns: 1fr;
    }
    
    .practice-stats {
        flex-direction: column;
        align-items: center;
    }
    
    .action-grid {
        grid-template-columns: 1fr;
    }
    
    .reminder-setup {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .integration-header {
        padding: 25px 20px;
    }
    
    .integration-header h2 {
        font-size: 1.8rem;
    }
    
    .transformation-section,
    .insights-section,
    .commitment-section,
    .next-steps-section,
    .future-self-section,
    .completion-certificate {
        padding: 20px;
    }
    
    .comparison-side {
        padding: 20px;
        min-height: auto;
    }
    
    .certificate-header h3 {
        font-size: 1.5rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
}

/* Improved Textarea Styles for Pre-Reflection Screen */

/* Body sensations and inner critic textareas - better styling */
#body-sensations,
#inner-critic-thoughts {
    width: 100%;
    min-height: 100px; /* Increased from default */
    padding: 20px; /* More padding for breathing room */
    border: 2px solid #e5e7eb;
    border-radius: 15px; /* More rounded corners */
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.6; /* Better line spacing */
    resize: vertical;
    transition: all 0.3s ease;
    margin-top: 15px;
    background: rgba(255, 255, 255, 0.9); /* Slightly transparent white */
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); /* Subtle shadow */
}

#body-sensations:focus,
#inner-critic-thoughts:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white; /* Solid white when focused */
    box-shadow: 0 0 0 4px rgba(33, 133, 137, 0.1), 0 4px 8px rgba(0,0,0,0.1); /* Glowing effect */
    transform: translateY(-1px); /* Subtle lift effect */
}

/* Placeholder text styling */
#body-sensations::placeholder,
#inner-critic-thoughts::placeholder {
    color: #9ca3af;
    font-style: italic;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Container styling for better layout */
.awareness-section textarea,
.critic-section textarea {
    margin-top: 20px;
    margin-bottom: 15px;
}

/* Add some breathing room around textareas */
.awareness-section,
.critic-section {
    padding: 30px 25px; /* More generous padding */
}

/* Better spacing for the body awareness grid */
.body-awareness-grid {
    margin: 25px 0 30px 0; /* More space after grid */
}

/* Improved label spacing */
.awareness-section p,
.critic-section p {
    margin-bottom: 15px;
    line-height: 1.6;
}

/* Responsive improvements */
@media (max-width: 768px) {
    #body-sensations,
    #inner-critic-thoughts {
        min-height: 80px;
        padding: 15px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .awareness-section,
    .critic-section {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    #body-sensations,
    #inner-critic-thoughts {
        min-height: 70px;
        padding: 12px;
        border-radius: 10px;
    }
}

/* Enhanced Emotion Button Styling */

/* Emotion Grid Layout */
.emotion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
    margin: 25px 0;
    padding: 10px 0;
}

/* Base Emotion Button Styling */
.emotion-btn {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    padding: 16px 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    min-height: 60px;
}

/* Hover State */
.emotion-btn:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e7479 100%);
    color: white;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(33, 133, 137, 0.25);
    border-color: var(--primary-color);
}

/* Selected State - More Prominent */
.emotion-btn.selected {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #1a365d 100%);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(31, 65, 114, 0.4);
    position: relative;
}

/* Selected state indicator */
.emotion-btn.selected::before {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emotion-btn.selected::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    color: white;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

/* Active/Press State */
.emotion-btn:active {
    transform: translateY(-1px) scale(0.98);
    transition-duration: 0.1s;
}

/* Focus State for Accessibility */
.emotion-btn:focus {
    outline: none;
    ring: 3px solid rgba(33, 133, 137, 0.3);
    border-color: var(--primary-color);
}

/* Individual Emotion Color Themes (Optional) */
.emotion-btn[data-emotion="angry"]:hover,
.emotion-btn[data-emotion="angry"].selected {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    border-color: #dc2626;
}

.emotion-btn[data-emotion="sad"]:hover,
.emotion-btn[data-emotion="sad"].selected {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-color: #2563eb;
}

.emotion-btn[data-emotion="anxious"]:hover,
.emotion-btn[data-emotion="anxious"].selected {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    border-color: #d97706;
}

.emotion-btn[data-emotion="ashamed"]:hover,
.emotion-btn[data-emotion="ashamed"].selected {
    background: linear-gradient(135deg, #7c2d12 0%, #651408 100%);
    border-color: #7c2d12;
}

.emotion-btn[data-emotion="frustrated"]:hover,
.emotion-btn[data-emotion="frustrated"].selected {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
    border-color: #ea580c;
}

.emotion-btn[data-emotion="disappointed"]:hover,
.emotion-btn[data-emotion="disappointed"].selected {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    border-color: #6b7280;
}

.emotion-btn[data-emotion="lonely"]:hover,
.emotion-btn[data-emotion="lonely"].selected {
    background: linear-gradient(135deg, #5b21b6 0%, #4c1d95 100%);
    border-color: #5b21b6;
}

.emotion-btn[data-emotion="overwhelmed"]:hover,
.emotion-btn[data-emotion="overwhelmed"].selected {
    background: linear-gradient(135deg, #be123c 0%, #9f1239 100%);
    border-color: #be123c;
}

.emotion-btn[data-emotion="guilty"]:hover,
.emotion-btn[data-emotion="guilty"].selected {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    border-color: #059669;
}

.emotion-btn[data-emotion="scared"]:hover,
.emotion-btn[data-emotion="scared"].selected {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    border-color: #7c3aed;
}

/* Emotion Button Text Styling */
.emotion-btn span {
    font-size: 0.95rem;
    line-height: 1.2;
    letter-spacing: 0.3px;
}

/* Multiple Selection Counter */
.emotion-section {
    position: relative;
}

.emotion-counter {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.emotion-counter.visible {
    opacity: 1;
    transform: scale(1);
}

/* Animation for selection */
@keyframes selectEmotion {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1.02); }
}

.emotion-btn.selected {
    animation: selectEmotion 0.3s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .emotion-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .emotion-btn {
        padding: 14px 10px;
        font-size: 0.9rem;
        min-height: 55px;
    }
    
    .emotion-btn.selected::before,
    .emotion-btn.selected::after {
        width: 18px;
        height: 18px;
        top: 6px;
        right: 6px;
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .emotion-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .emotion-btn {
        justify-content: flex-start;
        text-align: left;
        padding: 12px 15px;
        min-height: 50px;
    }
    
    .emotion-btn.selected::before,
    .emotion-btn.selected::after {
        right: 12px;
    }
}

/* Custom Emotion Input Styling */
.custom-emotion {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid #e5e7eb;
}

.custom-emotion label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1rem;
}

#other-emotions {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

#other-emotions:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(33, 133, 137, 0.1);
}

#other-emotions::placeholder {
    color: #9ca3af;
    font-style: italic;
}

/* Better button state styling */
#continue-to-situation.ready {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    cursor: pointer;
}

#continue-to-situation:disabled {
    background: #d1d5db;
    color: #6b7280;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.emotion-feedback {
    margin-top: 15px;
    padding: 10px 15px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.8);
}

.personal-greeting input {
    color: #3d4142; /* Keep the input text dark for readability */
}

.personal-greeting {
    color: white; /* Makes the "Hello [name]!" text white */
}

.personal-greeting small {
    color: rgba(255, 255, 255, 0.8); /* Slightly transparent white for the helper text */
}