/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
    overscroll-behavior: none;
    -webkit-overflow-scrolling: touch;
}

body {
    overflow-x: hidden;
    overscroll-behavior: none;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

/* Prevent overscroll on all elements */
* {
    overscroll-behavior: none;
}

/* Ensure viewport covers entire screen */
#root, .app {
    min-height: 100vh;
    overflow-x: hidden;
    overscroll-behavior: none;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    color: #ffffff;
    min-height: 100vh;
    line-height: 1.6;
    /* Performance optimizations */
    text-rendering: optimizeSpeed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Prevent overscroll */
    overscroll-behavior-y: none;
    -webkit-overflow-scrolling: touch;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    margin: 0 auto;
}

/* SEO Header */
.seo-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 10px 0;
}

.seo-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.seo-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
}

/* Cards Wrapper */
.cards-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 40px;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 600px;
    margin-bottom: 60px;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.cards-wrapper.has-results {
    justify-content: flex-start;
    gap: 40px;
    align-items: flex-start;
}

/* Calculator Card */
.calculator-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    align-self: flex-start;
    /* Performance optimizations */
    will-change: transform;
    transform: translateZ(0);
}

.calculator-card:hover {
    transform: translateY(-2px) translateZ(0);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

/* Input Card */
.input-card {
    width: 600px;
    transform: translateX(0);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Results Section */
.results-section {
    width: 500px;
    height: 600px;
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    backdrop-filter: none;
    box-shadow: none;
    overflow: visible;
}

.results-section.show {
    opacity: 1;
    transform: translateX(0);
}

/* When results are shown, move input card to left */
    .cards-wrapper.has-results .input-card {
        transform: translateX(-50px);
    }
    
    .results-section {
        width: 100%;
        max-width: 500px;
        height: auto;
    }
    
    .results-table {
        max-height: 400px;
    }

/* Key Metrics Section */
.key-metrics-section {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 32px auto;
    padding: 0 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.key-metrics-section.show {
    opacity: 1;
    transform: translateY(0);
}

.key-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
}

.metric-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 40px 32px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.metric-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.metric-card:hover::before {
    opacity: 1;
}

.metric-icon {
    font-size: 24px;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.metric-content {
    position: relative;
    z-index: 1;
}

.metric-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    line-height: 1.2;
}

.metric-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.header h2 {
    font-size: 2rem;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    font-weight: 400;
}

/* Input Section */
.input-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.currency-symbol {
    position: absolute;
    left: 16px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    z-index: 1;
}

.input-wrapper input {
    width: 100%;
    padding: 16px 16px 16px 32px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    /* Performance optimizations */
    will-change: border-color, background-color;
}

.input-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.input-wrapper input:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-wrapper input:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.12);
}

.region-select {
    width: 100%;
    padding: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    /* Performance optimizations */
    will-change: border-color, background-color;
}

.region-select option {
    background: #1a1a2e;
    color: #ffffff;
}

.region-select:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.region-select:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.12);
}

/* Calculate Button */
.calculate-button {
    width: 100%;
    padding: 18px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    /* Performance optimizations */
    will-change: transform;
}

.calculate-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.calculate-button:active {
    transform: translateY(0);
}

.calculate-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Loading Spinner */
.button-loader {
    display: none;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    /* Performance optimizations */
    will-change: transform;
}

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

/* Results Content */
.results-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Detailed Breakdown Card */
.breakdown-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 30px;
    margin-top: 30px;
    height: 400px;
    overflow-y: auto;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.breakdown-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Custom scrollbar for breakdown card */
.breakdown-card::-webkit-scrollbar {
    width: 8px;
}

.breakdown-card::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.breakdown-card::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.breakdown-card::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.breakdown-card .card-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.breakdown-card .card-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
}

.breakdown-card .card-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    margin: 0;
}

.breakdown-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.content-section {
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.content-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.data-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.section-icon {
    font-size: 1.2rem;
}

.section-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.section-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Key Results */
.key-results-row {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    justify-content: space-between;
}

.key-result {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
    /* Performance optimizations */
    will-change: transform;
}

.key-result:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.08);
}

.key-result.primary {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    border-color: rgba(102, 126, 234, 0.3);
}

.key-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.key-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.key-result.primary .key-value {
    font-size: 1.8rem;
}

