:root {
    /* Primary Theme Colors */
    --primary-color: #0d6efd;
    --secondary-color: #198754;
    --success-color: #198754;
    --info-color: #0dcaf0;
    
    /* General Colors */
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --text-dark: #111111;
    --text-darker: #222222;
    --text-light: #6c757d;
    --border-color: #e9ecef;
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

/* Header Navigation Styles */
.header-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.header-nav .nav-link {
    color: rgba(44, 62, 80, 0.9) !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    padding: 0.75rem 1.25rem !important;
    border-radius: 16px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    backdrop-filter: blur(25px) saturate(120%) !important;
    -webkit-backdrop-filter: blur(25px) saturate(120%) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.header-nav .nav-link:hover,
.header-nav .nav-link.active {
    background: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(30px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(160%) !important;
    color: var(--primary-color) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid rgba(13, 110, 253, 0.2) !important;
}

/* Modal Close Button Fix */
.modal .btn-close {
    position: relative;
    z-index: 1050;
    background: transparent !important;
    border: none !important;
    opacity: 1 !important;
    font-size: 1.25rem;
    width: 32px;
    height: 32px;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.modal .btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%) !important;
}

.modal .btn-close:before {
    content: "×";
    color: white;
    font-weight: bold;
    font-size: 1.5rem;
    display: block;
    line-height: 1;
}

/* Enhanced Mobile Layout & Performance */
body {
    padding-bottom: 2rem;
    overflow-x: hidden; /* Prevent horizontal scroll */
    -webkit-overflow-scrolling: touch; /* Smooth iOS scrolling */
}

main.container {
    padding-left: 15px !important;
    padding-right: 15px !important;
    max-width: 100%;
}

/* Optimized spacing between sections */
.section-spacing {
    margin-bottom: 2rem !important;
}

/* Enhanced card spacing and performance */
.card {
    margin-bottom: 1.5rem;
    will-change: transform; /* Optimize animations */
    transform: translateZ(0); /* Enable hardware acceleration */
}

.row {
    margin-left: -8px;
    margin-right: -8px;
}

.row > * {
    padding-left: 8px;
    padding-right: 8px;
}

/* Optimized Mobile Layout */
@media (max-width: 768px) {
    main.container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    
    .card {
        margin-bottom: 1rem;
        border-radius: 12px;
    }
    
    .row {
        margin-left: -5px;
        margin-right: -5px;
    }
    
    .row > * {
        padding-left: 5px;
        padding-right: 5px;
    }
    
    /* Enhanced touch targets */
    .btn {
        min-height: 44px;
        min-width: 44px;
        touch-action: manipulation;
    }
    
    input, select, textarea {
        font-size: 16px; /* Prevent zoom on iOS */
        touch-action: manipulation;
    }
    
    /* Prevent elements from overlapping */
    .section-spacing {
        margin-bottom: 1.5rem !important;
    }
    
    /* Fix header spacing on mobile */
    .simple-header {
        margin-bottom: 1rem;
    }
    
    /* Fix card body padding on mobile */
    .card-body {
        padding: 1rem !important;
    }
    
    /* Fix button spacing */
    .btn {
        margin-bottom: 0.5rem;
    }
    
    .d-grid.gap-2 {
        gap: 0.5rem !important;
    }
}

/* Tablet Optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 95%;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.95rem;
    }
    
    .header-nav {
        gap: 1.5rem;
    }
    
    /* Optimize for touch on tablets */
    .nav-link {
        padding: 0.75rem 1.25rem;
    }
}

/* Desktop Optimizations */
@media (min-width: 1025px) {
    body {
        font-size: 1rem;
    }
    
    .container {
        max-width: 1200px;
    }
    
    .card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
    }
}

