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

:root {
    --primary-color: #2563eb;
    --secondary-color: #4b5563;
    --accent-color: #3b82f6;
    --background-color: #f9fafb;
    --text-color: #1f2937;
    --light-text: #6b7280;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* 过渡动画 */
    --transition-bg: background-color 0.3s ease;
    --transition-color: color 0.3s ease;
    --transition-border: border-color 0.3s ease;
}

/* 深色模式 */
[data-theme="dark"] {
    --primary-color: #60a5fa;
    --secondary-color: #9ca3af;
    --accent-color: #93c5fd;
    --background-color: #111827;
    --text-color: #f3f4f6;
    --light-text: #d1d5db;
    --border-color: #374151;
    --success-color: #34d399;
    --warning-color: #fbbf24;
    --danger-color: #f87171;
    --white: #1f2937;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    transition: var(--transition-bg), var(--transition-color);
}

/* 为关键元素添加过渡动画 */
.container,
header,
nav,
footer,
.card,
.feature-item,
.step,
.form-group,
.btn,
.theme-toggle {
    transition: var(--transition-bg), var(--transition-color), var(--transition-border);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    line-height: 1.2;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--text-color);
    line-height: 1.3;
    margin-top: 2rem;
}

h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-color);
    line-height: 1.3;
    margin-top: 1.5rem;
}

h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-color);
    line-height: 1.4;
}

h5, h6 {
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    color: var(--text-color);
}

p {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
    color: var(--light-text);
    letter-spacing: 0.01em;
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    display: inline-block;
}

a:hover {
    color: var(--secondary-color);
    background-color: rgba(59, 130, 246, 0.08);
    text-decoration: none;
}

a:active {
    transform: scale(0.98);
}

/* Header Styles */
header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    gap: 1rem;
}

header nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    min-width: 36px;
    min-height: 36px;
}

.theme-toggle:hover {
    background-color: var(--background-color);
    transform: scale(1.05);
}

.theme-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.theme-icon {
    transition: opacity 0.3s ease;
}

.site-title {
    text-decoration: none;
    color: inherit;
    display: inline-block;
    transition: opacity 0.3s ease;
}

.site-title:hover {
    opacity: 0.8;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 2rem;
}

nav ul li a {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

nav ul li a:hover, nav ul li a.active {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease;
    background-color: var(--secondary-color);
}

/* Hero Section */
.hero {
    background-image: url('../images/20250826900516.jpg');
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
    max-width: 100%;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--white);
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    color: rgba(255, 255, 255, 0.95);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 500;
}

.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    max-width: 600px;
    margin: 0 auto;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 0.75rem;
    font-weight: 700;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    font-size: 1.125rem;
    letter-spacing: 0.5px;
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 250px;
    box-sizing: border-box;
    touch-action: manipulation;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    background-color: #1d4ed8;
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Calculators Preview */
.calculators-preview {
    padding: 3rem 1rem;
    background-color: var(--background-color);
}

.calculators-preview h2 {
    text-align: center;
    margin-bottom: 2.5rem;
    font-size: 2rem;
    color: var(--primary-color);
}

.calculator-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.card {
    background-color: var(--white);
    border-radius: 1rem;
    padding: 1.75rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
    min-height: 380px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid var(--border-color);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.card img {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
    transition: transform 0.3s ease;
}

.card:hover img {
    transform: scale(1.1);
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.9));
}

.card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.5px;
}

.card p {
    margin-bottom: 2rem;
    min-height: 60px;
    font-size: 1rem;
    line-height: 1.6;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    flex-grow: 1;
}

.card .btn {
    display: inline-block;
    padding: 0.85rem 1.75rem;
    margin: 0px auto;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    touch-action: manipulation;
}