/* Compact Breakdown */
.compact-breakdown {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.breakdown-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.breakdown-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    /* Performance optimizations */
    will-change: transform;
}

.breakdown-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.card-icon {
    font-size: 1.5rem;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
}

.card-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.data-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
}

.data-row:last-child {
    border-bottom: none;
}

.data-row:hover {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 8px 12px;
    margin: 0 -12px;
}

.data-row.highlight {
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    padding: 12px;
    margin: 0 -12px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.data-row.total {
    background: rgba(118, 75, 162, 0.1);
    border-radius: 8px;
    padding: 12px;
    margin: 0 -12px;
    border: 1px solid rgba(118, 75, 162, 0.2);
    font-weight: 600;
}

.data-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.data-value {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
}

.data-row.total .data-value {
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.data-row.highlight .data-value {
    color: #667eea;
    font-weight: 600;
}

/* Blog Section */
.blog-section {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    padding: 60px 40px;
    margin-top: 60px;
    position: relative;
    overflow: hidden;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    margin-top: 40px;
}

.blog-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
}

.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.blog-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    border-color: rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.05) 100%);
}

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

.blog-card-link {
    display: block;
    padding: 32px;
    color: inherit;
    text-decoration: none;
    height: 100%;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.blog-card-link:hover {
    color: inherit;
}

.blog-card-content h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.3;
    color: #ffffff;
    transition: color 0.3s ease;
    letter-spacing: -0.02em;
    padding-right: 80px;
}

.blog-card:hover .blog-card-content h3 {
    color: #667eea;
    text-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

.blog-card-content p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 24px;
    font-weight: 400;
}

.blog-card .blog-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.blog-card .read-time {
    color: #667eea;
    font-weight: 600;
    background: rgba(102, 126, 234, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.blog-card .date {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

/* Blog card category badges */
.blog-card .category {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(102, 126, 234, 0.15);
    color: #667eea;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 10;
}

.blog-card:hover .category {
    opacity: 1;
    transform: translateY(0);
}

/* Blog card content fade effect */
.blog-card-content {
    position: relative;
    z-index: 2;
}

.blog-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.8), transparent);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.blog-card:hover::after {
    opacity: 1;
}

/* Disclaimer Section */
.disclaimer-section {
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px 0;
    margin-top: 60px;
}

.disclaimer-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.disclaimer-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
}

.disclaimer-content p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.disclaimer-content p:last-child {
    margin-bottom: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Terms of Use Section */
.terms-section {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 60px 0;
    margin-top: 80px;
    position: relative;
    overflow: hidden;
}

.terms-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(102, 126, 234, 0.3) 50%, transparent 100%);
}

.terms-content {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.terms-content .section-header,
.privacy-content .section-header {
    text-align: center;
    margin-bottom: 40px;
    display: block;
}

.terms-content .section-header h3,
.privacy-content .section-header h3 {
    font-size: 2.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 18px;
    letter-spacing: -0.02em;
}

.section-divider {
    width: 100px;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 0 auto;
    border-radius: 2px;
    opacity: 0.9;
}

.terms-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
    text-align: center;
}

.terms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 32px;
    margin-top: 40px;
}

.terms-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 32px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(15px);
    position: relative;
    overflow: hidden;
}

.terms-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.terms-item:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.05) 100%);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(102, 126, 234, 0.3);
}

.terms-item:hover::before {
    transform: scaleX(1);
}

.terms-item h4 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 18px;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.terms-item p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    line-height: 1.7;
    margin: 0;
    font-weight: 400;
}

/* Responsive adjustments for terms grid */
@media (max-width: 768px) {
    .terms-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .terms-item {
        padding: 20px;
    }
    
    .terms-content .section-header h3,
    .privacy-content .section-header h3 {
        font-size: 1.8rem;
    }
    
    .section-divider {
        width: 60px;
        height: 2px;
    }
    
    .terms-content h3 {
        font-size: 1.2rem;
        margin-bottom: 25px;
    }
}

/* Privacy Policy Section */
.privacy-section {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.privacy-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(102, 126, 234, 0.3) 50%, transparent 100%);
}

.privacy-content {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Privacy content h3 styling removed - now using section-header */

.privacy-intro {
    text-align: center;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.1rem;
    margin-bottom: 50px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
    font-weight: 400;
}

.terms-intro {
    text-align: center;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.1rem;
    margin-bottom: 50px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
    font-weight: 400;
}

.privacy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 32px;
    margin-top: 40px;
}