/* Performance Optimizations */
* {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Smooth animations */
.btn, .card, .nav-link {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Final text contrast overrides for accessibility */
.text-white {
    color: white !important;
}

.text-dark {
    color: var(--text-darker) !important;
}

.text-muted {
    color: #6c757d !important;
}

/* Mobile text contrast improvements */
@media (max-width: 768px) {
    .header-title {
        color: var(--text-darker) !important;
    }
    
    .header-subtitle {
        color: var(--text-dark) !important;
    }
}

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

/* Text contrast fixes for navigation */
.header-nav .nav-link {
    color: var(--text-darker) !important;
}

.nav-link {
    color: var(--text-dark) !important;
}

/* AdSense Styling */
.adsbygoogle {
    margin: 1rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.ad-container {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border: 1px solid #e9ecef;
}

.ad-label {
    font-size: 0.75rem;
    color: #6c757d;
    text-align: center;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive Ad Adjustments */
@media (max-width: 768px) {
    .adsbygoogle {
        margin: 0.5rem 0;
    }
    
    .ad-container {
        padding: 0.75rem;
        margin: 0.75rem 0;
    }
}

/* Job Browser Styling */
.job-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid transparent !important;
    will-change: transform;
}

.job-card:hover {
    background-color: #e3f2fd !important;
    border-color: var(--bs-primary) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.job-card:active {
    transform: translateY(0);
}

/* Live Activity Styling */
.recent-calculations {
    max-height: 300px;
    overflow-y: auto;
}

.recent-calculations::-webkit-scrollbar {
    width: 6px;
}

.recent-calculations::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.recent-calculations::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.recent-calculations::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Live counter animation - optimized */
#liveUserCount {
    animation: pulse 3s infinite; /* Reduced frequency */
    will-change: transform;
}

@keyframes pulse {
    0%, 100% { transform: scale3d(1, 1, 1); }
    50% { transform: scale3d(1.05, 1.05, 1); }
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%);
    color: var(--text-dark) !important;
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
    min-height: 100vh;
    padding-top: 0;
    position: relative;
}

/* Global text color fixes for better contrast */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-darker) !important;
    font-weight: 600;
}

p, span, div, li, td, th, label {
    color: var(--text-dark) !important;
}

/* Exception for elements that should remain white */
.btn h1, .btn h2, .btn h3, .btn h4, .btn h5, .btn h6,
.btn p, .btn span, .btn div,
.alert-primary h1, .alert-primary h2, .alert-primary h3, .alert-primary h4, .alert-primary h5, .alert-primary h6,
.alert-primary p, .alert-primary span, .alert-primary div {
    color: white !important;
}

/* Dark overlay for sections with white text */
.white-text-section {
    position: relative;
}

.white-text-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    border-radius: inherit;
    z-index: 0;
}

.white-text-section .header-title, 
.white-text-section .header-subtitle, 
.white-text-section .lead, 
.white-text-section .badge, 
.white-text-section .btn, 
.white-text-section .nav-link {
    color: white !important;
    position: relative;
    z-index: 1;
}

/* Reset card content to dark text */
.white-text-section .card, 
.white-text-section .card * {
    color: var(--text-dark) !important;
}

.white-text-section .article-content, 
.white-text-section .article-content * {
    color: var(--text-dark) !important;
}

