/* ===================================================================
   TOOLS MASTER HUB - SHARED STYLES
   Consistent theming and optimized CSS for all pages
   Performance optimized with critical CSS inlined
   =================================================================== */

/* CSS Custom Properties */
:root {
    --primary-pink: #ff69b4;
    --secondary-pink: #ffb6c1;
    --light-pink: #ffc0cb;
    --pale-pink: #ffe4e6;
    --dark-pink: #d1477a;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1e3a8a;
    --gray-900: #1e3a8a;
    --green-500: #10b981;
    --green-600: #059669;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Theme Variables */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --text-primary: #1e3a8a;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --card-bg: #ffffff;
}

/* Dark Mode removed */

/* Glitter Text Animation */
.glitter-text-container {
    margin-bottom: 1rem;
    position: relative;
}

.glitter-text {
    background: linear-gradient(45deg, #1e3a8a, #3b82f6, #2563eb, #1d4ed8, #1e3a8a);
    background-size: 300% 300%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: glitterMove 3s ease-in-out infinite, shimmer 2s linear infinite;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    position: relative;
    text-shadow: 0 0 20px rgba(30, 58, 138, 0.5);
}

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

@keyframes shimmer {
    0% {
        filter: brightness(1) hue-rotate(0deg);
    }
    25% {
        filter: brightness(1.3) hue-rotate(90deg);
    }
    50% {
        filter: brightness(1.6) hue-rotate(180deg);
    }
    75% {
        filter: brightness(1.3) hue-rotate(270deg);
    }
    100% {
        filter: brightness(1) hue-rotate(360deg);
    }
}

.glitter-text::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    animation: sparkle 2s linear infinite;
    pointer-events: none;
}

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

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

/* Enhanced visual elements */
.live-data-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    animation: pulse 2s infinite;
}

.pulse-dot {
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.market-data-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.market-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(16, 185, 129, 0.05));
    border-radius: 8px;
    border: 1px solid rgba(59, 130, 246, 0.1);
    transition: all 0.3s ease;
}

.market-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.market-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.market-label i {
    color: #3b82f6;
}

.market-value {
    font-weight: 700;
    color: #059669;
    font-size: 1rem;
}

.trust-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(59, 130, 246, 0.1));
    border-radius: 20px;
    margin-top: 1rem;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.trust-indicator i {
    color: #10b981;
}

.calculation-preview {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(139, 92, 246, 0.05));
    border: 2px solid rgba(59, 130, 246, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}

.calculation-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #10b981);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

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

/* Responsive adjustments for glitter text */
@media (max-width: 768px) {
    .glitter-text {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .glitter-text {
        font-size: 1.5rem;
    }
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, var(--pale-pink) 0%, var(--bg-primary) 50%, var(--bg-secondary) 100%);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, var(--primary-pink) 0%, var(--secondary-pink) 50%, var(--light-pink) 100%);
    color: #1e3a8a;
    padding: 2rem 0;
    text-align: center;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    animation: float 6s ease-in-out infinite;
}

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

.header-content {
    position: relative;
    z-index: 2;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    animation: slideInDown 1s ease-out;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.95;
    animation: slideInUp 1s ease-out 0.3s both;
}

/* Navigation */
.navigation {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 2rem;
}

.nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    list-style: none;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 105, 180, 0.1);
    color: #1e3a8a;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 105, 180, 0.2);
}

.nav-link:hover, .nav-link.active {
    background: var(--primary-pink);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Content Layout */
.main-content {
    padding: 3rem 0;
    min-height: 60vh;
}

.content-card {
    background: linear-gradient(135deg, var(--white) 0%, var(--gray-50) 100%);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--gray-200);
    margin-bottom: 2rem;
}

/* Calculator Category Styles */
.calculator-category {
    margin-bottom: 4rem;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
}

.calculator-category[data-category="loans"] {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border-color: #2196f3;
}