.privacy-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 32px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(15px);
    position: relative;
    overflow: hidden;
}

.privacy-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.privacy-item:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.05) 100%);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(102, 126, 234, 0.3);
}

.privacy-item:hover::before {
    transform: scaleX(1);
}

.privacy-item h4 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 18px;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.privacy-item p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 16px;
    font-weight: 400;
}

.privacy-item p:last-child {
    margin-bottom: 0;
}

.privacy-item ul {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    line-height: 1.7;
    margin: 16px 0;
    padding-left: 24px;
}

.privacy-item li {
    margin-bottom: 8px;
    position: relative;
}

.privacy-item li::before {
    content: '•';
    color: #667eea;
    font-weight: bold;
    position: absolute;
    left: -16px;
}

.privacy-item strong {
    color: #ffffff;
    font-weight: 600;
}

/* Responsive adjustments for privacy grid */
@media (max-width: 768px) {
    .privacy-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .privacy-item {
        padding: 24px;
        border-radius: 16px;
    }
    
    .privacy-content h3 {
        font-size: 1.2rem;
        margin-bottom: 25px;
    }
    
    .privacy-intro,
    .terms-intro {
        font-size: 1rem;
        margin-bottom: 35px;
    }
    
    .terms-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .terms-item {
        padding: 24px;
        border-radius: 16px;
    }
}

/* Cookie Consent Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    display: none; /* Hide by default */
}

.cookie-banner.initialized {
    display: block; /* Show only when JavaScript initializes it */
}

.cookie-banner.show {
    transform: translateY(0);
}

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

.cookie-text h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
}

.cookie-text p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
    max-width: 600px;
}

.cookie-link {
    color: #667eea;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.cookie-link:hover {
    color: #5a67d8;
}

.cookie-buttons {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.accept-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.accept-btn:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-1px);
}

.reject-btn {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.reject-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
}

/* Responsive cookie banner */
@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .cookie-text p {
        max-width: none;
    }
    
    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .cookie-btn {
        flex: 1;
        max-width: 150px;
    }
}

/* Legal Content Pages (Privacy Policy, Terms of Use) */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.legal-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    text-align: center;
}

.last-updated {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-bottom: 40px;
    font-style: italic;
}

.legal-content section {
    margin-bottom: 40px;
}

.legal-content h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.3);
}

.legal-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    margin: 25px 0 15px 0;
}

.legal-content h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    margin: 20px 0 10px 0;
}

.legal-content p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    margin-bottom: 15px;
    font-size: 1rem;
}

.legal-content ul {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    margin: 15px 0;
    padding-left: 25px;
}

.legal-content li {
    margin-bottom: 8px;
}

.legal-content strong {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
}

.legal-content a {
    color: #667eea;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.legal-content a:hover {
    color: #5a67d8;
}

/* Responsive legal content */
@media (max-width: 768px) {
    .legal-content {
        padding: 30px 15px;
        margin: 20px;
    }
    
    .legal-content h1 {
        font-size: 2rem;
    }
    
    .legal-content h2 {
        font-size: 1.5rem;
    }
    
    .legal-content h3 {
        font-size: 1.3rem;
    }
    
    .legal-content h4 {
        font-size: 1.1rem;
    }
}

/* FAQ Section */
.faq-section {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    padding: 60px 40px;
    margin-top: 60px;
    position: relative;
    overflow: hidden;
}

.faq-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(102, 126, 234, 0.5) 50%, transparent 100%);
}

.content-wrapper {
    max-width: 1000px;
    margin: 0 auto;
}

.section-intro {
    text-align: center;
    margin-bottom: 40px;
}

