@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Modern Color Palette */
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --primary-lighter: #dbeafe;
    --secondary-color: #8b5cf6;
    --accent-color: #10b981;
    --accent-light: #d1fae5;
    
    /* Text Colors */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    
    /* Background Colors */
    --bg-white: #ffffff;
    --bg-gray-50: #f8fafc;
    --bg-gray-100: #f1f5f9;
    --bg-gray-200: #e2e8f0;
    
    /* Border & Divider */
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    
    /* Shadows - Modern & Subtle */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.06), 0 1px 2px 0 rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.12);
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.18);
}

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

body {
    margin: 0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
    background-attachment: fixed;
    min-height: 100vh;
    line-height: 1.6;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Header - Modern Glassmorphism */
header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-light);
    padding: 1.5rem 0;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

header:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
}

.container {
    width: min(1280px, 100%);
    max-width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    box-sizing: border-box;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.logo {
    height: auto;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.company-logo {
    max-height: 80px;
    max-width: 200px;
}

.app-logo {
    max-height: 80px;
    max-width: 200px;
}

.logo-divider {
    width: 1px;
    height: 60px;
    background-color: var(--border-color);
    margin: 0 1.5rem;
    opacity: 0.5;
}

.logo:hover {
    transform: scale(1.05);
}

.header-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    text-align: center;
}

.header-text h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.75px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-text p {
    margin: 0;
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: none;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 101;
}

.mobile-menu-toggle:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
}

.mobile-menu-toggle .burger-icon {
    width: 24px;
    height: 24px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Fallback burger icon (3 lines) - always visible as backup */
.mobile-menu-toggle .burger-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 -7px 0 currentColor, 0 7px 0 currentColor;
}

/* Show Lucide icon when loaded - it will overlay the fallback */
.mobile-menu-toggle .burger-icon svg {
    position: relative;
    z-index: 2;
    width: 24px;
    height: 24px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* When SVG is loaded and visible, hide fallback */
.mobile-menu-toggle .burger-icon.has-icon::before {
    display: none;
}

.mobile-menu-toggle .burger-icon.has-icon svg {
    opacity: 1;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-menu-overlay.active .mobile-menu-content {
    transform: translateY(0);
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-light);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.mobile-menu-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.mobile-menu-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    background: var(--bg-gray-100);
    color: var(--text-primary);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-menu-close:hover {
    background: var(--primary-color);
    color: white;
    transform: rotate(90deg);
}

.mobile-menu-close span {
    width: 24px;
    height: 24px;
}

.mobile-menu-nav {
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
    gap: 0.5rem;
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 2rem;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border-left: 4px solid transparent;
}

.mobile-menu-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-item:hover::before,
.mobile-menu-item.active::before {
    opacity: 1;
}

.mobile-menu-item:hover {
    background: rgba(59, 130, 246, 0.08);
    transform: translateX(8px);
}

.mobile-menu-item.active {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.12) 0%, rgba(139, 92, 246, 0.08) 100%);
    color: var(--primary-color);
}

.mobile-menu-icon {
    width: 24px;
    height: 24px;
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: color 0.3s ease, transform 0.3s ease;
}

.mobile-menu-item:hover .mobile-menu-icon,
.mobile-menu-item.active .mobile-menu-icon {
    color: var(--primary-color);
    transform: scale(1.1);
}

.mobile-menu-label {
    flex: 1;
    font-weight: 600;
}

.mobile-menu-arrow {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    transition: transform 0.3s ease, color 0.3s ease;
}

.mobile-menu-item:hover .mobile-menu-arrow,
.mobile-menu-item.active .mobile-menu-arrow {
    color: var(--primary-color);
    transform: translateX(4px);
}

/* Tabs - Modern Pill Design */
.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 2.5rem 0 2rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-light) transparent;
}

.tabs::-webkit-scrollbar {
    height: 6px;
}

.tabs::-webkit-scrollbar-track {
    background: transparent;
}

.tabs::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 3px;
}

.tabs button {
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
    min-width: fit-content;
    position: relative;
    overflow: hidden;
}

.tabs button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-lighter) 0%, rgba(219, 234, 254, 0.5) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 12px;
}

.tabs button:hover::before {
    opacity: 1;
}

.tabs button:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.tabs button .tab-icon {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.tabs button:hover .tab-icon {
    transform: scale(1.1);
}

.tabs button span:not(.tab-icon) {
    position: relative;
    z-index: 1;
}

.tabs button.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #fff;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.tabs button.active::before {
    opacity: 0;
}

