/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette */
    --primary-purple: #B8B5FF;
    --secondary-purple: #7868E6;
    --light-gray: #EDEEF7;
    --light-blue: #E4FBFF;
    --light-pink: #FFB4B4;
    
    /* Additional Colors */
    --white: #ffffff;
    --dark-text: #2c2c2c;
    --success: #4CAF50;
    --warning: #FF9800;
    --danger: #f44336;
    --border: #e0e0e0;
    
    /* Typography */
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-size-base: 16px;
    --font-size-small: 14px;
    --font-size-large: 18px;
    --font-size-xl: 24px;
    --font-size-xxl: 32px;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Border Radius */
    --border-radius: 8px;
    --border-radius-lg: 12px;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.2);
    
    /* Transitions */
    --transition: all 0.3s ease;
}

/* Paper Texture Background */
body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--dark-text);
    background: linear-gradient(135deg, var(--light-gray) 0%, var(--light-blue) 100%);
    min-height: 100vh;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(184, 181, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(228, 251, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 1px 1px, rgba(255,255,255,0.3) 1px, transparent 0);
    background-size: 100% 100%, 100% 100%, 20px 20px;
    pointer-events: none;
    z-index: -1;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* Header */
.header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    padding: var(--spacing-sm) 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.header__title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--secondary-purple);
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.header__logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.header__title:hover .header__logo {
    transform: scale(1.05);
}

.header__nav {
    display: flex;
    gap: var(--spacing-xs);
    align-items: center;
}

/* Compact buttons for header */
.btn--icon {
    min-height: 36px;
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: var(--font-size-small);
    border-radius: 20px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn--icon:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn--compact {
    min-height: 36px;
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: var(--font-size-small);
    border-radius: 20px;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn--compact:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn--compact:disabled,
.btn--icon:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.language-toggle {
    position: relative;
    overflow: hidden;
}

.language-toggle::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.3s;
}

.language-toggle:hover::before {
    left: 100%;
}

/* Main Content */
.main {
    padding: var(--spacing-lg) 0;
    min-height: calc(100vh - 200px);
}

/* Sections */
.section__title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--secondary-purple);
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

/* Age Selection Grid */
.age-selection {
    margin-bottom: var(--spacing-xl);
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-xl) var(--spacing-lg);
    background: linear-gradient(135deg, rgba(184, 181, 255, 0.12), rgba(228, 251, 255, 0.12));
    border-radius: var(--border-radius-lg);
    border: 2px dashed rgba(184, 181, 255, 0.5);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(184, 181, 255, 0.08) 0%, transparent 70%);
    animation: float 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    50% {
        transform: translate(-20px, -20px) rotate(5deg);
    }
}

.hero__title {
    font-size: var(--font-size-xxl);
    font-weight: 700;
    color: var(--secondary-purple);
    margin-bottom: var(--spacing-sm);
    position: relative;
    z-index: 1;
}

.hero__subtitle {
    font-size: var(--font-size-large);
    color: #666;
    margin-bottom: var(--spacing-lg);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

/* Quick Tips */
.quick-tips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.quick-tip {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    border: 1px solid transparent;
}

.quick-tip:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(120, 104, 230, 0.15);
    border-color: var(--primary-purple);
}

.quick-tip__icon {
    flex-shrink: 0;
}

.quick-tip__icon .icon {
    color: var(--secondary-purple);
}

.quick-tip__content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
}

.quick-tip__content strong {
    font-size: var(--font-size-small);
    color: var(--secondary-purple);
    font-weight: 600;
}

.quick-tip__content span {
    font-size: var(--font-size-small);
    color: #666;
}

.age-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

/* Stagger animation for age cards */
.age-card:nth-child(1) { animation-delay: 0.1s; }
.age-card:nth-child(2) { animation-delay: 0.2s; }
.age-card:nth-child(3) { animation-delay: 0.3s; }
.age-card:nth-child(4) { animation-delay: 0.4s; }
.age-card:nth-child(5) { animation-delay: 0.5s; }

.age-card {
    background: var(--white);
    border: 3px solid var(--primary-purple);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg) var(--spacing-md);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(120, 104, 230, 0.15);
    position: relative;
    overflow: hidden;
    animation: slideInFromBottom 0.5s ease-out backwards;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 280px;
}

.age-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(120, 104, 230, 0.08), transparent);
    transition: left 0.5s ease;
    z-index: 0;
    pointer-events: none;
}

