* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Comic Sans MS', cursive, sans-serif;
    background: linear-gradient(45deg, #ff9a9e 0%, #fecfef 25%, #fecfef 50%, #fad0c4 75%, #ffd1ff 100%);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Floating background elements */
body::before {
    content: '⭐ 🌟 ✨ 🎈 🎉 🦄 🌈 🎨 🎪 🎭';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    font-size: 2em;
    opacity: 0.1;
    pointer-events: none;
    z-index: -1;
    animation: float 20s linear infinite;
    white-space: nowrap;
}

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

@keyframes float {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    border-radius: 25px;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1), 0 5px 15px rgba(0,0,0,0.07);
    border: 3px solid transparent;
    background-clip: padding-box;
    position: relative;
    animation: containerGlow 3s ease-in-out infinite alternate;
}

.container::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #ffeaa7, #dda0dd);
    border-radius: 28px;
    z-index: -1;
    animation: borderRainbow 4s linear infinite;
}

@keyframes containerGlow {
    0% { box-shadow: 0 15px 35px rgba(0,0,0,0.1), 0 5px 15px rgba(0,0,0,0.07); }
    100% { box-shadow: 0 20px 40px rgba(255,107,107,0.2), 0 8px 20px rgba(78,205,196,0.15); }
}

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

header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.child-profile {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #ffeaa7 0%, #fab1a0 50%, #fd79a8 100%);
    padding: 12px 18px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 5px 15px rgba(253,121,168,0.3);
    border: 2px solid #fff;
    animation: profileBounce 2s ease-in-out infinite;
}

.child-profile:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 25px rgba(253,121,168,0.4);
    animation-play-state: paused;
}

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

.avatar-display {
    font-size: 2em;
    line-height: 1;
}

.name-display {
    font-weight: bold;
    color: #4a5568;
    font-size: 1.1em;
}

header h1 {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 3em;
    margin-bottom: 10px;
    animation: textRainbow 3s ease-in-out infinite;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    font-weight: 900;
}

header p {
    color: #6b46c1;
    font-size: 1.3em;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

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

.stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 50%, #ffeaa7 100%);
    padding: 25px;
    border-radius: 20px;
    text-align: center;
    min-width: 160px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    border: 3px solid #fff;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '✨';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.5em;
    animation: sparkle 2s ease-in-out infinite;
}