/* Subtle elegant overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 25% 25%, rgba(102, 126, 234, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(0, 107, 60, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

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

@keyframes elegantOrbs {
    0%, 100% {
        transform: translateY(0px) translateX(0px) scale(1);
        opacity: 0.6;
    }
    33% {
        transform: translateY(-30px) translateX(20px) scale(1.1);
        opacity: 0.8;
    }
    66% {
        transform: translateY(20px) translateX(-15px) scale(0.9);
        opacity: 0.7;
    }
}

@keyframes subtleShift {
    0% { transform: translateX(0px) translateY(0px); }
    100% { transform: translateX(-100px) translateY(-100px); }
}

@media (max-width: 576px) {
    body {
        font-size: 14px;
    }
}

/* Premium Glassmorphism Header - Force Override with Fallbacks */
header.simple-header {
    /* Fallback for browsers without backdrop-filter support */
    background: rgba(255, 255, 255, 0.3) !important;
    /* Modern glassmorphism effect - iOS 26 Liquid Glass */
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(40px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(40px) saturate(180%) !important;
    -moz-backdrop-filter: blur(40px) saturate(180%) !important;
    -ms-backdrop-filter: blur(40px) saturate(180%) !important;
    border: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
    padding: 1.5rem 0 !important;
    margin-bottom: 2rem !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 1020 !important;
    position: sticky !important;
    top: 0 !important;
    will-change: padding, box-shadow, background;
    transform: translateZ(0);
    backface-visibility: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
}

header.simple-header.scrolled {
    padding: 0.5rem 0 !important;
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(50px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(50px) saturate(200%) !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.header-icon {
    font-size: 2rem;
    color: var(--jlp-primary);
    text-shadow: 0 3px 6px rgba(0, 107, 60, 0.3);
    transition: all 0.3s ease;
}

.header-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-darker) !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: font-size;
}

.header-subtitle {
    font-size: 0.9rem;
    color: var(--text-dark) !important;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    max-height: 50px;
    overflow: hidden;
    will-change: opacity, max-height;
}

.simple-header.scrolled .header-title {
    font-size: 1.1rem;
}

.simple-header.scrolled .header-subtitle {
    opacity: 0;
    max-height: 0;
}

.simple-header.scrolled .header-icon {
    font-size: 1.5rem;
    transition: font-size 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: font-size;
}

.party-badges {
    display: flex;
    gap: 0.5rem;
    justify-content: end;
}

.badge-jlp {
    background: linear-gradient(135deg, var(--jlp-primary) 0%, var(--jlp-secondary) 100%) !important;
    color: white;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow: 0 4px 15px rgba(0, 107, 60, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}


/* Card content styling */
.card-body {
    color: var(--text-dark);
}

.form-label, .form-text {
    color: var(--text-darker) !important;
    font-weight: 600;
}

.table td, .table th {
    color: var(--text-dark) !important;
}

.table th {
    color: white !important; /* Keep table headers white on dark background */
}

.text-muted {
    color: #6c757d !important;
}

/* Specific fixes for alert sections with gradients */
.alert-primary {
    position: relative;
}

.alert-primary.gradient-background {
    background: linear-gradient(135deg, #0d6efd 0%, #198754 100%) !important;
}

.alert-primary.gradient-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    border-radius: inherit;
    z-index: 0;
}

.alert-primary.gradient-background * {
    position: relative;
    z-index: 1;
    color: white !important;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .simple-header {
        padding: 0.75rem 0;
    }
    
    .header-icon {
        font-size: 1.5rem;
    }
    
    .header-title {
        font-size: 1.2rem;
    }
    
    .header-subtitle {
        font-size: 0.8rem;
    }
    
    .party-badges {
        justify-content: start;
        margin-top: 0.5rem;
    }
    
    .badge-jlp {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Collapsible Tax Information Styling */
.card-header .btn-link {
    color: #2c3e50;
    font-weight: inherit;
}

.card-header .btn-link:hover {
    color: var(--jlp-primary);
}

.card-header .btn-link:focus {
    box-shadow: none;
}

.card-header .fas.fa-chevron-down {
    transition: transform 0.3s ease;
}

.card-header .btn-link[aria-expanded="true"] .fas.fa-chevron-down {
    transform: rotate(180deg);
}

/* Responsive Design Improvements */
.container-fluid {
    padding-left: 15px;
    padding-right: 15px;
}

/* Table Responsiveness */
.table-responsive {
    border: none;
    margin: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    margin-bottom: 0;
    min-width: 100%;
}

@media (max-width: 991px) {
    .table {
        font-size: 0.9rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem 0.3rem;
        white-space: nowrap;
    }
}

@media (max-width: 767px) {
    .table {
        font-size: 0.8rem;
    }
    
    .table th,
    .table td {
        padding: 0.4rem 0.2rem;
        font-size: 0.75rem;
    }
    
    .table th {
        font-size: 0.7rem;
    }
}

/* Form Responsiveness */
.input-group-lg .form-control {
    font-size: 1.1rem;
}

@media (max-width: 767px) {
    .input-group-lg .form-control {
        font-size: 1rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* Card and Content Responsiveness */
@media (max-width: 575px) {
    .card-body {
        padding: 1rem 0.75rem;
    }
    
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .row {
        margin-left: -5px;
        margin-right: -5px;
    }
    
    .col, .col-md-6, .col-lg-8, .col-auto {
        padding-left: 5px;
        padding-right: 5px;
    }
}

/* Text and Typography Responsiveness */
@media (max-width: 991px) {
    h3 {
        font-size: 1.3rem;
    }
    
    h4 {
        font-size: 1.2rem;
    }
    
    h5 {
        font-size: 1.1rem;
    }
}

@media (max-width: 767px) {
    h3 {
        font-size: 1.2rem;
    }
    
    h4 {
        font-size: 1.1rem;
    }
    
    h5 {
        font-size: 1rem;
    }
    
    .card-title {
        font-size: 1rem;
    }
}

/* Share Section Responsiveness */
@media (max-width: 575px) {
    .btn-social {
        padding: 12px 6px;
        min-height: 48px;
        font-size: 0.8rem;
    }
    
    .btn-social i {
        font-size: 1.2rem;
    }
    
    .btn-social span {
        display: none !important;
    }
}

/* Standard Card Styling */
.card {
    border: none;
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
    width: 100%;
    max-width: 100%;
    background: white;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    font-weight: 600;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .card {
        margin-bottom: 1rem;
    }
    
    .card-header {
        padding: 1rem;
    }
    
    .card-body {
        padding: 1rem !important;
    }
    
    .card-title {
        font-size: 1.25rem;
    }
}

.bg-gradient {
    background: var(--bg-gradient);
}

/* Standard Button Styling */
.btn {
    border-radius: 0.75rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
    min-height: 44px;
}

/* Button text colors */
.btn-primary, .btn-success, .btn-info, .btn-warning, .btn-danger {
    color: white !important;
}

.btn-light, .btn-outline-primary, .btn-outline-secondary {
    color: var(--text-darker) !important;
}

.btn-secondary {
    color: white !important;
}

@media (max-width: 768px) {
    .btn {
        padding: 0.8rem 1rem;
        font-size: 0.85rem;
        min-height: 48px;
    }
    
    .btn-lg {
        padding: 1rem 1.2rem;
        font-size: 0.95rem;
        min-height: 52px;
    }
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.2);
}

.btn-jlp {
    background: linear-gradient(135deg, var(--jlp-primary) 0%, var(--jlp-secondary) 100%);
    color: white;
    box-shadow: 0 10px 25px rgba(0, 107, 60, 0.3);
}

.btn-jlp:hover,
.btn-jlp:focus {
    background: linear-gradient(135deg, var(--jlp-secondary) 0%, var(--jlp-primary) 100%);
    color: white;
    box-shadow: 0 15px 35px rgba(0, 107, 60, 0.4);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}


/* Input Styling */
.form-control {
    border-radius: 0.75rem;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    min-height: 44px;
    background: white;
}

@media (max-width: 768px) {
    .form-control {
        font-size: 16px;
        min-height: 48px;
        padding: 0.8rem 1rem;
    }
    
    .input-group-lg .form-control {
        font-size: 1.1rem;
        min-height: 52px;
    }
    
    .input-group-text {
        font-size: 1rem;
    }
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.input-group-text {
    border-radius: 0.75rem 0 0 0.75rem;
    border: 2px solid #e9ecef;
    border-right: none;
    background-color: #f8f9fa;
    font-weight: 600;
}

/* Standard Table Styling */
.table {
    border-radius: 0 0 1rem 1rem;
    overflow: hidden;
    background: white;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    .table {
        font-size: 0.9rem;
    }
    
    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
    }
    
    .table th {
        font-size: 0.8rem;
    }
}

.table th {
    background-color: #495057;
    border: none;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
    padding: 1rem;
}

.table td {
    padding: 1rem;
    vertical-align: middle;
    border-color: var(--border-color);
}

.table-hover tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.1);
}

/* Party-specific row styling */
.party-row.jlp {
    border-left: 4px solid var(--jlp-primary);
    background-color: var(--jlp-light);
}


.party-name.jlp {
    color: var(--jlp-primary);
    font-weight: 700;
}


/* Text Colors */
.text-jlp {
    color: var(--jlp-primary);
}


/* Standard Alert Styling */
.alert {
    border-radius: 1rem;
    border: none;
    font-weight: 500;
    background: white;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.alert-info {
    background: rgba(102, 126, 234, 0.15);
    color: #2d3748;
    border-left: 4px solid #667eea;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .party-badge {
        margin-bottom: 0.5rem;
    }
    
    .btn {
        margin-bottom: 0.5rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem 0.25rem;
        font-size: 0.8rem;
    }
}

/* Badge text colors */
.badge {
    color: white !important;
}

.badge.bg-light, .badge.bg-white {
    color: var(--text-darker) !important;
}

/* Loading Animation */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Dynamic Share Button Animations */
#expandedShareButtons, #expandedSliderShareButtons {
    transition: all 0.3s ease;
}

#expandedShareButtons.expanding, #expandedSliderShareButtons.expanding {
    opacity: 0;
    transform: translateY(-10px);
}

#expandedShareButtons.expanded, #expandedSliderShareButtons.expanded {
    opacity: 1;
    transform: translateY(0);
}