.tabs button.active .tab-icon {
    filter: brightness(0) invert(1);
    transform: scale(1.1);
}

.tab-icon {
    width: 18px;
    height: 18px;
    transition: all 0.3s ease;
}

.short-label {
    display: none;
}

/* Tab Content - Modern Card Design */
.tab-content {
    display: none;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 28px;
    padding: 3rem;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-light);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.tab-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tab-content.active::before {
    opacity: 1;
}

.tab-content.active {
    display: block;
    animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Section Title */
.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 2rem 0;
    padding-bottom: 1rem;
    border-bottom: 3px solid transparent;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 2px;
}

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

/* Forms - Modern & Clean */
form {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.9) 100%);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid var(--border-light);
    margin-bottom: 2rem;
    width: 100%;
    box-sizing: border-box;
    box-shadow: var(--shadow-md);
    transition: box-shadow 0.3s ease;
}

form:hover {
    box-shadow: var(--shadow-lg);
}

form .grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    width: 100%;
    box-sizing: border-box;
}

label {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    font-size: 0.875rem;
    position: relative;
    padding-left: 0.75rem;
    transition: color 0.2s ease;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    font-weight: 600;
    color: var(--text-primary);
}

label:has(input:focus),
label:has(select:focus) {
    color: var(--primary-color);
}

input,
select {
    border-radius: 12px;
    border: 2px solid var(--border-color);
    padding: 1rem 1.25rem;
    font-size: 0.9375rem;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-white);
    color: var(--text-primary);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    font-weight: 500;
}

input:focus,
select:focus {
    outline: none;
    background-color: var(--bg-gray-50);
    box-shadow: var(--shadow-md);
}

input:hover:not(:focus),
select:hover:not(:focus) {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-sm);
}

input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
    font-weight: 400;
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%23475569' d='M7 10L2 5h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 3rem;
    cursor: pointer;
}

select:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%233b82f6' d='M7 10L2 5h10z'/%3E%3C/svg%3E");
}

/* Buttons - Modern Gradient */
button[type="submit"] {
    border: none;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

button[type="submit"]::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;
}

button[type="submit"]:hover::before {
    left: 100%;
}

button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
}

button[type="submit"]:active {
    transform: translateY(0);
    box-shadow: var(--shadow-md);
}

/* PDF İndir Butonu */
.export-pdf-btn {
    margin-top: 1rem;
    border: 2px solid var(--primary-color);
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    padding: 0.75rem 1.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.25s ease;
}

.export-pdf-btn::before {
    content: '💾';
    font-size: 1rem;
}

.export-pdf-btn:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #fff;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.export-pdf-btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

/* Results */
.result {
    margin-top: 2rem;
    animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.flange-results {
    margin-top: 2rem;
}

.overflow {
    overflow-x: auto;
    margin-top: 1.5rem;
}

/* Cards - Modern Glassmorphism */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Responsive Card Grid Overrides - Force single column on mobile */
@media (max-width: 768px) {
    .card-grid[style*="grid-template-columns: repeat(2"] {
        grid-template-columns: 1fr !important;
    }
    
    .card-grid[style*="grid-template-columns: repeat(3"] {
        grid-template-columns: 1fr !important;
    }
    
    .card-grid[style*="grid-template-columns: repeat(4"] {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 640px) {
    .card-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    /* Override all inline grid styles on mobile - Force single column */
    [style*="grid-template-columns: repeat(2"] {
        grid-template-columns: 1fr !important;
    }
    
    [style*="grid-template-columns: repeat(3"] {
        grid-template-columns: 1fr !important;
    }
    
    [style*="grid-template-columns: repeat(4"] {
        grid-template-columns: 1fr !important;
    }
    
    /* Ensure all result content is properly stacked */
    .result .card-grid,
    .result [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
    
    .result > div {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Force single column for valve pressure info */
    .valve-pressure-info {
        grid-template-columns: 1fr !important;
    }
}

.card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.card:hover {
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
    transform: translateY(-4px);
}

.card h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9375rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
    transition: background-color 0.2s ease;
    border-radius: 6px;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.stat:hover {
    background-color: var(--bg-gray-50);
}

.stat:last-child {
    border-bottom: none;
}

.stat span:first-child {
    color: var(--text-secondary);
    font-weight: 500;
}

.stat span:last-child {
    color: var(--text-primary);
    font-weight: 700;
}

.highlight-value {
    font-size: 2.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    letter-spacing: -1px;
    margin: 1rem 0;
}

/* Badges & Pills */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary-lighter) 0%, rgba(219, 234, 254, 0.5) 100%);
    color: var(--primary-dark);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.pill {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-lighter) 0%, rgba(219, 234, 254, 0.5) 100%);
    color: var(--primary-dark);
    font-size: 0.8125rem;
    font-weight: 600;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(59, 130, 246, 0.2);
    transition: all 0.2s ease;
}