.age-card:hover::before {
    left: 100%;
}

.age-card > * {
    position: relative;
    z-index: 1;
}

.age-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 28px rgba(120, 104, 230, 0.22);
    border-color: var(--secondary-purple);
}

.age-card__badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--danger);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
    white-space: nowrap;
    z-index: 2;
}

.age-card__badge--info {
    background: #2196F3;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.age-card__badge--success {
    background: var(--success);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.age-card__badge--primary {
    background: var(--secondary-purple);
    box-shadow: 0 2px 8px rgba(120, 104, 230, 0.3);
}

.age-card__badge--secondary {
    background: var(--primary-purple);
    box-shadow: 0 2px 8px rgba(184, 181, 255, 0.3);
}

.age-card:active {
    transform: translateY(-2px);
}

.age-card:focus {
    outline: 3px solid var(--secondary-purple);
    outline-offset: 2px;
}

.age-card__icon {
    margin-top: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(184, 181, 255, 0.18), rgba(228, 251, 255, 0.18));
    padding: var(--spacing-lg);
    border-radius: 50%;
    width: 120px;
    height: 120px;
    box-shadow: inset 0 2px 4px rgba(120, 104, 230, 0.1);
}

.age-card__icon .icon {
    width: 70px;
    height: 70px;
    color: var(--secondary-purple);
    stroke-width: 2.2;
    filter: drop-shadow(0 3px 8px rgba(120, 104, 230, 0.3));
}

.age-card:hover .age-card__icon {
    transform: scale(1.08);
    background: linear-gradient(135deg, rgba(184, 181, 255, 0.3), rgba(228, 251, 255, 0.3));
    box-shadow: inset 0 2px 6px rgba(120, 104, 230, 0.15), 0 4px 12px rgba(120, 104, 230, 0.2);
}

.age-card:hover .age-card__icon .icon {
    color: var(--secondary-purple);
    filter: drop-shadow(0 5px 15px rgba(120, 104, 230, 0.4));
    transform: scale(1.08);
}

/* Cores específicas por card */
.age-card[data-age="newborn"] .age-card__icon {
    background: linear-gradient(135deg, rgba(255, 180, 180, 0.15), rgba(255, 228, 228, 0.15));
}

.age-card[data-age="newborn"]:hover .age-card__icon {
    background: linear-gradient(135deg, rgba(255, 180, 180, 0.25), rgba(255, 228, 228, 0.25));
}

.age-card[data-age="baby"] .age-card__icon {
    background: linear-gradient(135deg, rgba(180, 220, 255, 0.15), rgba(228, 243, 255, 0.15));
}

.age-card[data-age="baby"]:hover .age-card__icon {
    background: linear-gradient(135deg, rgba(180, 220, 255, 0.25), rgba(228, 243, 255, 0.25));
}

.age-card[data-age="toddler"] .age-card__icon {
    background: linear-gradient(135deg, rgba(180, 255, 180, 0.15), rgba(228, 255, 228, 0.15));
}

.age-card[data-age="toddler"]:hover .age-card__icon {
    background: linear-gradient(135deg, rgba(180, 255, 180, 0.25), rgba(228, 255, 228, 0.25));
}

.age-card[data-age="child"] .age-card__icon {
    background: linear-gradient(135deg, rgba(255, 220, 180, 0.15), rgba(255, 243, 228, 0.15));
}

.age-card[data-age="child"]:hover .age-card__icon {
    background: linear-gradient(135deg, rgba(255, 220, 180, 0.25), rgba(255, 243, 228, 0.25));
}

.age-card[data-age="teen"] .age-card__icon {
    background: linear-gradient(135deg, rgba(255, 200, 255, 0.15), rgba(255, 235, 255, 0.15));
}

.age-card[data-age="teen"]:hover .age-card__icon {
    background: linear-gradient(135deg, rgba(255, 200, 255, 0.25), rgba(255, 235, 255, 0.25));
}

.age-card h3 {
    font-size: var(--font-size-large);
    font-weight: 700;
    color: var(--secondary-purple);
    margin-bottom: var(--spacing-xs);
    margin-top: var(--spacing-xs);
}

.age-card__range {
    color: #999;
    font-size: var(--font-size-small);
    margin-bottom: var(--spacing-sm);
    font-weight: 500;
}