/* More button styling */
.btn[onclick*="toggleExpandedShare"] {
    transition: all 0.2s ease;
}

.btn[onclick*="toggleExpandedShare"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Enhanced Focus indicators for accessibility */
.btn:focus,
.form-control:focus {
    outline: 3px solid rgba(102, 126, 234, 0.6);
    outline-offset: 2px;
}

/* Standard text styling */
.card-title {
    color: #2c3e50;
    font-weight: 700;
}

.card-text {
    color: #495057;
    font-weight: 500;
}

.text-muted {
    color: #6c757d !important;
}

/* Glassmorphism breadcrumb styling */
.breadcrumb {
    background: white;
    border-radius: 0.75rem;
    padding: 0.75rem 1.25rem;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

.breadcrumb-item {
    color: #6c757d;
    font-weight: 500;
}

.breadcrumb-item.active {
    color: #495057;
    font-weight: 600;
}

/* Enhanced mobile app banner with liquid glass */
.mobile-app-banner {
    background: linear-gradient(135deg, rgba(0, 166, 81, 0.15) 0%, rgba(255, 107, 53, 0.15) 100%) !important;
    backdrop-filter: blur(40px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(40px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3) !important;
}

/* Stable Glassmorphism Newsletter Modal */
#newsletterModal .modal-content {
    background: rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
    overflow: hidden !important;
}

#newsletterModal .modal-header {
    background: linear-gradient(135deg, rgba(0, 107, 60, 0.15) 0%, rgba(255, 107, 53, 0.15) 100%) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 20px 20px 0 0 !important;
}

#newsletterModal .modal-body {
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

#newsletterModal .modal-title {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    font-weight: 600;
}