.stat-card:hover {
    transform: translateY(-8px) rotate(2deg);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

@keyframes sparkle {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

.stat-card h3 {
    color: #4a5568;
    margin-bottom: 10px;
}

.stat-card span {
    font-size: 2.5em;
    font-weight: 900;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    animation: numberPulse 2s ease-in-out infinite;
}

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

.reset-card button {
    background: linear-gradient(135deg, #fc8181 0%, #f56565 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1em;
    transition: all 0.3s ease;
}

.reset-card button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.data-card {
    min-width: 200px;
}

.data-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.data-buttons button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.data-buttons button:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.data-buttons .danger-btn {
    background: linear-gradient(135deg, #fc8181 0%, #f56565 100%);
}

.data-buttons .danger-btn:hover {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
}

.navigation {
    position: absolute;
    top: 0;
    left: 0;
}

.nav-link {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 15px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.nav-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.parent-access-card {
    min-width: 160px;
}

.parent-link {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 15px;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.parent-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.data-management-section {
    margin-bottom: 30px;
}

.data-management-card {
    background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 50%, #a8edea 100%);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border: 3px solid #fff;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.data-management-card::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);
    animation: shimmer 3s linear infinite;
}

.data-management-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.data-management-card h3 {
    color: #4a5568;
    margin-bottom: 15px;
    text-align: center;
}

.data-info {
    margin-top: 15px;
    padding: 15px;
    background: rgba(255,255,255,0.8);
    border-radius: 10px;
}

.data-info p {
    margin-bottom: 8px;
    color: #4a5568;
    font-size: 0.9em;
}

.current-rewards-preview {
    margin-top: 30px;
}

.current-rewards-preview h3 {
    color: #4a5568;
    margin-bottom: 20px;
    text-align: center;
}

/* Child Management Styles */
.child-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.child-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.child-row.active-child {
    border-color: #667eea;
    background: linear-gradient(135deg, #f0f4ff 0%, #e6f3ff 100%);
}

.child-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.child-avatar {
    font-size: 2em;
    line-height: 1;
}

.child-name {
    font-weight: bold;
    color: #4a5568;
    font-size: 1.1em;
}

.child-stats {
    color: #667eea;
    font-weight: bold;
    font-size: 0.9em;
}

.current-badge {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
}

.child-actions {
    display: flex;
    gap: 8px;
}

.switch-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.8em;
    transition: all 0.3s ease;
}

.switch-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.management-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (min-width: 768px) {
    .management-section {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
}

/* Landing Page Styles */
.landing-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.landing-header {
    margin-bottom: 60px;
}

.landing-header h1 {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 4em;
    margin-bottom: 20px;
    animation: textRainbow 3s ease-in-out infinite;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    font-weight: 900;
}

.landing-header p {
    color: #6b46c1;
    font-size: 1.5em;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.navigation-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.nav-tile {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    padding: 40px 30px;
    border-radius: 25px;
    text-decoration: none;
    color: white;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    border: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.nav-tile::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);
    animation: shimmer 3s linear infinite;
}

.nav-tile:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
    animation-play-state: paused;
}

.kids-tile {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fad0c4 100%);
}

.parents-tile {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 50%, #d299c2 100%);
}

.tile-icon {
    font-size: 4em;
    margin-bottom: 20px;
    animation: iconBounce 2s ease-in-out infinite;
}

.nav-tile h2 {
    font-size: 2.5em;
    margin-bottom: 15px;
    font-weight: 900;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.nav-tile p {
    font-size: 1.3em;
    margin-bottom: 25px;
    opacity: 0.9;
}

.tile-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tile-features span {
    background: rgba(255,255,255,0.2);
    padding: 8px 15px;
    border-radius: 15px;
    font-size: 1.1em;
    font-weight: bold;
    backdrop-filter: blur(10px);
}

.landing-footer {
    margin-top: auto;
}

.landing-footer p {
    color: #6b46c1;
    font-size: 1.2em;
    font-weight: bold;
    opacity: 0.8;
}

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

@media (max-width: 768px) {
    .landing-container {
        padding: 20px 15px;
    }
    
    .landing-header h1 {
        font-size: 3em;
    }
    
    .navigation-tiles {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .nav-tile {
        padding: 30px 20px;
    }
    
    .tile-icon {
        font-size: 3em;
    }
    
    .nav-tile h2 {
        font-size: 2em;
    }
}

.management-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.management-card {
    background: linear-gradient(135deg, #dda0dd 0%, #98fb98 50%, #87ceeb 100%);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border: 3px solid #fff;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.management-card::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);
    animation: shimmer 3s linear infinite;
}

.management-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.management-card h3 {
    color: #4a5568;
    margin-bottom: 15px;
    text-align: center;
}

.add-form {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.add-form input,
.add-form select {
    flex: 1;
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1em;
    min-width: 120px;
    background: white;
}

.add-form input:focus,
.add-form select:focus {
    outline: none;
    border-color: #667eea;
}

.add-form button {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.add-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.current-items {
    max-height: 200px;
    overflow-y: auto;
}

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

.item-row span {
    color: #4a5568;
    font-weight: bold;
}

.delete-btn {
    background: #fc8181;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8em;
    transition: all 0.3s ease;
}

.delete-btn:hover {
    background: #f56565;
}

.task-section {
    margin-bottom: 20px;
}

.task-section h4 {
    color: #4a5568;
    margin-bottom: 10px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #e6fffa 0%, #f0fff4 100%);
    border-radius: 8px;
    font-size: 1em;
}

.disabled-task {
    color: #cbd5e0;
    font-size: 1.2em;
    background: #f7fafc;
}

.table-container {
    overflow-x: auto;
    margin-bottom: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 15px;
    overflow: hidden;
}

th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: white;
    padding: 18px 12px;
    text-align: center;
    font-weight: 900;
    font-size: 1.1em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
}

th::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: headerShine 3s linear infinite;
}

@keyframes headerShine {
    0% { left: -100%; }
    100% { left: 100%; }
}

td {
    padding: 15px 10px;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
}

tr:nth-child(even) {
    background-color: #f7fafc;
}

.day-cell {
    font-weight: 900;
    background: linear-gradient(135deg, #ffeaa7 0%, #fab1a0 50%, #fd79a8 100%);
    color: #2d3748;
    font-size: 1.1em;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    position: relative;
}

.day-cell::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.day-cell:hover::after {
    width: 100%;
    height: 100%;
}

.star-button {
    background: none;
    border: none;
    font-size: 2em;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
}

.star-button:hover {
    transform: scale(1.3) rotate(15deg);
    animation: starWiggle 0.5s ease-in-out;
}

.star-button.active {
    color: #ffd700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8), 0 0 25px rgba(255, 215, 0, 0.6);
    animation: starGlow 1.5s ease-in-out infinite;
}

.star-button.inactive {
    color: #e2e8f0;
    filter: grayscale(100%);
}

.star-button.active::after {
    content: '✨';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 0.6em;
    animation: sparkleRotate 2s linear infinite;
}

@keyframes starWiggle {
    0%, 100% { transform: scale(1.3) rotate(15deg); }
    25% { transform: scale(1.3) rotate(-10deg); }
    75% { transform: scale(1.3) rotate(20deg); }
}

@keyframes starGlow {
    0%, 100% { 
        text-shadow: 0 0 15px rgba(255, 215, 0, 0.8), 0 0 25px rgba(255, 215, 0, 0.6);
        transform: scale(1);
    }
    50% { 
        text-shadow: 0 0 20px rgba(255, 215, 0, 1), 0 0 35px rgba(255, 215, 0, 0.8);
        transform: scale(1.1);
    }
}

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

.penalty-button {
    background: #fed7d7;
    border: 2px solid #fc8181;
    color: #c53030;
    padding: 5px 10px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.penalty-button:hover {
    background: #fc8181;
    color: white;
}

.daily-stars {
    font-weight: bold;
    font-size: 1.2em;
    color: #2d3748;
}

.rewards-section {
    margin-top: 40px;
}

.rewards-section h2 {
    text-align: center;
    color: #4a5568;
    margin-bottom: 20px;
}

.rewards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.reward-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 50%, #a8edea 100%);
    padding: 20px 25px;
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    border: 3px solid #fff;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
}

.reward-item::before {
    content: '🎁';
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 1.2em;
    animation: giftBounce 2s ease-in-out infinite;
}

.reward-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

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

.reward-item span {
    font-weight: bold;
    color: #4a5568;
}

.reward-item button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.reward-item button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.reward-item button:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    .stats {
        flex-direction: column;
        align-items: center;
    }
    
    th, td {
        padding: 10px 5px;
        font-size: 0.9em;
    }
    
    .rewards-grid {
        grid-template-columns: 1fr;
    }
    
    .management-section {
        grid-template-columns: 1fr;
    }
    
    .add-form {
        flex-direction: column;
    }
    
    .child-profile {
        position: static;
        margin: 0 auto 20px;
        width: fit-content;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid #e2e8f0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px 20px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5em;
}

.close {
    font-size: 2em;
    cursor: pointer;
    line-height: 1;
    transition: all 0.3s ease;
}

.close:hover {
    transform: scale(1.2);
}

.modal-body {
    padding: 25px;
}

.profile-section {
    margin-bottom: 25px;
}

.profile-section label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #4a5568;
    font-size: 1.1em;
}

.profile-section input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1.1em;
    transition: border-color 0.3s ease;
}

.profile-section input:focus {
    outline: none;
    border-color: #667eea;
}

.avatar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
}

.avatar-option {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    font-size: 2em;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.avatar-option:hover {
    background: #f7fafc;
    transform: scale(1.1);
}

.avatar-option.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #4c51bf;
    transform: scale(1.1);
}

.profile-preview {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    font-size: 1.2em;
    font-weight: bold;
    color: #4a5568;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    padding: 20px 25px;
    border-top: 2px solid #e2e8f0;
    background: #f7fafc;
    border-radius: 0 0 20px 20px;
}

.save-btn {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1em;
    transition: all 0.3s ease;
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.cancel-btn {
    background: #e2e8f0;
    color: #4a5568;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1em;
    transition: all 0.3s ease;
}

.cancel-btn:hover {
    background: #cbd5e0;
}