.pill:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.list {
    margin: 0;
    padding-left: 1.5rem;
    font-size: 0.9375rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* Tables - Modern Design */
.table-wrapper {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 1.5rem;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
    overflow-x: auto;
    margin-top: 1.5rem;
}

.table-simple {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    overflow: hidden;
}

.table-simple th,
.table-simple td {
    border: 1px solid var(--border-light);
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
    text-align: left;
    transition: background-color 0.2s ease;
}

.table-simple thead {
    background: linear-gradient(135deg, var(--bg-gray-100) 0%, var(--bg-gray-50) 100%);
}

.table-simple thead th {
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--border-color);
}

.table-simple tbody tr {
    transition: all 0.2s ease;
}

.table-simple tbody tr:nth-child(odd) {
    background: var(--bg-gray-50);
}

.table-simple tbody tr:hover {
    background-color: var(--primary-lighter);
    transform: scale(1.01);
}

.table-simple tbody td {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Formula Display */
.formula {
    font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
    font-size: 1.375rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    text-align: center;
    padding: 1.5rem;
    background-color: var(--bg-gray-50);
    border-radius: 16px;
    border: 1px solid var(--border-light);
    letter-spacing: 1px;
    box-shadow: var(--shadow-sm);
}

.formula-steps {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.8;
    padding: 1rem;
    background: var(--bg-gray-50);
    border-radius: 12px;
    margin-top: 0.75rem;
    border: 1px solid var(--border-light);
}

.formula-steps div {
    padding: 0.375rem 0;
    font-family: 'JetBrains Mono', Consolas, monospace;
    color: var(--text-primary);
}

.table-note {
    margin-top: 0.75rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Info Banner */
.info-banner {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.8) 0%, rgba(219, 234, 254, 0.6) 100%);
    backdrop-filter: blur(10px);
    border-left: 4px solid var(--primary-color);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.info-banner:hover {
    box-shadow: var(--shadow-lg);
    transform: translateX(4px);
}

.info-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.5rem;
    box-shadow: var(--shadow-md);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.info-title {
    margin: 0;
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.125rem;
}

.info-text {
    margin: 0.5rem 0 0;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* Diagram Panel */
.diagram-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.diagram-image {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.diagram-image:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.diagram-image img {
    max-width: 100%;
    border-radius: 12px;
}

.legend-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid var(--border-light);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.legend-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.legend-card h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 700;
}

.legend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.legend-grid div {
    padding: 0.75rem;
    background: var(--bg-gray-50);
    border-radius: 10px;
    border: 1px solid var(--border-light);
    transition: all 0.2s ease;
}

.legend-grid div:hover {
    background: var(--primary-lighter);
    border-color: var(--primary-light);
}

.legend-grid strong {
    color: var(--primary-color);
    font-weight: 700;
    margin-right: 0.5rem;
}

/* Search Card */
.search-card {
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
}

.search-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

.search-card h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 1rem;
    letter-spacing: -0.5px;
}

.search-card h3::before {
    content: '🔍';
    font-size: 1.75rem;
}

.flange-actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.flange-actions button {
    flex: 1;
    min-width: 140px;
}

.flange-actions .outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: none;
}

.flange-actions .outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.flange-error {
    margin-top: 1.5rem;
    padding: 1.25rem 1.5rem;
    border-left: 4px solid #ef4444;
    background: linear-gradient(135deg, rgba(254, 226, 226, 0.8) 0%, rgba(254, 242, 242, 0.6) 100%);
    backdrop-filter: blur(10px);
    color: #991b1b;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.hidden {
    display: none !important;
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-light);
}

.results-header h4 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.75px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Valve Diagram Styles */
.diagram-valve {
    background: linear-gradient(135deg, rgba(219, 234, 254, 0.6) 0%, rgba(224, 242, 254, 0.4) 100%);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
}