.calculator-category[data-category="investments"] {
    background: linear-gradient(135deg, #e8f5e8 0%, #f1f8e9 100%);
    border-color: #4caf50;
}

.calculator-category[data-category="tax"] {
    background: linear-gradient(135deg, #fff3e0 0%, #fce4ec 100%);
    border-color: #ff9800;
}

.calculator-category[data-category="insurance"] {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1f5fe 100%);
    border-color: #9c27b0;
}

.calculator-category[data-category="lifestyle"] {
    background: linear-gradient(135deg, #e0f2f1 0%, #e8eaf6 100%);
    border-color: #009688;
}

.calculator-category[data-category="business"] {
    background: linear-gradient(135deg, #fff8e1 0%, #fce4ec 100%);
    border-color: #ffc107;
}

.category-header {
    text-align: center;
    margin-bottom: 2rem;
}

.category-title {
    font-size: 2rem;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.category-title i {
    font-size: 1.75rem;
}

.category-description {
    font-size: 1.1rem;
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Calculator Grid */
.calculators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Card Styles */
.calculator-card {
    background: linear-gradient(135deg, var(--white) 0%, var(--gray-50) 100%);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Fix for dark mode dropdown and input text */
[data-theme="dark"] select option {
    background-color: var(--card-bg);
    color: var(--text-primary);
}

[data-theme="dark"] input::placeholder {
    color: var(--gray-400);
}

.calculator-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-pink), var(--secondary-pink));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.calculator-card:hover::before {
    transform: scaleX(1);
}

.calculator-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl), 0 0 30px rgba(255, 105, 180, 0.2);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e3a8a;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-title i {
    color: var(--primary-pink);
    font-size: 1.8rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #1e3a8a;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 1.2rem 1.2rem;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    font-size: 1.1rem;
    min-height: 50px;
    transition: all 0.3s ease;
    background: var(--white);
    color: var(--input-text-color, #1e3a8a);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-pink);
    box-shadow: 0 0 0 3px rgba(255, 105, 180, 0.1);
    transform: translateY(-1px);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Button Styles */
.btn {
    background: linear-gradient(135deg, var(--primary-pink), var(--light-pink));
    color: #1e3a8a;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 105, 180, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
    color: #1e3a8a;
}

.btn-secondary:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Results Styles */
.results {
    display: none;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
    border-radius: 15px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    border: 1px solid var(--gray-200);
    animation: slideUp 0.5s ease-out;
}

.results.show {
    display: block;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    font-weight: 500;
    color: #1e3a8a;
}

.result-value {
    font-weight: 600;
    color: #1e3a8a;
    font-size: 1.1rem;
    animation: countUp 0.8s ease-out;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--light-pink) 0%, rgba(255, 182, 193, 0.9) 100%);
    color: #1e3a8a;
    text-align: center;
    padding: 3rem 0 2rem;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-nav a {
    color: #1e3a8a;
    text-decoration: none;
    font-weight: 500;
}



.footer-brand {
    margin-bottom: 1rem;
}

.footer h3 {
    color: #1e3a8a;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.footer p {
    color: #1e3a8a;
    opacity: 0.9;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.footer-copyright {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-700);
    font-size: 0.9rem;
    color: white;
    font-weight: bold;
    opacity: 0.9;
}

.footer-copyright p {
    color: white;
    font-weight: bold;
}

/* Additional footer text elements */
.footer strong {
    color: white;
    font-weight: bold;
}

.footer-keywords strong {
    color: white;
    font-weight: bold;
}



.footer small {
    color: #1e3a8a;
}

.footer span {
    color: #1e3a8a;
}

.footer div {
    color: #1e3a8a;
}

.footer-keywords {
    color: white;
    font-weight: bold;
}

/* Other Tools Links Specific Styling */
.tools-links .tool-link {
    color: #1e3a8a !important;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tools-links .tool-link:hover {
    color: #3b82f6 !important;
    text-decoration: underline;
    transform: translateY(-1px);
}

/* Advertisement Section */
.monetag-advertising-space {
    background: linear-gradient(135deg, var(--gray-900) 0%, #1a1a2e 100%);
    padding: 2rem 0;
    margin-top: 0;
    border-top: 3px solid var(--primary-pink);
}

.monetag-ads-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.monetag-ads-section {
    margin: 0;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(255, 105, 180, 0.1) 0%, rgba(255, 182, 193, 0.1) 100%);
    border-radius: 15px;
    border: 2px solid rgba(255, 105, 180, 0.3);
    backdrop-filter: blur(10px);
}

.monetag-ads-section h4 {
    color: var(--light-pink);
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.ad-placeholder {
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 105, 180, 0.4);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.ad-placeholder:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 105, 180, 0.6);
    transform: translateY(-2px);
}

.ad-content {
    color: white;
}

/* Loan Type Buttons */
.loan-type-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-300);
    background: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.loan-type-btn.active,
.loan-type-btn:hover {
    border-color: var(--primary-pink);
    background: var(--primary-pink);
    color: white;
}

/* Live indicator animation */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.pulse-dot {
    animation: pulse 2s infinite;
}

/* Market data styles */
.market-data-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.market-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.market-item:last-child {
    border-bottom: none;
}

.market-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.market-label i {
    color: var(--primary-pink);
    width: 16px;
}

.market-value {
    font-weight: 600;
    color: var(--text-primary);
}

.market-value .positive {
    color: #10b981;
}

.market-value .negative {
    color: #ef4444;
}

.market-value small {
    font-size: 0.8rem;
    font-weight: 500;
}

/* Other Tools Section */
.other-tools-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.other-tools-section h4 {
    color: #1e3a8a;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.tools-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tool-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #1e3a8a;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(30, 58, 138, 0.2);
}

.tool-link:hover {
    background: var(--primary-pink);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 105, 180, 0.3);
    border-color: var(--primary-pink);
}

.tool-link i {
    font-size: 0.8rem;
    opacity: 0.8;
}

.tool-link:hover i {
    opacity: 1;
    animation: bounce 0.6s ease-in-out;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-3px);
    }
    60% {
        transform: translateY(-1px);
    }
}