.section-intro h2 {
    font-size: 2rem;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.section-intro p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Accordion */
.accordion {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.accordion-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    /* Performance optimizations */
    will-change: transform;
}

.accordion-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.accordion-header {
    width: 100%;
    background: none;
    border: none;
    padding: 24px 32px;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.accordion-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.accordion-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.accordion-icon {
    font-size: 1.5rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
    /* Performance optimizations */
    will-change: transform;
}

.accordion-item.active .accordion-icon {
    transform: rotate(45deg);
    color: #667eea;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    padding: 0 32px;
    /* Performance optimizations */
    will-change: max-height;
}

.accordion-item.active .accordion-content {
    max-height: 1000px;
    padding: 0 32px 24px 32px;
}

.accordion-content p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    margin-bottom: 16px;
}

.accordion-content h4 {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    margin: 24px 0 12px 0;
}

.accordion-content h4:first-child {
    margin-top: 0;
}

.accordion-item.active {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(102, 126, 234, 0.3);
}

/* Responsive Design - Optimized for mobile */
@media (max-width: 1200px) {
    .cards-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 24px;
    }
    
    .input-card {
        width: 100%;
        max-width: 600px;
    }
    
    .results-section {
        width: 100%;
        transform: none;
        opacity: 1;
    }
    
    .cards-wrapper.has-results .input-card {
        transform: none;
    }
    
    .breakdown-card {
        padding: 25px;
        height: 350px;
    }
    
    .content-section {
        padding-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 16px;
    }
    
    .calculator-card {
        padding: 24px;
    }
    
    .seo-header h1 {
        font-size: 2rem;
    }
    
    .seo-subtitle {
        font-size: 1rem;
    }
    
    .header h2 {
        font-size: 1.5rem;
    }
    
    .key-metrics-section {
        margin-bottom: 24px;
        padding: 0 16px;
    }
    
    .key-metrics {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 0;
        padding: 0;
    }
    
    .metric-card {
        padding: 16px;
    }
    
    .metric-value {
        font-size: 1.25rem;
    }
    
    .metric-label {
        font-size: 0.8rem;
    }
    
    .key-results-row {
        flex-direction: column;
        gap: 16px;
    }
    
    .content-section {
        padding-bottom: 18px;
    }
    
    .key-result {
        padding: 20px;
    }
    
    .key-value {
        font-size: 1.5rem;
    }
    
    .key-result.primary .key-value {
        font-size: 1.8rem;
    }
    
    /* breakdown-grid removed - now using breakdown-row */
    
    .blog-section {
        padding: 40px 20px;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .blog-card {
        border-radius: 16px;
    }
    
    .blog-card-link {
        padding: 24px;
    }
    
    .blog-card-content h3 {
        font-size: 1.2rem;
        padding-right: 0;
    }
    
    .blog-card .category {
        top: 16px;
        right: 16px;
        font-size: 0.7rem;
        padding: 3px 10px;
    }
    
    .faq-section {
        padding: 40px 20px;
    }
    
    .section-intro h2 {
        font-size: 1.5rem;
    }
    
    .section-intro p {
        font-size: 1rem;
    }
    
    .accordion {
        gap: 16px;
    }
    
    .accordion-header {
        padding: 20px 24px;
    }
    
    .accordion-header h3 {
        font-size: 1rem;
    }
    
    .accordion-content {
        padding: 0 24px;
    }
    
    .accordion-item.active .accordion-content {
        padding: 0 24px 20px 24px;
    }
}

@media (max-width: 480px) {
    .calculator-card {
        padding: 20px;
    }
    
    .key-result {
        padding: 16px;
    }
    
    .key-value {
        font-size: 1.3rem;
    }
    
    .key-result.primary .key-value {
        font-size: 1.5rem;
    }
    
    .breakdown-card {
        padding: 20px;
        height: 300px;
    }
    
    .data-grid {
        gap: 10px;
        margin-top: 12px;
    }
    
    .data-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .data-value {
        align-self: flex-end;
    }
    
    /* Touch-friendly improvements for mobile */
    .calculate-button {
        min-height: 44px; /* Minimum touch target size */
    }
    
    .accordion-header {
        min-height: 44px; /* Minimum touch target size */
    }
    
    .input-wrapper input,
    .region-select {
        min-height: 44px; /* Minimum touch target size */
    }
}

/* Print styles for better accessibility */
/* Blog styles */
.blog-post {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.blog-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.blog-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    line-height: 1.2;
}

.blog-meta {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.blog-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.blog-content h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 40px 0 20px 0;
    color: #ffffff;
    border-left: 4px solid #667eea;
    padding-left: 16px;
}

.blog-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 30px 0 15px 0;
    color: #ffffff;
}

.blog-content h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 25px 0 12px 0;
    color: #ffffff;
}

.blog-content p {
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.9);
}

.blog-content .lead {
    font-size: 1.2rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 30px;
}