#newsletterModal .form-control {
    background: rgba(255, 255, 255, 0.4) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 12px !important;
    transition: all 0.3s ease !important;
}

#newsletterModal .form-control:focus {
    background: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.2) !important;
    border: 1px solid rgba(25, 135, 84, 0.4) !important;
    transform: translateY(-1px) !important;
}

#newsletterModal .input-group-text {
    background: rgba(248, 249, 250, 0.4) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-right: none !important;
    border-radius: 12px 0 0 12px !important;
}

#newsletterModal .btn-success {
    background: linear-gradient(135deg, #198754, #20c997);
    border: none;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 10px 25px rgba(25, 135, 84, 0.3);
    transition: all 0.3s ease;
}

#newsletterModal .btn-success:hover {
    background: linear-gradient(135deg, #157347, #1aa179);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 35px rgba(25, 135, 84, 0.4);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

#newsletterModal .card {
    background: rgba(248, 249, 250, 0.3) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06) !important;
}

#newsletterModal .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
    transition: all 0.3s ease;
}

#newsletterModal .btn-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Online Bubble Styling - Fixed at bottom of screen */
.online-bubble {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(45px) saturate(170%) !important;
    -webkit-backdrop-filter: blur(45px) saturate(170%) !important;
    padding: 0.75rem 1.25rem;
    border-radius: 25px;
    border: 1px solid rgba(74, 222, 128, 0.3);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.online-bubble:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(74, 222, 128, 0.5);
}

.online-bubble #onlineCount {
    font-weight: 700;
    font-size: 1.1rem;
    color: #059669;
    transition: all 0.3s ease;
    min-width: 1.5rem;
    text-align: center;
    margin: 0 0.25rem;
}

.online-bubble small {
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 500;
}

.online-bubble i {
    color: #10b981;
    transition: color 0.3s ease;
    font-size: 1rem;
}

/* Pulse animation for new users */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(74, 222, 128, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0);
    }
}

/* Simple pulse for Live indicator */
@keyframes simplePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Recent calculations animations */
.recent-item {
    transition: all 0.2s ease;
}

.recent-item:hover {
    background-color: #f8f9fa !important;
    transform: translateX(2px) !important;
}

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