/* Enhanced mobile responsiveness */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .calculators-grid-main {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-section {
        padding: 1rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .btn {
        font-size: 0.9rem;
        padding: 0.8rem 1.5rem;
    }
    
    .result-cards {
        grid-template-columns: 1fr;
    }
    
    .info-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
}

/* Tablet responsiveness */
@media (min-width: 481px) and (max-width: 768px) {
    .calculators-grid-main {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .info-cards-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .tools-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

/* Desktop responsiveness */
@media (min-width: 768px) {
    .tools-links {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .tool-link {
        flex: 1;
        min-width: 250px;
        justify-content: center;
    }
    
    .calculators-grid-main {
        grid-template-columns: 1fr 1fr;
    }
    
    .info-cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Performance optimizations */
.calculator-card-main,
.tool-card,
.info-card {
    will-change: transform;
}

.btn {
    will-change: transform, box-shadow;
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .pulse-dot {
        animation: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
        --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    }
    
    .btn {
        border-width: 2px;
    }
    
    .form-control {
        border-width: 2px;
    }
}

/* Theme Switcher */
.theme-language-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 1000;
}

.language-toggle {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
}

.language-toggle:hover {
    background: var(--primary-pink);
    color: white;
    transform: translateY(-2px);
}

.language-toggle i {
    margin-right: 5px;
}

/* Search functionality */
.search-container {
    position: relative;
    width: 250px;
}

.search-input {
    width: 100%;
    padding: 8px 40px 8px 16px;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.3s ease;
    outline: none;
}

.search-input:focus {
    border-color: var(--primary-pink);
    box-shadow: 0 0 0 3px rgba(255, 105, 180, 0.1);
}

.search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    pointer-events: none;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1001;
    display: none;
}

.search-results.show {
    display: block;
}

.search-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--gray-200);
    transition: background-color 0.2s ease;
}

.search-item:last-child {
    border-bottom: none;
}

.search-item:hover {
    background: var(--gray-50);
}

.search-item-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.search-item-description {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Export/Print controls */
.calculator-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    align-items: center;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
    color: var(--text-primary);
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.action-btn:hover {
    background: var(--primary-pink);
    color: white;
    border-color: var(--primary-pink);
    transform: translateY(-1px);
}

.action-btn i {
    font-size: 0.8rem;
}

/* Keyboard shortcuts indicator */
.keyboard-shortcut {
    font-size: 0.75rem;
    color: var(--gray-500);
    background: var(--gray-100);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: auto;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .theme-language-controls {
        position: relative;
        top: auto;
        right: auto;
        justify-content: center;
        margin-bottom: 20px;
        padding: 0 20px;
    }
    
    .search-container {
        width: 200px;
    }
    
    .search-input {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .calculator-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .action-btn {
        width: 100%;
        justify-content: center;
    }
    
    .keyboard-shortcut {
        display: none; /* Hide on mobile */
    }
}

/* Card styling */
.card, .content-card {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.form-control {
    background: var(--card-bg);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.form-control:focus {
    background: var(--card-bg);
    color: var(--text-primary);
}

/* Language content hiding */
.lang-en { display: block !important; }
.lang-hi { display: none !important; }

[data-lang="hi"] .lang-en { display: none !important; }
[data-lang="hi"] .lang-hi { display: block !important; }



/* Animations */
@keyframes slideInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

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

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

@keyframes countUp {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-300);
    border-radius: 50%;
    border-top-color: var(--primary-pink);
    animation: spin 0.8s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Navigation Styles */
.nav-menu {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 105, 180, 0.1);
    padding: 1rem 0;
    position: relative;
    z-index: 100;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.nav-list li {
    margin: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    color: #1e3a8a;
    font-weight: 500;
    border-radius: 25px;
    transition: all 0.3s ease;
    background: rgba(255, 105, 180, 0.05);
    border: 1px solid rgba(255, 105, 180, 0.1);
}

.nav-link:hover {
    background: linear-gradient(135deg, rgba(255, 105, 180, 0.1), rgba(255, 182, 193, 0.1));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 105, 180, 0.2);
    color: #1e3a8a;
}

.nav-link i {
    font-size: 1rem;
    color: var(--primary-pink);
}

/* Navigation Pills for Calculators Page */
.calculators-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 105, 180, 0.1);
    padding: 1rem 0;
}

.nav-pills {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.nav-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    color: #1e3a8a;
    font-weight: 500;
    border-radius: 25px;
    transition: all 0.3s ease;
    background: rgba(255, 105, 180, 0.05);
    border: 1px solid rgba(255, 105, 180, 0.1);
}

.nav-pill:hover {
    background: linear-gradient(135deg, rgba(255, 105, 180, 0.1), rgba(255, 182, 193, 0.1));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 105, 180, 0.2);
    color: #1e3a8a;
}

.nav-pill i {
    font-size: 1rem;
    color: var(--primary-pink);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .calculators-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .nav-list {
        gap: 1rem;
        flex-direction: column;
    }
    
    .nav-link {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    .nav-pills {
        gap: 1rem;
        flex-direction: column;
    }
    
    .nav-pill {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    .footer-nav {
        gap: 1rem;
    }
}

/* Performance Optimizations */
.lazy-load {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.lazy-load.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-pink);
    outline-offset: 2px;
}