.age-card__info {
    display: flex;
    gap: var(--spacing-md);
    margin-top: auto;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--light-gray);
    width: 100%;
    justify-content: center;
}

.age-card__detail {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--secondary-purple);
    font-size: var(--font-size-small);
    font-weight: 600;
}

.age-card__detail .detail-icon {
    display: flex;
    align-items: center;
}

.age-card__detail .detail-icon .icon {
    color: var(--primary-purple);
}

/* Bath Guide */
.bath-guide {
    animation: fadeIn 0.5s ease-in-out;
}

.guide-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.back-btn {
    flex-shrink: 0;
}

/* Temperature Monitor */
.temperature-monitor {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
}

.temperature-monitor h3 {
    color: var(--secondary-purple);
    margin-bottom: var(--spacing-md);
    font-size: var(--font-size-large);
}

.temp-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-md);
    background: linear-gradient(135deg, var(--light-gray), var(--light-blue));
    border-radius: var(--border-radius);
    position: relative;
    overflow: hidden;
}

.temp-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.3) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}

.temp-current {
    display: flex;
    align-items: baseline;
    gap: var(--spacing-xs);
}

.temp-value {
    font-size: var(--font-size-xxl);
    font-weight: 700;
    color: var(--secondary-purple);
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.temp-value.temp-cold {
    color: #2196F3;
    animation: pulse 1.5s ease-in-out infinite;
}

.temp-value.temp-hot {
    color: #f44336;
    animation: pulse 1.5s ease-in-out infinite;
}

.temp-value.temp-safe {
    color: var(--success);
}

.temp-unit {
    font-size: var(--font-size-large);
    color: #666;
    position: relative;
    z-index: 1;
}

.temp-ideal {
    font-size: var(--font-size-small);
    color: #666;
}

.temp-input {
    display: flex;
    gap: var(--spacing-sm);
    align-items: end;
    flex-wrap: wrap;
    margin-bottom: var(--spacing-md);
}

.temp-input label {
    flex: 1;
    min-width: 200px;
    font-weight: 500;
}

.temp-input input {
    padding: var(--spacing-xs) var(--spacing-sm);
    border: 2px solid var(--border);
    border-radius: var(--border-radius);
    font-size: var(--font-size-base);
    width: 120px;
    transition: all 0.3s ease;
    background: var(--white);
}

.temp-input input:focus {
    outline: none;
    border-color: var(--secondary-purple);
    box-shadow: 0 0 0 3px rgba(120, 104, 230, 0.1);
    transform: scale(1.02);
}

.temp-input input:hover {
    border-color: var(--primary-purple);
}

.temp-status {
    padding: var(--spacing-sm);
    border-radius: var(--border-radius);
    font-weight: 500;
    text-align: center;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.temp-status.safe {
    background: rgba(76, 175, 80, 0.1);
    color: var(--success);
    border: 1px solid var(--success);
}

.temp-status.warning {
    background: rgba(255, 152, 0, 0.1);
    color: var(--warning);
    border: 1px solid var(--warning);
}

.temp-status.danger {
    background: rgba(244, 67, 54, 0.1);
    color: var(--danger);
    border: 1px solid var(--danger);
}

/* Timer Section */
.timer-section {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.timer-section h3 {
    color: var(--secondary-purple);
    margin-bottom: var(--spacing-md);
    font-size: var(--font-size-large);
}

.timer-display {
    margin-bottom: var(--spacing-md);
    position: relative;
    display: inline-block;
}

.timer-circle {
    width: 200px;
    height: 200px;
    position: relative;
}

.timer-circle svg {
    transform: rotate(-90deg);
}

.timer-circle-bg {
    fill: none;
    stroke: var(--light-gray);
    stroke-width: 8;
}

.timer-circle-progress {
    fill: none;
    stroke: var(--secondary-purple);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear;
}

.timer-circle-progress.warning {
    stroke: var(--warning);
}

.timer-circle-progress.danger {
    stroke: var(--danger);
}

.timer-time {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-purple);
    font-family: 'Courier New', monospace;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.timer-time.warning {
    color: var(--warning);
}

.timer-time.danger {
    color: var(--danger);
    animation: pulse 1s ease-in-out infinite;
}

.timer-controls {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--spacing-md);
}

.timer-recommended {
    font-size: var(--font-size-small);
    color: #666;
}

/* Safety Checklist */
.safety-checklist {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
}

.safety-checklist h3 {
    color: var(--secondary-purple);
    margin-bottom: var(--spacing-xs);
    font-size: var(--font-size-large);
}

/* Progress Bar */
.progress-container {
    margin-bottom: var(--spacing-md);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--light-gray);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-purple), var(--primary-purple));
    border-radius: 20px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 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%); }
}

.progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--spacing-xs);
    font-size: var(--font-size-small);
    color: #666;
}

.progress-percentage {
    font-weight: 600;
    color: var(--secondary-purple);
    font-size: var(--font-size-base);
}

.checklist {
    display: grid;
    gap: var(--spacing-sm);
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    cursor: pointer;
    border-left: 3px solid transparent;
}

.checklist-item:hover {
    background: var(--light-gray);
    transform: translateX(4px);
}

.checklist-item.completed {
    background: rgba(76, 175, 80, 0.1);
    border-left-color: var(--success);
}

.checklist-item.completed label {
    text-decoration: line-through;
    color: #999;
}

.checklist-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--secondary-purple);
}

.checklist-item label {
    flex: 1;
    cursor: pointer;
    font-weight: 500;
}

/* Products Section */
.products-section {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
}

.products-section h3 {
    color: var(--secondary-purple);
    margin-bottom: var(--spacing-md);
    font-size: var(--font-size-large);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

.product-card {
    background: var(--light-gray);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    text-align: center;
    transition: all 0.3s ease;
    cursor: default;
    border: 2px solid transparent;
}

.product-card:hover {
    background: var(--white);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-purple);
}

.product-card__icon {
    margin-bottom: var(--spacing-sm);
    transition: transform 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.product-card__icon .icon {
    width: 48px;
    height: 48px;
    color: var(--secondary-purple);
    stroke-width: 1.5;
}

.product-card:hover .product-card__icon {
    transform: scale(1.2) rotate(10deg);
}

.product-card:hover .product-card__icon .icon {
    color: var(--primary-purple);
}

.product-card h4 {
    color: var(--secondary-purple);
    margin-bottom: var(--spacing-xs);
    font-size: var(--font-size-base);
    font-weight: 600;
}

.product-card p {
    font-size: var(--font-size-small);
    color: #666;
    line-height: 1.4;
}

/* Bath Steps */
.bath-steps {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
}

.bath-steps h3 {
    color: var(--secondary-purple);
    margin-bottom: var(--spacing-md);
    font-size: var(--font-size-large);
}

.steps-list {
    display: grid;
    gap: var(--spacing-md);
}

.step-item {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-purple);
    background: var(--light-gray);
    transition: all 0.3s ease;
    cursor: default;
}

.step-item:hover {
    background: var(--white);
    transform: translateX(8px);
    box-shadow: var(--shadow-sm);
    border-left-color: var(--secondary-purple);
}

.step-number {
    background: var(--secondary-purple);
    color: var(--white);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(120, 104, 230, 0.3);
}

.step-item:hover .step-number {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(120, 104, 230, 0.4);
}

.step-content h4 {
    color: var(--secondary-purple);
    margin-bottom: var(--spacing-xs);
    font-size: var(--font-size-base);
    font-weight: 600;
}

.step-content p {
    font-size: var(--font-size-small);
    color: #666;
    line-height: 1.5;
}

/* Buttons */
.btn {
    padding: var(--spacing-sm) var(--spacing-md);
    border: none;
    border-radius: var(--border-radius);
    font-size: var(--font-size-base);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    position: relative;
    overflow: hidden;
}

.btn .icon {
    flex-shrink: 0;
}

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

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

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

.btn--primary {
    background: var(--secondary-purple);
    color: var(--white);
}

.btn--primary:hover {
    background: #6856d4;
    transform: translateY(-1px);
}

.btn--secondary {
    background: var(--primary-purple);
    color: var(--dark-text);
}

.btn--secondary:hover {
    background: #a8a4ff;
    transform: translateY(-1px);
}

.btn--danger {
    background: var(--light-pink);
    color: var(--danger);
}

.btn--danger:hover {
    background: #ff9999;
    transform: translateY(-1px);
}

.btn--success {
    background: var(--success);
    color: var(--white);
}

