:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --secondary: #f472b6;
    --text: #1f2937;
    --text-light: #6b7280;
    --background: #f9fafb;
    --card: #ffffff;
    --border: #e5e7eb;
    --shadow: rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    
}

body {
    background: linear-gradient(135deg, var(--background), #6680c8, #758ded, #83a4d0, #b8c6db, #16283f);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
   

}
.myname {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    color: var(--text-light);
}
.container {
    width: 100%;
    max-width: 500px;
    background: var(--card);
    border-radius: 16px;
    box-shadow: 0 10px 25px var(--shadow);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.container:hover {
    transform: translateY(-5px);
}

.header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 25px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
    position: relative;
    z-index: 1;
}

.header p {
    font-size: 16px;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    transform: rotate(30deg);
}

.form-container {
    padding: 30px;
}

.input-group {
    margin-bottom: 25px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text);
    font-size: 15px;
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

.input-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.calculate-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.calculate-btn:hover {
    background: var(--primary-dark);
}

.calculate-btn:active {
    transform: scale(0.98);
}

.result {
    margin-top: 30px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    display: none;
    animation: fadeIn 0.5s ease forwards;
}

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

.result h2 {
    color: var(--primary-dark);
    margin-bottom: 15px;
    font-size: 20px;
}

.age-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    text-align: center;
}

.age-box {
    padding: 15px 10px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.age-box:hover {
    transform: translateY(-3px);
}

.age-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
    line-height: 1;
}

.age-label {
    font-size: 14px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.progress-container {
    margin-top: 25px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.progress-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-light), var(--primary));
    border-radius: 4px;
    width: 0;
    transition: width 1s ease;
}

.error {
    color: #ef4444;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

@media (max-width: 480px) {
    .container {
        border-radius: 12px;
    }
    
    .header {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 24px;
    }
    
    .form-container {
        padding: 20px;
    }
    
    .age-details {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .age-box {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 15px;
    }
    
    .age-number {
        font-size: 24px;
        margin-bottom: 0;
    }
}