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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 50%, #fff3e0 100%);
    padding: 10px 10px 100px 10px;
    margin-top: 20px;
    overflow-x: hidden;
    overflow-y: auto;
}

.container {
    max-width: 400px;
    margin: 20px auto 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow: hidden;
}

.header {
    background: linear-gradient(45deg, #90caf9, #ce93d8);
    color: white;
    padding: 20px;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 15px rgba(144, 202, 249, 0.3);
}

.header h1 {
    font-size: 24px;
    margin-bottom: 5px;
}

.nav-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 20px;
}

.nav-item {
    background: white;
    padding: 20px;
    text-align: center;
    text-decoration: none;
    color: #333;
    border-radius: 6px;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: block;
}

.nav-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(144, 202, 249, 0.3);
    color: #42a5f5;
    text-decoration: none;
}

.nav-item .icon {
    font-size: 24px;
    margin-bottom: 10px;
    display: block;
}

.calc-form {
    padding: 20px;
    margin: 15px 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #90caf9;
    box-shadow: 0 0 0 3px rgba(144, 202, 249, 0.2);
}

.text-danger {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
    display: block;
}

.input-validation-error {
    border-color: #dc3545;
}

.field-validation-error {
    color: #dc3545;
    font-size: 12px;
}

.btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(45deg, #90caf9, #ce93d8);
    color: white;
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(144, 202, 249, 0.4);
    background: linear-gradient(45deg, #81c784, #aed581);
}

.result-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 50%, #e8f5e8 100%);
    border-radius: 8px;
    padding: 25px;
    margin-top: 25px;
    box-shadow: 0 8px 25px rgba(144, 202, 249, 0.15);
    border-left: 5px solid #90caf9;
}

.result-header {
    text-align: center;
    margin-bottom: 20px;
}

.result-value {
    font-size: 32px;
    font-weight: 800;
    color: #42a5f5;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(66, 165, 245, 0.2);
}

.result-label {
    font-size: 14px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.result-breakdown {
    background: white;
    border-radius: 6px;
    padding: 20px;
    margin-top: 15px;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.05);
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f1f3f4;
}

.result-row:last-child {
    border-bottom: none;
    font-weight: 700;
    color: #42a5f5;
    font-size: 16px;
}

.result-row .label {
    color: #495057;
    font-weight: 500;
}

.result-row .value {
    color: #212529;
    font-weight: 600;
    font-size: 15px;
}

.back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    padding: 6px 15px;
    gap: 15px;
    max-width: 400px;
    width: 100%;
    z-index: 1000;
}
    .bottom-nav .bottom-sub-nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        width: calc(100% - 45px);
        overflow-x: auto;
        border-left: 1px solid #ab2cff;
        padding-left: 10px;
    }
.bottom-sub-nav .footer-btn {
    white-space: nowrap;
    text-decoration: none;
    border: 1px solid #ab2cff;
    padding: 4px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
}
    .bottom-nav .nav-btn {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 50%;
    text-decoration: none;
    font-size: 18px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
}

.nav-btn:hover {
    background: linear-gradient(45deg, #90caf9, #81c784);
    transform: translateY(-2px);
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(144, 202, 249, 0.3);
}

.more-nav {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 15px;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
    display: flex;
    flex-wrap: wrap;
    padding: 15px;
    gap: 10px;
    max-width: 350px;
    width: 90%;
    z-index: 1000;
    justify-content: center;
}

.more-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(45deg, #90caf9, #ce93d8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(144, 202, 249, 0.4);
    z-index: 1001;
    transition: all 0.3s;
}

.more-btn:hover {
    transform: scale(1.1);
}

.top-navbar {
    display: none;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 60px;
}

.nav-brand {
    font-size: 20px;
    font-weight: 600;
    color: #42a5f5;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-brand:hover {
    color: #1976d2;
}

.nav-menu {
    display: flex;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-menu > li {
    position: relative;
}

.dropdown-toggle {
    text-decoration: none;
    color: #333;
    padding: 15px 0;
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s ease;
}

.dropdown-toggle:hover {
    color: #42a5f5;
}

.dropdown-toggle i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.dropdown.active .dropdown-toggle i {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 180px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    border-radius: 8px;
    padding: 10px 0;
    list-style: none;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.dropdown-menu a:hover {
    background: #f8f9fa;
    color: #42a5f5;
    padding-left: 25px;
}

@media (max-width: 767px) {
    .top-navbar {
        display: none;
    }
    
    .form-control {
        padding: 12px;
        font-size: 16px;
    }
    
    .btn {
        padding: 12px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 600px;
    }
    
    .nav-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .bottom-nav {
        display: none;
    }
    
    .more-btn {
        display: none;
    }
    
    .more-nav {
        display: none;
    }
    
    .top-navbar {
        display: block;
    }
    
    body {
        padding-top: 0;
        padding-bottom: 20px;
        margin-top: 0;
    }
    
    .container {
        margin-top: 30px;
    }
}

/* Google Ads Styles - Uncomment when implementing ads */
/*
.ad-banner-top {
    max-width: 728px;
    margin: 10px auto;
    text-align: center;
}

.ad-content {
    margin: 20px 0;
    text-align: center;
}

.ad-sidebar {
    position: fixed;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 160px;
    z-index: 999;
}

@media (max-width: 1200px) {
    .ad-sidebar {
        display: none;
    }
}
*/

@media (min-width: 1024px) {
    .container {
        max-width: 800px;
    }
    
    .nav-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .nav-menu {
        gap: 40px;
    }
    
    .nav-brand {
        font-size: 22px;
    }
}

@media (max-width: 900px) and (min-width: 768px) {
    .nav-menu {
        gap: 20px;
    }
    
    .dropdown-toggle {
        font-size: 14px;
    }
    
    .dropdown-menu {
        min-width: 160px;
    }
}

/* Tooltip Styling for Nav Icons */
.nav-btn {
    position: relative;
    display: inline-block;
    text-decoration: none;
    font-size: 22px;
    padding: 8px;
    color: #333;
}

.nav-btn:hover {
    color: #007bff;
}

.nav-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out;
}

.nav-btn::before {
    content: "";
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.8) transparent transparent transparent;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.nav-btn:hover::after,
.nav-btn:hover::before {
    opacity: 1;
}


/* Apply to all date inputs */
input[type="date"] {
    appearance: none;
    -webkit-appearance: none; /* Remove default styling (Safari/Chrome) */
    -moz-appearance: none; /* Remove default styling (Firefox) */

    width: 100%;
    padding: 10px 12px;
    font-size: 16px;
    font-family: inherit;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

    /* Focus effect */
    input[type="date"]:focus {
        border-color: #007bff;
        box-shadow: 0 0 6px rgba(0,123,255,0.25);
        outline: none;
    }

    /* Placeholder text color */
    input[type="date"]::placeholder {
        color: #999;
    }

    /* Calendar icon styling (for browsers that show it) */
    input[type="date"]::-webkit-calendar-picker-indicator {
        cursor: pointer;
        filter: invert(40%) sepia(20%) saturate(500%) hue-rotate(180deg);
        opacity: 0.8;
        transition: opacity 0.2s ease;
    }

        input[type="date"]::-webkit-calendar-picker-indicator:hover {
            opacity: 1;
        }