.btn--success:hover {
    background: #45a049;
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Footer */
.footer {
    background: var(--secondary-purple);
    color: var(--white);
    text-align: center;
    padding: var(--spacing-lg) 0;
    margin-top: var(--spacing-xl);
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    align-items: center;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    justify-content: center;
}

.footer-link {
    color: var(--white);
    text-decoration: none;
    font-size: var(--font-size-small);
    transition: all 0.3s ease;
    padding: 4px 8px;
    border-radius: 4px;
}

.footer-link:hover {
    background: rgba(255, 255, 255, 0.1);
    text-decoration: underline;
}

.footer-separator {
    color: rgba(255, 255, 255, 0.5);
    font-size: var(--font-size-small);
}

.footer-credit {
    margin: 0;
    font-size: var(--font-size-small);
    opacity: 0.9;
}

.footer-credit a {
    color: var(--white);
    text-decoration: underline;
    transition: opacity 0.3s ease;
}

.footer-credit a:hover {
    opacity: 0.8;
}

/* Button Large */
.btn--lg {
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: var(--font-size-large);
    min-height: 52px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--light-gray);
    border-top: 4px solid var(--secondary-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: var(--spacing-md);
}

/* Icon System */
.icon {
    width: 1em;
    height: 1em;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

.icon--sm {
    width: 16px;
    height: 16px;
}

.icon--md {
    width: 24px;
    height: 24px;
}

.icon--lg {
    width: 32px;
    height: 32px;
}

.icon--xl {
    width: 48px;
    height: 48px;
}

.icon--xxl {
    width: 64px;
    height: 64px;
}

/* Icon containers */
.icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}

@keyframes progressFill {
    from {
        width: 0%;
    }
    to {
        width: var(--progress-width);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes ripple {
    0% {
        box-shadow: 0 0 0 0 rgba(120, 104, 230, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(120, 104, 230, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(120, 104, 230, 0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .header {
        padding: var(--spacing-sm) 0;
    }
    
    .header .container {
        flex-direction: row;
        gap: var(--spacing-sm);
        align-items: center;
        justify-content: space-between;
    }
    
    .header__title {
        font-size: var(--font-size-base);
        flex: 1;
        min-width: 0;
    }
    
    .header__title span {
        display: inline-block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 100%;
    }
    
    .header__logo {
        height: 28px;
        flex-shrink: 0;
    }
    
    .header__nav {
        flex-shrink: 0;
        gap: 4px;
    }
    
    .btn--icon,
    .btn--compact {
        min-height: 36px;
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .btn--compact {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .btn {
        min-height: 48px; /* Larger touch target */
        padding: var(--spacing-sm) var(--spacing-lg);
        font-size: var(--font-size-base);
    }
    
    .age-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .age-card {
        padding: var(--spacing-lg);
        min-height: 120px; /* Larger touch target */
    }
    
    .age-card__icon {
        width: 100px;
        height: 100px;
        padding: var(--spacing-md);
    }
    
    .age-card__icon .icon {
        width: 56px;
        height: 56px;
    }
    
    .hero-section {
        padding: var(--spacing-lg) var(--spacing-sm);
        margin-bottom: var(--spacing-lg);
    }
    
    .hero__title {
        font-size: var(--font-size-xl);
    }
    
    .hero__subtitle {
        font-size: var(--font-size-base);
        margin-bottom: var(--spacing-md);
    }
    
    .quick-tips {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .quick-tip .icon {
        width: 20px;
        height: 20px;
    }
    
    .age-card__info {
        gap: var(--spacing-sm);
    }
    
    .age-card {
        min-height: 260px;
        padding: var(--spacing-md) var(--spacing-sm);
    }
    
    .age-card__badge {
        font-size: 10px;
        padding: 4px 10px;
        top: 10px;
        right: 10px;
    }
    
    .age-grid {
        gap: var(--spacing-md);
    }
    
    .guide-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: var(--spacing-sm);
    }
    
    .temp-input {
        flex-direction: column;
        align-items: stretch;
        gap: var(--spacing-sm);
    }
    
    .temp-input label {
        text-align: center;
    }
    
    .temp-input input {
        width: 100%;
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: var(--font-size-base);
        min-height: 48px;
    }
    
    .temp-input button {
        width: 100%;
    }
    
    .timer-controls {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .timer-controls .btn {
        width: 100%;
    }
    
    .timer-circle {
        width: 180px;
        height: 180px;
    }
    
    .timer-circle svg {
        width: 180px;
        height: 180px;
    }
    
    .timer-time {
        font-size: 2rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .step-item {
        padding: var(--spacing-md);
    }
    
    .checklist-item {
        padding: var(--spacing-md);
        min-height: 48px;
    }
    
    .checklist-item input[type="checkbox"] {
        width: 22px;
        height: 22px;
    }
    
    .toast-container {
        right: 10px;
        left: 10px;
        top: 70px;
        max-width: none;
    }
    
    .toast {
        padding: var(--spacing-md);
    }
}

@media (max-width: 768px) {
    .footer-links {
        flex-direction: column;
        gap: var(--spacing-xs);
    }
    
    .footer-separator {
        display: none;
    }
    
    .scroll-to-top {
        bottom: 125px;
        right: 18px;
        width: 42px;
        height: 42px;
    }
    
    .scroll-to-top__icon .icon {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .scroll-to-top {
        bottom: 125px;
        right: 15px;
        width: 40px;
        height: 40px;
        border-width: 2px;
    }
    
    .scroll-to-top__icon .icon {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    :root {
        --font-size-base: 15px;
        --font-size-small: 13px;
        --font-size-large: 17px;
        --font-size-xl: 22px;
        --font-size-xxl: 30px;
    }
    
    .header {
        padding: 10px 0;
    }
    
    .header .container {
        padding: 0 10px;
        gap: 8px;
    }
    
    .header__title {
        font-size: 13px;
        gap: 6px;
    }
    
    .header__title span {
        font-size: 13px;
    }
    
    .header__logo {
        height: 24px;
    }
    
    .header__nav {
        gap: 4px;
        flex-wrap: nowrap;
    }
    
    .btn--icon {
        min-height: 32px;
        width: 32px;
        padding: 0;
        border-radius: 50%;
    }
    
    .btn--icon span {
        display: none;
    }
    
    .btn--icon .btn-icon .icon {
        width: 18px;
        height: 18px;
    }
    
    .btn--compact {
        min-height: 32px;
        padding: 6px 8px;
        font-size: 11px;
        border-radius: 16px;
        max-width: 100px;
    }
    
    .btn--compact span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .main {
        padding: var(--spacing-md) 0;
    }
    
    .section__title {
        font-size: var(--font-size-xl);
    }
    
    .age-card {
        padding: var(--spacing-md);
        min-height: 240px;
    }
    
    .age-card__icon {
        width: 85px;
        height: 85px;
        padding: var(--spacing-sm);
    }
    
    .age-card__icon .icon {
        width: 45px;
        height: 45px;
    }
    
    .age-grid {
        gap: var(--spacing-sm);
        grid-template-columns: 1fr;
    }
    
    .hero-section {
        padding: var(--spacing-md) var(--spacing-sm);
    }
    
    .hero__title {
        font-size: var(--font-size-large);
    }
    
    .hero__subtitle {
        font-size: var(--font-size-small);
        margin-bottom: var(--spacing-sm);
    }
    
    .quick-tip {
        padding: var(--spacing-sm);
    }
    
    .quick-tip .icon {
        width: 18px;
        height: 18px;
    }
    
    .quick-tip__content strong,
    .quick-tip__content span {
        font-size: 12px;
    }
    
    .age-card h3 {
        font-size: var(--font-size-base);
    }
    
    .age-card__range {
        font-size: 12px;
    }
    
    .age-card__badge {
        font-size: 9px;
        padding: 3px 8px;
        top: 8px;
        right: 8px;
    }
    
    .age-card__detail {
        font-size: 12px;
    }
    
    .timer-circle {
        width: 160px;
        height: 160px;
    }
    
    .timer-circle svg {
        width: 160px;
        height: 160px;
    }
    
    .timer-circle-bg,
    .timer-circle-progress {
        r: 72;
        cx: 80;
        cy: 80;
    }
    
    .timer-time {
        font-size: 1.8rem;
    }
    
    .temp-value {
        font-size: 2rem;
    }
    
    .temp-display {
        flex-direction: column;
        gap: var(--spacing-sm);
        text-align: center;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-purple: #5a4fcf;
        --secondary-purple: #4a3fb8;
        --border: #333;
    }
    
    .age-card {
        border-width: 3px;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .age-card,
    .quick-tip,
    .hero-section::before,
    .toast,
    .loading-spinner,
    .scroll-to-top::before {
        animation: none !important;
    }
    
    * {
        transition-duration: 0.05s !important;
    }
    
    .age-card::before,
    .btn::after,
    .scroll-to-top::before {
        display: none !important;
    }
}

/* Scroll to Top Button - Destaque Visual */
.scroll-to-top {
    position: fixed;
    bottom: 125px;
    right: 25px;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--secondary-purple), var(--primary-purple));
    color: var(--white);
    border: 2px solid var(--white);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 6px 18px rgba(120, 104, 230, 0.6),
        0 0 0 0 rgba(120, 104, 230, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.7) rotate(-10deg);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1) rotate(0deg);
}

/* Anel pulsante duplo para maior destaque */
.scroll-to-top::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    width: calc(100% + 6px);
    height: calc(100% + 6px);
    border-radius: 50%;
    background: transparent;
    border: 2px solid var(--secondary-purple);
    z-index: -1;
    animation: pulse-ring-double 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.scroll-to-top::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    animation: rotate-glow 3s linear infinite;
    pointer-events: none;
}

@keyframes pulse-ring-double {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.4;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

@keyframes rotate-glow {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.scroll-to-top:hover {
    background: linear-gradient(135deg, #6856d4, var(--secondary-purple));
    transform: scale(1.15) translateY(-5px);
    box-shadow: 
        0 12px 36px rgba(120, 104, 230, 0.7),
        0 0 0 4px rgba(120, 104, 230, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.8);
}

.scroll-to-top:hover::before {
    animation: pulse-ring-fast 1s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-ring-fast {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

.scroll-to-top:active {
    transform: scale(0.9);
    box-shadow: 
        0 6px 16px rgba(120, 104, 230, 0.5),
        inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.scroll-to-top__icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-to-top__icon {
    position: relative;
    z-index: 1;
}

.scroll-to-top__icon .icon {
    width: 22px;
    height: 22px;
    stroke-width: 3;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.scroll-to-top:hover .scroll-to-top__icon .icon {
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.3));
    animation: bounce-arrow 0.6s ease infinite;
}

@keyframes bounce-arrow {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.scroll-to-top.visible {
    animation: slideUpFade 0.3s ease-out;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    max-width: 400px;
}

.toast {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    min-height: 60px;
    animation: slideInFromRight 0.3s ease-out;
    border-left: 4px solid var(--secondary-purple);
    position: relative;
    overflow: hidden;
}

.toast::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--secondary-purple);
    animation: toastProgress 3s linear;
}

@keyframes toastProgress {
    from { width: 100%; }
    to { width: 0%; }
}

.toast.success {
    border-left-color: var(--success);
}

.toast.success::before {
    background: var(--success);
}

.toast.warning {
    border-left-color: var(--warning);
}

.toast.warning::before {
    background: var(--warning);
}

.toast.error {
    border-left-color: var(--danger);
}

.toast.error::before {
    background: var(--danger);
}

.toast-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
}

.toast-icon .icon {
    width: 20px;
    height: 20px;
}

.toast.success .toast-icon {
    background: rgba(76, 175, 80, 0.1);
}

.toast.success .toast-icon .icon {
    color: var(--success);
}

.toast.warning .toast-icon {
    background: rgba(255, 152, 0, 0.1);
}

.toast.warning .toast-icon .icon {
    color: var(--warning);
}

.toast.error .toast-icon {
    background: rgba(244, 67, 54, 0.1);
}

.toast.error .toast-icon .icon {
    color: var(--danger);
}

.toast.info .toast-icon {
    background: rgba(120, 104, 230, 0.1);
}

.toast.info .toast-icon .icon {
    color: var(--secondary-purple);
}

.toast-content {
    flex: 1;
}

.toast-message {
    font-size: var(--font-size-small);
    color: var(--dark-text);
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    flex-shrink: 0;
}

.toast-close .icon {
    width: 16px;
    height: 16px;
}

.toast-close:hover {
    background: var(--light-gray);
    color: var(--dark-text);
}

.toast.hiding {
    animation: slideOutToRight 0.3s ease-in forwards;
}

@keyframes slideOutToRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(120%);
    }
}

/* Print styles */
@media print {
    .header__nav,
    .timer-section,
    .loading-overlay,
    .toast-container,
    .scroll-to-top {
        display: none !important;
    }
    
    .main {
        padding: 0;
    }
    
    .age-selection {
        display: none;
    }
    
    .bath-guide {
        display: block !important;
    }
}