/* Connection status indicators for bubble */
.online-bubble.connecting #onlineCount {
    color: #f59e0b;
}

.online-bubble.connecting i {
    color: #f59e0b;
}

.online-bubble.disconnected #onlineCount {
    color: #dc2626;
}

.online-bubble.disconnected i {
    color: #dc2626;
}

/* Salary Slider Styling */
.salary-slider {
    height: 8px;
    background: #e9ecef;
    border-radius: 5px;
    outline: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.salary-slider:hover {
    opacity: 1;
}

.salary-slider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.3);
    transition: all 0.3s ease;
}

.salary-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.5);
}

.salary-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.3);
    transition: all 0.3s ease;
}

.salary-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.5);
}

.slider-value {
    color: #007bff;
    font-weight: 700;
    font-size: 1.2rem;
}

/* Interactive animation for slider results */
.slider-result-animate {
    animation: slideUpdate 0.3s ease-out;
}

@keyframes slideUpdate {
    0% {
        opacity: 0.7;
        transform: translateY(-5px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile-optimized header transitions */
@media (max-width: 768px) {
    header {
        padding: 1rem 0;
    }
    
    header.scrolled {
        padding: 0.3rem 0;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    header.scrolled h1 {
        font-size: 0.9rem;
    }
    
    header p {
        font-size: 0.85rem;
    }
    
    .party-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
        margin: 0.2rem;
    }
    
    header.scrolled .party-badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
    }
}

@media (max-width: 576px) {
    header {
        padding: 0.8rem 0;
    }
    
    header.scrolled {
        padding: 0.25rem 0;
    }
    
    header h1 {
        font-size: 1.3rem;
    }
    
    header.scrolled h1 {
        font-size: 0.8rem;
    }
    
    .party-badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
    
    header.scrolled .party-badge {
        font-size: 0.6rem;
        padding: 0.15rem 0.3rem;
    }
}

/* Responsive adjustments for online bubble */
@media (max-width: 768px) {
    .online-bubble {
        bottom: 15px;
        right: 15px;
        font-size: 0.8rem;
        padding: 0.6rem 1rem;
    }
    
    .online-bubble #onlineCount {
        font-size: 1rem;
    }
    
    .online-bubble i {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .online-bubble {
        bottom: 12px;
        right: 12px;
        font-size: 0.75rem;
        padding: 0.5rem 0.8rem;
    }
    
    .online-bubble #onlineCount {
        font-size: 0.9rem;
        min-width: 1.2rem;
    }
    
    .online-bubble small {
        font-size: 0.65rem;
    }
    
    .online-bubble i {
        font-size: 0.8rem;
    }
}

/* Newsletter Section Styling */
.newsletter-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.newsletter-card {
    border: none;
    background: white;
    border-radius: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.newsletter-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.2) !important;
}

.newsletter-card .input-group-text {
    border-right: none;
}

.newsletter-card .form-control {
    border-left: none;
    font-size: 0.95rem;
}

.newsletter-card .form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
    border-color: #198754;
}