.card .btn:hover {
    background-color: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

/* Features Section */
.features {
    padding: 3rem 1rem;
    background-color: var(--white);
    text-align: center;
}

.features h2 {
    text-align: center;
    margin-bottom: 2.5rem;
    font-size: 2rem;
    color: var(--primary-color);
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.feature-item {
    text-align: center;
    padding: 1.5rem;
    background-color: var(--background-color);
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.feature-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.card {
    background-color: var(--white);
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
    /* 移除卡片本身的背景，因为我们现在在伪元素中设置背景 */
    background: none;
}

.card:nth-child(1)::before {
    background-image: url('../images/FanDai.jpg');
}

.card:nth-child(2)::before {
    background-image: url('../images/usedcar.jpg');
}

.card:nth-child(3)::before {
    background-image: url('../images/GeRen.jpg');
}

/* Add overlay with dark semi-transparent background and blur effect */.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(2px);
    z-index: -2;
    transition: all 0.3s ease;
}

/* 添加额外的黑色半透明遮罩层 */.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: -1;
    transition: background-color 0.3s ease;
}

.card:hover::before {
    transform: scale(1.05);
    filter: blur(3px);
}

.card:hover::after {
    background-color: rgba(0, 0, 0, 0.4);
}

/* Ensure card content is in front of background */.card img,
.card h3,
.card p,
.card .btn {
    position: relative;
    z-index: 10;
    color: white;
}

.feature-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}



/* How It Works Section */
.how-it-works {
    padding: 3rem 1rem;
    background-color: var(--background-color);
    text-align: center;
}

