/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: linear-gradient(45deg, #18002a, #2b0054, #4a0082, #18002a);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    color: white;
    overflow: hidden;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Background Animation */
.background-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.circles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.circles li {
    position: absolute;
    display: block;
    list-style: none;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    animation: animate 25s linear infinite;
    bottom: -150px;
    border-radius: 50%;
}

.circles li:nth-child(1) { left: 25%; width: 80px; height: 80px; animation-delay: 0s; }
.circles li:nth-child(2) { left: 10%; width: 20px; height: 20px; animation-delay: 2s; animation-duration: 12s; }
.circles li:nth-child(3) { left: 70%; width: 20px; height: 20px; animation-delay: 4s; }
.circles li:nth-child(4) { left: 40%; width: 60px; height: 60px; animation-delay: 0s; animation-duration: 18s; }
.circles li:nth-child(5) { left: 65%; width: 20px; height: 20px; animation-delay: 0s; }
.circles li:nth-child(6) { left: 75%; width: 110px; height: 110px; animation-delay: 3s; }
.circles li:nth-child(7) { left: 35%; width: 150px; height: 150px; animation-delay: 7s; }
.circles li:nth-child(8) { left: 50%; width: 25px; height: 25px; animation-delay: 15s; animation-duration: 45s; }
.circles li:nth-child(9) { left: 20%; width: 15px; height: 15px; animation-delay: 2s; animation-duration: 35s; }
.circles li:nth-child(10) { left: 85%; width: 150px; height: 150px; animation-delay: 0s; animation-duration: 11s; }

@keyframes animate {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; border-radius: 0; }
    100% { transform: translateY(-1000px) rotate(720deg); opacity: 0; border-radius: 50%; }
}

/* Glassmorphism Container */
.glass-panel {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    padding: 30px 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 450px;
    width: 90%;
    z-index: 10;
}

/* Header */
.header h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.header .subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 25px;
}

/* Input Section */
.input-section {
    margin-bottom: 20px;
    text-align: left;
}

.dob-label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 0.95em;
    color: rgba(255,255,255,0.9);
}

.input-wrapper input[type="date"] {
    width: 100%;
    padding: 12px 15px;
    font-size: 1em;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
    outline: none;
    transition: 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.input-wrapper input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

.input-wrapper input[type="date"]:focus {
    border-color: #bb86fc;
    box-shadow: 0 0 10px rgba(187, 134, 252, 0.3);
}

/* Buttons */
.button-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 25px;
}

.btn {
    padding: 12px 20px;
    font-size: 1em;
    font-weight: 500;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(45deg, #bb86fc, #9a67ea);
    color: #fff;
    box-shadow: 0 4px 15px rgba(187, 134, 252, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(187, 134, 252, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Results Section */
.result-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
    animation: fadeIn 0.5s ease-out;
}

.result-container.hidden {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.main-result h3 {
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: 15px;
    color: rgba(255,255,255,0.8);
}

.age-cards {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 20px;
}

.age-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 15px 10px;
    border-radius: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.age-card .number {
    font-size: 1.8rem;
    font-weight: 700;
    color: #bb86fc;
}

.age-card .label {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
}

/* Extra Info */
.extra-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.info-box {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255,255,255,0.05);
    padding: 12px 15px;
    border-radius: 10px;
    text-align: left;
}

.info-box i {
    font-size: 1.5rem;
    color: #bb86fc;
    width: 30px;
    text-align: center;
}

.info-box .info-label {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-box .info-value {
    font-size: 1rem;
    font-weight: 500;
    margin-top: 2px;
}

/* Responsive */
@media (max-width: 400px) {
    .glass-panel { padding: 20px; }
    .age-cards { flex-direction: column; }
}