.newsletter-card .btn-success {
    background: linear-gradient(135deg, #198754, #20c997);
    border: none;
    transition: all 0.3s ease;
}

.newsletter-card .btn-success:hover {
    background: linear-gradient(135deg, #157347, #1aa179);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(25, 135, 84, 0.3);
}

.newsletter-card .btn-success:disabled {
    background: #6c757d;
    transform: none;
    box-shadow: none;
}

/* Mobile responsiveness for newsletter */
@media (max-width: 768px) {
    .newsletter-card {
        padding: 1rem;
    }
    
    .newsletter-card .col-md-8,
    .newsletter-card .col-md-4 {
        margin-bottom: 0.5rem;
    }
    
    .newsletter-section {
        padding: 2rem 0;
    }
    }
    
    .newsletter-card .btn {
        width: 100%;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-jlp {
        border: 2px solid var(--jlp-dark);
    }
    
    
    .online-bubble {
        border: 2px solid rgba(16, 185, 129, 0.5);
        background: rgba(255, 255, 255, 0.98);
    }
    
    .newsletter-card {
        border: 2px solid #495057;
    }
}

/* 12. Social Media Sharing Styles */
.share-section {
    background: linear-gradient(135deg, rgba(0, 107, 60, 0.05) 0%, rgba(255, 107, 53, 0.05) 100%);
}

.share-card .card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.btn-social {
    border-radius: 12px;
    font-weight: 600;
    padding: 15px 12px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    text-transform: none;
    min-height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.btn-social:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.btn-social i {
    font-size: 1.5rem;
    margin-right: 0.4rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.btn-whatsapp {
    background: #25D366;
    color: white;
    border-color: #25D366;
}

.btn-whatsapp:hover {
    background: #20c25a;
    color: white;
}

.btn-facebook {
    background: #1877F2;
    color: white;
    border-color: #1877F2;
}

.btn-facebook:hover {
    background: #1462d4;
    color: white;
}

.btn-x {
    background: #000000;
    color: white;
    border-color: #000000;
}

.btn-x:hover {
    background: #333333;
    color: white;
}

.btn-instagram {
    background: linear-gradient(45deg, #833AB4, #FD1D1D, #FCB045);
    color: white;
    border: none;
}

.btn-instagram:hover {
    background: linear-gradient(45deg, #7329a3, #e51a1a, #e3a03e);
    color: white;
}

.btn-threads {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    color: white;
    border: none;
}

.btn-threads:hover {
    background: linear-gradient(135deg, #333333, #4a4a4a);
    color: white;
}

.btn-copy {
    background: #6c757d;
    color: white;
    border-color: #6c757d;
}

.btn-copy:hover {
    background: #5a6268;
    color: white;
}

#shareText {
    font-size: 0.9rem;
    line-height: 1.5;
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
}

@media (max-width: 768px) {
    .btn-social {
        padding: 10px 6px;
        font-size: 0.9rem;
    }
    
    .btn-social i {
        font-size: 1.1rem;
    }
    
    .share-section {
        padding: 2rem 0;
    }
}

/* Voting Poll Animations and Gamification */
.voting-pulse {
    animation: votingPulse 2s ease-in-out infinite;
}

@keyframes votingPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.vote-button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.vote-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-width: 2px;
}

.vote-button:active {
    transform: translateY(-2px) scale(0.98);
}

.vote-button.voting {
    animation: votingSubmit 1s ease-in-out;
    transform: scale(1.05);
}

@keyframes votingSubmit {
    0% { transform: scale(1); }
    50% { transform: scale(1.1) rotate(2deg); }
    100% { transform: scale(1.05); }
}

.result-card {
    transition: all 0.3s ease;
    transform: scale(0.95);
    opacity: 0;
    animation: resultAppear 0.6s ease-out forwards;
}

.result-card:nth-child(1) { animation-delay: 0.1s; }
.result-card:nth-child(2) { animation-delay: 0.2s; }
.result-card:nth-child(3) { animation-delay: 0.3s; }

@keyframes resultAppear {
    0% { 
        transform: scale(0.8) translateY(20px); 
        opacity: 0; 
    }
    100% { 
        transform: scale(1) translateY(0); 
        opacity: 1; 
    }
}

.result-card:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.progress-bar-animated {
    transition: width 1s ease-out;
    position: relative;
    overflow: hidden;
}

.progress-bar-animated::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: progressShine 2s infinite;
}

@keyframes progressShine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.vote-success {
    animation: voteSuccess 0.6s ease-out;
}

@keyframes voteSuccess {
    0% { transform: scale(1); }
    50% { 
        transform: scale(1.1); 
        background-color: #28a745; 
        color: white; 
    }
    100% { transform: scale(1); }
}

.poll-stats-bounce {
    animation: statsBounce 0.5s ease-out;
}

@keyframes statsBounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

/* Vote button hover effects */
.btn-outline-success:hover .vote-content i {
    animation: iconBounce 0.3s ease;
}

.btn-outline-warning:hover .vote-content i {
    animation: iconSpin 0.3s ease;
}

.btn-outline-secondary:hover .vote-content i {
    animation: iconShake 0.3s ease;
}

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

@keyframes iconSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes iconShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

/* Voting section enhancement */
#votingPollSection {
    position: relative;
    overflow: hidden;
}

#votingPollSection::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(76, 175, 80, 0.03) 0%, rgba(255, 152, 0, 0.03) 50%, transparent 100%);
    animation: backgroundFloat 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes backgroundFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-10px, -10px) rotate(180deg); }
}