.valve-diagram-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.valve-diagram-container > div:first-child {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.valve-pipe-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.valve-pipe-inlet,
.valve-pipe-outlet {
    width: 5rem;
    height: 2.5rem;
    background: linear-gradient(to right, #ef4444, #f87171);
    border-radius: 0.75rem 0 0 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8125rem;
    font-weight: 700;
    box-shadow: var(--shadow-md);
}

.valve-pipe-outlet {
    background: linear-gradient(to right, #3b82f6, #60a5fa);
    border-radius: 0 0.75rem 0.75rem 0;
}

.valve-pipe-label {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.valve-pipe-badge {
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 0.25rem;
}

.valve-pipe-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.375rem;
}

.valve-arrow {
    font-size: 2rem;
    color: var(--primary-color);
}

.valve-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.valve-body {
    width: 6rem;
    height: 5rem;
    background: linear-gradient(to bottom, #fb923c, #f97316);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.valve-wheel-small {
    position: absolute;
    top: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    width: 2rem;
    height: 2rem;
    background: #374151;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    box-shadow: var(--shadow-md);
}

.valve-size {
    font-size: 0.875rem;
}

.valve-cv {
    font-size: 0.75rem;
    font-weight: 700;
    color: #f97316;
}

.valve-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.valve-pressure-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    text-align: center;
}

.valve-pressure-card {
    padding: 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.valve-pressure-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.valve-pressure-label {
    font-size: 0.9375rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.valve-pressure-value {
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--primary-color);
}

.valve-type-badge {
    text-align: center;
    margin-top: 1.5rem;
}

.valve-badge-text {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 700;
    background: linear-gradient(135deg, rgba(243, 232, 255, 0.8) 0%, rgba(252, 231, 243, 0.6) 100%);
    backdrop-filter: blur(10px);
    color: var(--secondary-color);
    border: 1px solid rgba(139, 92, 246, 0.2);
    box-shadow: var(--shadow-md);
}

/* Diagram Styles */
.diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(238, 242, 255, 0.8) 0%, rgba(224, 242, 254, 0.6) 100%);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
}

.pipe {
    width: 100px;
    height: 80px;
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    color: #fff;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
}

.pipe:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-xl);
}

.pipe .label {
    font-weight: 700;
    font-size: 0.9375rem;
}

.valve-block {
    background: #fff;
    border-radius: 50%;
    width: 100px;
    height: 100px;
    border: 4px solid #c4b5fd;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    color: #6d28d9;
    box-shadow: var(--shadow-xl);
    transition: all 0.3s ease;
}

.valve-block:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-2xl);
}

.valve-wheel {
    font-size: 1.75rem;
}

