:root {
    --primary-blue: #013d7a;
    --secondary-blue: #0066cc;
    --accent-pink: #ff3366;
    --light-bg: #f0f7ff;
    --card-bg: #ffffff;
    --text-dark: #333;
    --text-light: #666;
    --border-color: #e1e8f0;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    --footer-bg: #0a192f;
    --footer-text: #ccd6f6;
    --footer-heading: #e6f1ff;
    --footer-border: #233554;
    --footer-hover: #64ffda;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #7c3aed;
    --accent: #ec4899;
    --light: #f0f7ff;
    --dark: #1e293b;
    --text: #334155;
    --border: #e2e8f0;
    --success: #10b981;
    --accent-green: #28a745;
    --tool-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    color: var(--text);
    background: linear-gradient(135deg, #f0f7ff 0%, #e4edf5 100%);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    background: white;
    position: sticky;
    top: 0;
    width: 100%;
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    box-shadow: var(--shadow);
    z-index: 1000;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo a {
    text-decoration: none;
    color: var(--footer-bg);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
}

.logo a:hover {
    color: var(--accent-pink);
}

/* Navigation */
.nav-links {
    display: flex;
    margin-left: 30px;
}

.nav-item {
    position: relative;
    color: black;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 10px 16px;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.links a {
    color: black;
    text-decoration: none;
    transition: all 0.3s ease;
}

.links a:hover {
    color: var(--accent-pink);
}

.nav-item:hover {
    color: var(--accent-pink);
}

.dropdown-icon {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.nav-item:hover .dropdown-icon {
    transform: rotate(180deg);
}

/* Mega Dropdown Styles */
.mega-dropdown {
    position: absolute;
    top: 45px;
    left: -750px;
    background-color: white;
    width: 1200px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 30px;
    display: none;
    z-index: 1001;
    grid-template-columns: repeat(6, 1fr);
    border-top: 3px solid var(--accent-pink);
}

.nav-item:hover .mega-dropdown {
    display: grid;
    animation: fadeIn 0.3s ease;
}

.dropdown-section h3 {
    color: var(--primary-blue);
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.dropdown-section h3 i {
    margin-right: 10px;
    color: var(--accent-pink);
    background: rgba(255, 51, 102, 0.1);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dropdown-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dropdown-link {
    display: flex;
    align-items: center;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.7rem;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s;
}

.dropdown-link:hover {
    background-color: #f0f7ff;
    color: var(--accent-pink);
}

.dropdown-link i {
    margin-right: 12px;
    color: var(--secondary-blue);
    width: 20px;
    text-align: center;
    font-size: 14px;
}

/* Mobile Toggle */
.mobile-toggle {
    margin-left: auto;
    display: none;
    background: none;
    border: none;
    color: var(--accent-pink);
    font-size: 24px;
    cursor: pointer;
}

/* Mobile Sidebar */
.mobile-sidebar {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: white;
    z-index: 999;
    transition: all 0.4s ease;
    overflow-y: auto;
    padding: 20px;
    box-shadow: var(--shadow);
}

.mobile-sidebar.active {
    left: 0;
}

.mobile-category {
    margin-top: 20px;
}

.mobile-category-title {
    font-size: 18px;
    color: var(--primary-blue);
    font-weight: 500;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent-pink);
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-category-title i {
    color: var(--accent-pink);
}

.mobile-tool-link {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    text-decoration: none;
    border-radius: 6px;
    margin-bottom: 8px;
    font-weight: 500;
    transition: all 0.2s;
    background: #f8fafd;
    color: var(--text-dark);
}

.mobile-tool-link:hover {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
    transform: translateX(5px);
    color: var(--accent-pink);
}

.mobile-tool-link i {
    margin-right: 15px;
    color: var(--secondary-blue);
    font-size: 18px;
    width: 24px;
    text-align: center;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .mega-dropdown {
        width: 700px;
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .nav-links {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    .mega-dropdown {
        width: 500px;
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header {
        height: 70px;
    }

    .logo a {
        font-size: 22px;
    }

    .mobile-sidebar {
        top: 70px;
        height: calc(100vh - 70px);
    }
}

/* Main Content */
main {
    flex: 1;
    max-width: 1000px;
    width: 100%;
    margin: 40px auto 200px;
    padding: 0 20px;
}

.tool-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
}

.tool-header h1 {
    color: var(--footer-bg);
    font-size: 2.8rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tool-header p {
    color: var(--text);
    font-size: 1.1rem;
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
}

.calculator-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .calculator-container {
        grid-template-columns: 1fr;
    }
}

.calculator-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--shadow);
    height: 100%;
}

.card-title {
    font-size: 1.5rem;
    color: var(--dark);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title i {
    color: var(--primary-blue);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: var(--dark);
}

.input-group input {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.input-group input:focus {
    border-color: var(--primary-blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.button-group {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.btn {
    flex: 1;
    padding: 15px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary {
    background: var(--primary-blue);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--text);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: var(--primary);
    color: var(--primary);
}

/* Results Section */
.result-display {
    text-align: center;
    padding: 20px;
}

.age-display {
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin: 20px 0;
    line-height: 1.1;
}

.age-text {
    font-size: 1.2rem;
    color: var(--text);
    margin-bottom: 25px;
    line-height: 1.6;
}

.age-breakdown {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 30px 0;
}

@media (max-width: 480px) {
    .age-breakdown {
        grid-template-columns: repeat(2, 1fr);
    }
}

.age-unit {
    background: var(--light);
    padding: 20px 15px;
    border-radius: 12px;
    text-align: center;
}

.unit-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 5px;
}

.unit-label {
    font-size: 0.95rem;
    color: var(--text);
    font-weight: 500;
}

/* Additional Info */
.additional-info {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.info-item {
    background: var(--light);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.info-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

.info-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 8px;
}

.info-label {
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 500;
}

/* Footer */
.copyright {
    background: var(--footer-bg);
    color: var(--footer-text);
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    font-size: 0.95rem;
}

/* Responsive Design */
@media (max-width: 900px) {
    .tool-header h1 {
        font-size: 2rem;
    }

    .age-display {
        font-size: 3rem;
    }
}

@media (max-width: 480px) {
    .tool-header h1 {
        font-size: 1.8rem;
    }

    .button-group {
        flex-direction: column;
    }

    .age-display {
        font-size: 2.5rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* Error Message */
.error-message {
    color: #ef4444;
    background: #fef2f2;
    padding: 12px 15px;
    border-radius: 8px;
    margin-top: 15px;
    display: none;
    font-weight: 500;
}

.error-message.show {
    display: block;
    animation: fadeIn 0.3s ease;
}