.blog-content ul, .blog-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.blog-content li {
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.9);
}

.blog-content strong {
    color: #ffffff;
    font-weight: 600;
}

.blog-content a {
    color: #667eea;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.blog-content a:hover {
    border-bottom-color: #667eea;
}

.calculation-box {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 25px;
    margin: 25px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.calculation-box h3, .calculation-box h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #667eea;
}

.calculation-box ul {
    margin: 15px 0;
    padding-left: 20px;
}

.calculation-box li {
    margin-bottom: 6px;
    font-size: 1rem;
}

.cta-box {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    border: 2px solid rgba(102, 126, 234, 0.4);
    border-radius: 16px;
    padding: 32px;
    margin: 40px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.cta-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.cta-box h3 {
    color: #ffffff;
    margin-bottom: 16px;
    font-size: 1.4rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.cta-box p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.cta-button {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid #667eea;
    transition: all 0.3s ease;
    padding-bottom: 2px;
}

.cta-button:hover {
    color: #ffffff;
    border-bottom-color: #ffffff;
    background: rgba(102, 126, 234, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
    margin: 0 -8px;
}

.table-container {
    overflow-x: auto;
    margin: 25px 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tax-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.tax-table th {
    background: rgba(102, 126, 234, 0.2);
    color: #ffffff;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tax-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.9);
}

.tax-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.blog-footer {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 25px;
    margin-top: 40px;
    text-align: center;
}

.blog-footer p {
    margin: 0;
    font-size: 1.1rem;
}

/* Navigation styles */
.nav {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    text-decoration: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 8px 16px;
    border-radius: 8px;
}

.nav-links a:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.nav-links a.active {
    color: #667eea;
    background: rgba(102, 126, 234, 0.2);
}

@media print {
    .calculator-card {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
    
    .faq-section {
        background: white !important;
        color: black !important;
    }
    
    .accordion-content {
        max-height: none !important;
        display: block !important;
    }
}

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

/* Tabbed Results Interface */
.results-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    margin: 0;
    padding: 4px;
    gap: 4px;
}

.tab-button {
    flex: 1;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 16px 24px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    border-radius: 8px;
}

.tab-button:hover {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.9);
}

.tab-button.active {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tab-icon {
    font-size: 1.1rem;
}

.tab-content {
    display: none;
    background: transparent;
    backdrop-filter: none;
    border: none;
    border-radius: 0;
    overflow: visible;
}

.tab-content.active {
    display: block;
}

.results-table {
    padding: 0;
    max-height: 500px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.results-table::-webkit-scrollbar {
    width: 8px;
}

.results-table::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.results-table::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    transition: background 0.2s ease;
}

.results-table::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.table-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 32px 40px 24px 40px;
    border-radius: 16px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
}

.table-header h3 {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.table-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: none;
    border-radius: 0 0 12px 12px;
    margin-bottom: 24px;
    backdrop-filter: blur(20px);
}

.table-section:last-child {
    border-bottom: none;
}

.section-title {
    background: rgba(255, 255, 255, 0.05);
    padding: 24px 32px 16px 32px;
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    border-radius: 12px 12px 0 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    margin-top: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: none;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.table-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 32px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.table-row:last-child {
    border-bottom: none;
}

.table-row:hover {
    background: rgba(255, 255, 255, 0.03);
    transform: translateX(2px);
}

.table-row.highlight {
    background: rgba(102, 126, 234, 0.04);
    border-left: 3px solid #667eea;
    margin-left: -3px;
    padding-left: 37px;
}

.table-row.total {
    background: rgba(118, 75, 162, 0.06);
    border-left: 3px solid #764ba2;
    margin-left: -3px;
    padding-left: 37px;
    font-weight: 600;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 8px;
    margin-bottom: 8px;
}

.table-row.highlight.total {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.06) 0%, rgba(118, 75, 162, 0.06) 100%);
    border-left: 3px solid #667eea;
    margin-left: -3px;
    padding-left: 37px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 8px;
    margin-bottom: 8px;
}

.row-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    font-weight: 500;
    flex: 1;
    padding-right: 24px;
}

.row-value {
    color: #ffffff;
    font-weight: 600;
    font-size: 1.1rem;
    text-align: right;
    min-width: 120px;
    background: rgba(255, 255, 255, 0.06);
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.table-row.total .row-value {
    color: #764ba2;
    font-size: 1.1rem;
}

.table-row.highlight .row-value {
    color: #667eea;
}

.table-row.highlight.total .row-value {
    color: #667eea;
    font-size: 1.2rem;
}

.table-section.summary {
    background: rgba(255, 255, 255, 0.02);
    border-top: 2px solid rgba(255, 255, 255, 0.1);
}

/* Mobile responsive for tabs */
@media (max-width: 768px) {
    .results-tabs {
        flex-direction: column;
        border-radius: 12px 12px 0 0;
    }
    
    .tab-button {
        padding: 14px 20px;
        font-size: 0.95rem;
    }
    
    .tab-content {
        border-radius: 0 0 12px 12px;
    }
    
    .results-table {
        max-height: none;
    }
    
    .table-header {
        padding: 16px 20px;
    }
    
    .table-header h3 {
        font-size: 1.2rem;
    }
    
    .section-title {
        padding: 14px 20px;
        font-size: 1rem;
    }
    
    .table-row {
        padding: 18px 24px;
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
    
    .row-label {
        font-size: 0.9rem;
        padding-right: 0;
    }
    
    .row-value {
        text-align: left;
        font-size: 1.1rem;
        min-width: 120px;
        padding: 8px 12px;
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .tab-button {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
    
    .table-header {
        padding: 14px 16px;
    }
    
    .section-title {
        padding: 12px 16px;
    }
    
    .table-row {
        padding: 8px 16px;
    }
}

/* Error Message Styling */
.error-message {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
    animation: slideInRight 0.3s ease-out;
}

.error-content {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(255, 107, 107, 0.3);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.error-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.error-text {
    flex: 1;
    font-weight: 500;
}

.error-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.error-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Mobile responsive error messages */
@media (max-width: 768px) {
    .error-message {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .error-content {
        padding: 14px 16px;
        font-size: 0.85rem;
    }
}

/* Back Button Styling */
.back-button-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 20px 0;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
    left: 1rem;
}

.back-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.back-button:hover::before {
    left: 100%;
}

.back-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.back-button:active {
    transform: translateY(0);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.back-icon {
    font-size: 1.2rem;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.back-button:hover .back-icon {
    transform: translateX(-3px);
}

.back-text {
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Mobile responsive back button */
@media (max-width: 768px) {
    .back-button-container {
        padding: 16px 0;
    }
    
    .back-button {
        padding: 12px 20px;
        font-size: 0.9rem;
        gap: 10px;
    }
    
    .back-icon {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .back-button {
        padding: 10px 16px;
        font-size: 0.85rem;
        gap: 8px;
    }
    
    .back-text {
        font-size: 0.85rem;
    }
}

/* Disclaimer Popup Styling */
.disclaimer-popup {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 10001;
    opacity: 0;
    transform: translateX(-100%) scale(0.9);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 400px;
    display: none; /* Hide by default */
}

.disclaimer-popup.initialized {
    display: block; /* Show only when JavaScript initializes it */
}

.disclaimer-popup.show {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.disclaimer-popup.hide {
    opacity: 0;
    transform: translateX(-100%) scale(0.9);
}

.popup-content {
    background: rgba(255, 107, 107, 0.9);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.popup-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.6s ease;
}

.popup-content:hover::before {
    left: 100%;
}

.popup-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.popup-text {
    flex: 1;
    line-height: 1.3;
}

.dismiss-button {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(5px);
    flex-shrink: 0;
}

.dismiss-button:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.dismiss-button:active {
    transform: translateY(0);
}

/* Mobile responsive disclaimer popup */
@media (max-width: 768px) {
    .disclaimer-popup {
        top: 15px;
        left: 15px;
        right: 15px;
        max-width: none;
    }
    
    .popup-content {
        padding: 10px 14px;
        font-size: 0.8rem;
        gap: 10px;
    }
    
    .popup-icon {
        font-size: 0.9rem;
    }
    
    .dismiss-button {
        padding: 5px 10px;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .disclaimer-popup {
        top: 10px;
        left: 10px;
        right: 10px;
    }
    
    .popup-content {
        padding: 8px 12px;
        font-size: 0.75rem;
        gap: 8px;
    }
    
    .popup-icon {
        font-size: 0.85rem;
    }
    
    .dismiss-button {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
} 