/* Disclaimer */
.disclaimer {
    margin-top: 2rem;
    padding: 1.5rem 1.75rem;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.8) 0%, rgba(241, 245, 249, 0.6) 100%);
    backdrop-filter: blur(10px);
    border-left: 4px solid var(--text-muted);
    border-radius: 12px;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.8;
    box-shadow: var(--shadow-sm);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        width: 100%;
        max-width: 100%;
        padding: 0 1.5rem;
    }
    
    .tab-content {
        padding: 2rem;
    }
    
    form .grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .tabs {
        display: none;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .logo-wrapper {
        gap: 1rem;
    }
    
    .company-logo,
    .app-logo {
        max-height: 70px;
        max-width: 180px;
    }
    
    .logo-divider {
        height: 50px;
        margin: 0 1rem;
    }
    
    .header-text h1 {
        font-size: 1.75rem;
    }
    
    .header-text p {
        font-size: 0.9375rem;
    }
    
    .tabs {
        padding: 0.5rem;
        gap: 0.5rem;
        margin: 1.5rem 0 1rem;
        border-radius: 16px;
    }
    
    .tabs button {
        padding: 0.75rem 1rem;
        font-size: 0.8125rem;
        min-width: auto;
    }
    
    .tab-content {
        padding: 1.5rem;
        border-radius: 20px;
        margin-left: -1rem;
        margin-right: -1rem;
        width: calc(100% + 2rem);
        max-width: calc(100% + 2rem);
        box-sizing: border-box;
    }
    
    .section-title {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }
    
    form {
        padding: 1.5rem;
        margin-left: 0;
        margin-right: 0;
        width: 100%;
        max-width: 100%;
    }
    
    form .grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .diagram-panel {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    input,
    select {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .mobile-menu-toggle {
        display: flex;
        width: 44px;
        height: 44px;
        position: absolute;
        right: 0.75rem;
    }
    
    .mobile-menu-toggle .burger-icon {
        width: 22px;
        height: 22px;
    }
    
    .mobile-menu-toggle .burger-icon::before {
        width: 18px;
        box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
    }
    
    .mobile-menu-toggle .burger-icon svg {
        width: 22px;
        height: 22px;
    }
    
    .tabs {
        display: none;
    }
    
    .header-content {
        justify-content: center;
        position: relative;
    }
    
    .logo-wrapper {
        flex: 1;
        justify-content: center;
        gap: 1rem;
    }
    
    .company-logo,
    .app-logo {
        max-height: 55px;
        max-width: 130px;
    }
    
    .logo-divider {
        height: 40px;
        margin: 0 0.6rem;
    }
    
    .logo-wrapper {
        gap: 0.6rem;
    }
    
    .header-text h1 {
        font-size: 1.5rem;
    }
    
    .header-text p {
        font-size: 0.875rem;
    }
    
    .tab-content {
        padding: 1.25rem;
        margin-left: -0.75rem;
        margin-right: -0.75rem;
        width: calc(100% + 1.5rem);
        max-width: calc(100% + 1.5rem);
        border-radius: 16px;
    }
    
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 1.25rem;
        padding-bottom: 0.75rem;
    }
    
    form {
        padding: 1.25rem;
        border-radius: 16px;
        margin-left: 0;
        margin-right: 0;
        width: 100%;
        max-width: 100%;
    }
    
    form .grid {
        gap: 1rem;
        grid-template-columns: 1fr;
    }
    
    label {
        padding-left: 0.5rem;
        font-size: 0.8125rem;
        width: 100%;
        min-width: 0;
    }
    
    input,
    select {
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }
    
    select {
        padding-right: 2.5rem;
        background-position: right 0.75rem center;
    }
    
    button[type="submit"] {
        width: 100%;
        padding: 1rem 1.5rem;
        font-size: 0.9375rem;
    }
    
    .card {
        padding: 1.5rem;
        border-radius: 12px;
    }
    
    .card h3 {
        font-size: 1.125rem;
        margin-bottom: 1.25rem;
    }
    
    .card-grid {
        gap: 1rem;
        grid-template-columns: 1fr;
    }
    
    .valve-pressure-info {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .valve-diagram-container > div:first-child {
        flex-direction: column;
        gap: 1rem;
    }
    
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-left: -0.75rem;
        margin-right: -0.75rem;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        width: calc(100% + 1.5rem);
    }
    
    .table-simple {
        min-width: 600px;
    }
    
    .diagram-panel {
        gap: 1.25rem;
        grid-template-columns: 1fr;
    }
    
    .diagram-image {
        padding: 1.5rem;
    }
    
    .info-banner {
        padding: 1.25rem;
        flex-direction: column;
        gap: 1rem;
        border-radius: 12px;
    }
    
    .info-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
    
    .legend-card {
        padding: 1.5rem;
    }
    
    .legend-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .search-card {
        padding: 1.5rem;
    }
    
    .flange-actions {
        flex-direction: column;
    }
    
    .flange-actions button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    * {
        -webkit-tap-highlight-color: transparent;
    }
    
    .container {
        padding: 0 0.5rem;
    }
    
    header {
        padding: 1rem 0;
    }
    
    .mobile-menu-toggle {
        width: 40px;
        height: 40px;
        right: 0.5rem;
    }
    
    .mobile-menu-toggle .burger-icon {
        width: 20px;
        height: 20px;
    }
    
    .mobile-menu-toggle .burger-icon::before {
        width: 16px;
        height: 1.5px;
        box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor;
    }
    
    .mobile-menu-toggle .burger-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .mobile-menu-header {
        padding: 1.25rem 1.5rem;
    }
    
    .mobile-menu-header h2 {
        font-size: 1.25rem;
    }
    
    .mobile-menu-item {
        padding: 1rem 1.5rem;
        font-size: 0.9375rem;
    }
    
    .mobile-menu-icon {
        width: 22px;
        height: 22px;
    }
    
    .header-content {
        position: relative;
    }
    
    .logo-wrapper {
        flex: 1;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .company-logo,
    .app-logo {
        max-height: 40px;
        max-width: 90px;
    }
    
    .logo-divider {
        height: 35px;
        margin: 0 0.4rem;
    }
    
    .header-text h1 {
        font-size: 1.25rem;
    }
    
    .header-text p {
        font-size: 0.8125rem;
    }
    
    .tabs {
        margin: 1rem 0 0.75rem;
        padding: 0.375rem;
        gap: 0.375rem;
        border-radius: 10px;
    }
    
    .tabs button {
        padding: 0.5rem 0.75rem;
        font-size: 0.6875rem;
        border-radius: 8px;
    }
    
    .tab-icon {
        width: 14px;
        height: 14px;
    }
    
    .tab-content {
        padding: 1rem;
        margin-left: -0.5rem;
        margin-right: -0.5rem;
        width: calc(100% + 1rem);
        max-width: calc(100% + 1rem);
        border-radius: 12px;
    }
    
    .section-title {
        font-size: 1.25rem;
        margin-bottom: 1rem;
        padding-bottom: 0.625rem;
    }
    
    .section-title::after {
        width: 40px;
        height: 2px;
    }
    
    form {
        padding: 1rem;
        border-radius: 12px;
        margin-left: 0;
        margin-right: 0;
        width: 100%;
        max-width: 100%;
    }
    
    form .grid {
        gap: 0.875rem;
        grid-template-columns: 1fr;
    }
    
    label {
        font-size: 0.75rem;
        padding-left: 0.375rem;
        width: 100%;
        min-width: 0;
        gap: 0.5rem;
    }
    
    input,
    select {
        padding: 0.75rem 0.875rem;
        font-size: 0.8125rem;
        border-radius: 10px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }
    
    select {
        padding-right: 2.25rem;
        background-position: right 0.625rem center;
        background-size: 12px;
    }
    
    button[type="submit"] {
        padding: 0.875rem 1.25rem;
        font-size: 0.875rem;
        border-radius: 10px;
        width: 100%;
    }
    
    .card {
        padding: 1.25rem;
        border-radius: 12px;
    }
    
    .card h3 {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .card-grid {
        gap: 0.875rem;
        grid-template-columns: 1fr;
    }
    
    .highlight-value {
        font-size: 1.75rem;
    }
    
    .stat {
        font-size: 0.8125rem;
        padding: 0.5rem 0;
    }
    
    .table-wrapper {
        padding: 1rem;
        margin-left: -0.5rem;
        margin-right: -0.5rem;
        width: calc(100% + 1rem);
        max-width: calc(100% + 1rem);
    }
    
    .table-simple {
        font-size: 0.75rem;
        min-width: 500px;
    }
    
    .table-simple th,
    .table-simple td {
        padding: 0.625rem 0.75rem;
    }
    
    .info-banner {
        padding: 1rem;
        gap: 0.875rem;
        border-radius: 12px;
    }
    
    .info-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .info-title {
        font-size: 1rem;
    }
    
    .info-text {
        font-size: 0.8125rem;
    }
    
    .diagram-image {
        padding: 1.25rem;
    }
    
    .legend-card {
        padding: 1.25rem;
    }
    
    .legend-grid {
        font-size: 0.8125rem;
    }
    
    .diagram-panel {
        gap: 1rem;
    }
    
    .valve-pressure-card {
        padding: 0.875rem;
    }
    
    .valve-pressure-label {
        font-size: 0.8125rem;
    }
    
    .valve-pressure-value {
        font-size: 1.125rem;
    }
}

/* Footer */
footer {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid var(--border-light);
    padding: 2rem 0;
    margin-top: 3rem;
    box-shadow: 0 -1px 3px 0 rgba(0, 0, 0, 0.05);
}

footer .container {
    text-align: center;
}

footer p {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Footer Responsive */
@media (max-width: 768px) {
    footer {
        padding: 1.5rem 0;
        margin-top: 2rem;
    }
    
    footer p {
        font-size: 0.875rem;
    }
}

@media (max-width: 640px) {
    footer {
        padding: 1.25rem 0;
        margin-top: 1.5rem;
    }
    
    footer p {
        font-size: 0.8125rem;
    }
}

@media (max-width: 480px) {
    footer {
        padding: 1rem 0;
        margin-top: 1rem;
    }
    
    footer p {
        font-size: 0.75rem;
    }
}

/* Steam Trap Type Cards Hover Effect */
.trap-type-card {
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.trap-type-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .trap-types-grid {
        grid-template-columns: 1fr !important;
    }
}