.how-it-works h2 {
    text-align: center;
    margin-bottom: 2.5rem;
    font-size: 2rem;
    color: var(--primary-color);
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.step {
    text-align: center;
    position: relative;
    background-color: var(--white);
    padding: 2rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

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

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Calculator Form Styles */
.calculator-section {
    padding: 2rem 1em;
}

.calculator-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background-color: var(--white);
    border-radius: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    max-width: 1200px;
    margin: 0 auto;
    border: 1px solid var(--border-color);
}

@media (max-width: 768px) {
    .calculator-container {
        grid-template-columns: 1fr;
        box-shadow: 0 5px 15px -3px rgba(0, 0, 0, 0.05);
    }
}

.calculator-form {
    padding: 2.5rem;
    background-color: #ffffff;
}

.calculator-form h2 {
    margin-top: 0;
    margin-bottom: 2rem;
    font-size: 1.75rem;
    color: var(--secondary-color);
    font-weight: 700;
}

.calculator-results {
    padding: 2.5rem;
    background-color: #f8fafc;
    border-left: 1px solid var(--border-color);
    position: relative;
}

.calculator-results::before {
    content: 'Calculation result';
    position: absolute;
    top: 17px;
    left: 2rem;
    background-color: var(--primary-color);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

@media (max-width: 768px) {
    .calculator-results {
        border-left: none;
        border-top: 1px solid var(--border-color);
    }
    
    .calculator-results::before {
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
    }
}

.form-group {
    margin-bottom: 1.75rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    background-color: #ffffff;
    box-sizing: border-box;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    min-height: 50px;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background-color: #ffffff;
}

.form-group input:active, .form-group select:active {
    transform: scale(0.99);
}

/* 防止iOS自动缩放 */
@media screen and (max-width: 768px) {
    select:focus,
    textarea:focus,
    input:focus {
        font-size: 16px;
    }
}

.form-group input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.form-group input:hover, .form-group select:hover {
    border-color: #cbd5e1;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.calculate-btn {
    width: 100%;
    padding: 1rem 1.5rem;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.calculate-btn:hover {
    background-color: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.calculate-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.25);
}

.result-item {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #ffffff;
    border-radius: 0.5rem;
    border-left: 4px solid var(--primary-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.result-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

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

.result-label {
    font-size: 0.875rem;
    color: var(--light-text);
    margin-bottom: 0.25rem;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

/* Highlight important results */
.result-item.highlight {
    background-color: rgba(59, 130, 246, 0.05);
    border-left-color: #1d4ed8;
}

.result-item.highlight .result-value {
    color: #1d4ed8;
    font-size: 2rem;
}

/* Guide Section */
.guide-section {
    padding: 4rem 0;
    background-color: var(--background-color);
}

.guide-section h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.guide-content {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
}

.guide-content h3 {
    color: var(--primary-color);
    margin-top: 2rem;
}

.guide-content ol, .guide-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.guide-content li {
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

/* Footer Styles */
footer {
    background-color: var(--text-color);
    color: var(--white);
    padding: 3rem 0;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-column h3 {
    color: var(--white);
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.75rem;
}

.footer-column ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column ul li a:hover {
    color: var(--white);
}

.copyright {
    text-align: center;
    padding: 1rem 0px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

/* About, Contact, Privacy, Terms Pages */
.content-page {
    padding: 2rem 0;
}

.content-container {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
}

.content-container h2 {
    margin-top: 0;
    color: var(--primary-color);
}

.content-container h3 {
    margin-top: 2rem;
    color: var(--secondary-color);
}

.footer-content{
    display: flex;
    align-items: center;
    justify-content: space-around;
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 1.8rem;
        margin-bottom: 1.25rem;
    }
    
    h2 {
        font-size: 1.5rem;
        margin-bottom: 1.25rem;
        margin-top: 1.75rem;
    }
    
    h3 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
        margin-top: 1.5rem;
    }
    
    h4 {
        font-size: 1.1rem;
    }
    
    p {
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 1.25rem;
    }
    
    .nav-links {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s ease-in-out;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        z-index: 999;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    nav ul li {
        margin: 1.5rem 0;
    }
    
    .hamburger {
        display: block;
        position: relative;
        z-index: 1000;
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .hero {
        padding: 3rem 0;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
        padding: 1rem 1.5rem;
    }
    
    .calculator-cards, .feature-list, .steps {
        gap: 1rem;
    }
    
    .card, .feature-item, .step {
        padding: 1.25rem;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (max-width: 768px) {
    /* Additional calculator optimizations for tablets */
    .calculator-form h2 {
        font-size: 1.5rem;
        text-align: center;
    }
    
    .result-item {
        margin-bottom: 1.25rem;
        padding: 0.875rem;
    }
    
    .result-value {
        font-size: 1.5rem;
    }
    
    .result-item.highlight .result-value {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .calculator-form, .calculator-results, .guide-content, .content-container {
        padding: 1.25rem;
    }
    
    .hero h2 {
        font-size: 1.75rem;
    }
    
    /* Calculator mobile optimizations */
    .calculator-form h2 {
        font-size: 1.35rem;
        text-align: center;
        margin-bottom: 1.5rem;
    }
    
    .form-group {
        margin-bottom: 1.25rem;
    }
    
    .form-group label {
        font-size: 0.8125rem;
        letter-spacing: 0.04em;
    }
    
    .result-item {
        padding: 0.75rem;
        margin-bottom: 1rem;
        border-left-width: 3px;
    }
    
    .result-item:hover {
        transform: translateX(3px);
    }
    
    .result-label {
        font-size: 0.75rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .result-value {
        font-size: 1.35rem;
    }
    
    .result-item.highlight .result-value {
        font-size: 1.5rem;
    }
    

    
    /* Optimize touch targets for mobile */
    .form-group input, .form-group select, .btn, .calculate-btn {
        font-size: 1.1rem;
        padding: 1rem;
        border-radius: 0.5rem;
        touch-action: manipulation;
        min-height: 50px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .calculate-btn {
        font-size: 1rem;
        letter-spacing: 0.03em;
    }
    
    /* Improve mobile input focus styles */
    .form-group input:focus, .form-group select:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
        transform: none; /* Remove transform on focus for mobile */
    }
    
    /* Enhance text legibility on mobile */
    body {
        font-size: 16px; /* Prevent iOS text size adjustments */
        -webkit-text-size-adjust: 100%;
        line-height: 1.6;
    }
    
    /* Optimize tap targets - ensure they are at least 48px for better mobile usability */
    nav ul li a, .footer-column ul li a, .btn, .calculate-btn {
        display: inline-block;
        min-height: 48px;
        line-height: 48px;
        padding: 0 1rem;
    }
    
    /* Ensure calculator results are easy to read on mobile */
    .calculator-results {
        font-size: 0.9rem;
    }
    
    /* Fix for iOS Safari */
    input[type="number"] {
        -webkit-appearance: none;
        -moz-appearance: textfield;
        appearance: textfield;
    }
    
    input[type="number"]::-webkit-inner-spin-button,
    input[type="number"]::-webkit-outer-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }
    
    /* Add safe area padding for iPhone X and newer */
    .container {
        padding-left: env(safe-area-inset-left, 15px);
        padding-right: env(safe-area-inset-right, 15px);
    }
    
    footer {
        padding-bottom: env(safe-area-inset-bottom, 2rem);
    }
}