/* Pressure Converter Tool Styles */

/* Global Box Sizing and Overflow Prevention */
* {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
}

/* Tool Container - Full Page Layout */
.pressure-converter-tool {
    width: 100%;
    min-height: 100vh;
    background: #ffffff;
    padding: 0;
    margin: 0;
    overflow-x: hidden;
    box-sizing: border-box;
}

.tool-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Tool Header */
.tool-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1rem 0;
}

.tool-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: rgb(34, 33, 33);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.tool-header h1 i {
    color: var(--primary-color);
    font-size: 1.8rem;
}

.tool-description {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 0;
    line-height: 1.6;
}

/* Calculator Interface */
.calculator-interface {
    margin-bottom: 2rem;
}

.calculator-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e5e7eb;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Formula Selection */
.formula-selection {
    margin-bottom: 2rem;
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.section-label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    text-align: center;
}

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

.formula-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-family: inherit;
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.formula-btn:hover {
    border-color: var(--primary-color);
    background: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.formula-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.formula-btn.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.formula-btn.active:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.formula-icon {
    font-size: 1.5rem;
    min-width: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.formula-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.formula-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.formula-equation {
    font-size: 0.8rem;
    opacity: 0.8;
    font-family: 'Courier New', monospace;
}

/* Input Forms */
.input-forms {
    margin-bottom: 2rem;
}

.input-form {
    display: none;
}

.input-form.active {
    display: block;
}

.form-header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.form-header p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.formula-display {
    background: #f8fafc;
    padding: 0.75rem;
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
    font-size: 0.9rem;
}

.formula-display small {
    display: block;
    margin-top: 0.25rem;
    opacity: 0.7;
}

/* Input Grid */
.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.input-label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.input-with-unit {
    display: flex;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    transition: border-color 0.2s ease;
    min-height: 48px;
    width: 100%;
    box-sizing: border-box;
}

.input-with-unit:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.form-input {
    flex: 1;
    padding: 0.875rem 1rem;
    border: none;
    outline: none;
    font-size: 1rem;
    background: transparent;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
}

.unit-select {
    padding: 0.875rem 1rem;
    border: none;
    border-left: 2px solid #e5e7eb;
    background: #f8fafc;
    font-size: 0.9rem;
    cursor: pointer;
    min-width: 100px;
    max-width: 130px;
    font-weight: 500;
    color: var(--text-dark);
    flex-shrink: 0;
    box-sizing: border-box;
    position: relative;
    z-index: 10;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

.unit-label {
    padding: 0.875rem 1rem;
    border-left: 2px solid #e5e7eb;
    background: #f8fafc;
    font-size: 0.9rem;
    color: var(--text-light);
    min-width: 80px;
    max-width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    flex-shrink: 0;
    box-sizing: border-box;
}

.example-text {
    font-size: 0.85rem;
    color: var(--text-light);
    font-style: italic;
    text-align: center;
    margin-top: 0.5rem;
}

/* Mobile-specific input enhancements */
@media (max-width: 768px) {
    .input-grid {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    /* Enhanced dropdown visibility on mobile */
    .unit-select {
        background-color: white;
        border: 2px solid #e5e7eb;
        border-radius: 8px;
        position: relative;
        z-index: 100;
        -webkit-tap-highlight-color: transparent;
    }

    .unit-select:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
        z-index: 200;
    }

    .unit-select option {
        background: white;
        color: #1f2937;
        padding: 1rem;
        font-size: 1.1rem;
        font-weight: 500;
        line-height: 1.5;
        min-height: 48px;
    }

    .input-with-unit {
        max-width: 100%;
        overflow: hidden;
    }

    .input-with-unit:focus-within {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(34, 197, 94, 0.15);
    }

    .form-input {
        min-width: 0;
        flex: 1;
    }

    .form-input::placeholder {
        color: #9ca3af;
        font-size: 0.95rem;
    }

    .unit-select {
        min-width: 90px;
        max-width: 110px;
        font-size: 0.85rem;
        padding: 0.875rem 0.75rem;
    }

    .unit-label {
        min-width: 70px;
        max-width: 90px;
        font-size: 0.85rem;
        padding: 0.875rem 0.75rem;
    }

    .unit-select:focus {
        outline: none;
        background: #f1f5f9;
        z-index: 50;
    }
}

/* Dropdown option styling for better mobile visibility */
.unit-select option {
    background: white;
    color: var(--text-dark);
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.4;
    min-height: 44px;
}

/* Action Controls */
.action-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.calculate-btn, .clear-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.calculate-btn {
    background: rgba(6, 38, 221, 0.918);
    color: white;
}

.calculate-btn:hover {
    background: blue;
}

.calculate-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.clear-btn {
    background: #ec3d26;
    color: white;
}

.clear-btn:hover {
    background: #4b5563;
}

/* Result Section */
.result-section {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

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

.result-display {
    background: linear-gradient(135deg, #dcfce7 0%, #c9f4fc 100%);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #86efac;
    transition: all 0.3s ease-in-out;
    margin-bottom: 1.5rem;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(134, 239, 172, 0.3);
}

.result-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.copy-result-btn {
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(134, 239, 172, 0.3);
    border-radius: 8px;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.2s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-result-btn:hover {
    background: white;
    color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.pressure-result-container {
    text-align: center;
    margin-bottom: 2rem;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.pressure-result-container.animate {
    opacity: 1;
    transform: translateY(0) scale(1.01);
    transition: transform 0.3s ease;
}

.pressure-result-container.animate {
    transform: scale(1.02);
}

.pressure-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease-in-out;
    line-height: 1;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.pressure-value.counting {
    color: var(--text-light);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.pressure-unit {
    font-size: 1.5rem;
    font-weight: 600;
    color: #374151;
    font-family: 'Courier New', monospace;
    margin-left: 0.25rem;
    line-height: 1;
    margin-bottom: 1rem;
}

/* Unit Conversions */
.unit-conversions {
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.unit-conversions.animate {
    opacity: 1;
    transform: translateY(0);
}

.unit-conversions h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
    text-align: center;
}

.conversions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.conversion-item {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(134, 239, 172, 0.3);
    border-radius: 8px;
    padding: 0.75rem;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.conversion-item:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(134, 239, 172, 0.2);
}

.conversion-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.conversion-unit {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 500;
}

/* Calculation Steps */
.calculation-steps {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.calculation-steps.animate {
    opacity: 1;
    transform: translateY(0);
}

.calculation-steps h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
    text-align: center;
}

.step-item {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(134, 239, 172, 0.3);
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: #1e40af;
    transition: all 0.3s ease;
}

.step-item:hover {
    background: white;
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(30, 64, 175, 0.15);
}

.step-number {
    font-weight: 600;
    color: var(--primary-color);
}

/* Loading Indicator */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    text-align: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Messages */
.error-message, .success-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-weight: 500;
}

.error-message {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.success-message {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

/* Calculation History */
.calculation-history {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.history-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.history-list {
    margin-bottom: 1.5rem;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    background: #f8fafc;
}

.history-shape {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.history-details {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.history-result {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.clear-history-btn {
    padding: 0.5rem 1rem;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.clear-history-btn:hover {
    background: #dc2626;
}

/* Popular Examples */
.popular-examples {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.popular-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.example-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f8fafc;
}

.example-item:hover {
    border-color: var(--primary-color);
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.example-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    min-width: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.example-label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.example-description {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* SEO Content */
.seo-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    background: white;
}

.seo-content section {
    margin-bottom: 2rem;
}

.seo-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.seo-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    margin-top: 1.5rem;
}

.seo-content p {
    line-height: 1.7;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.seo-content ul, .seo-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.seo-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.seo-content strong {
    color: var(--text-dark);
}

/* Related Tools Section */
.related-tools-section {
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem auto;
    max-width: 1000px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

.related-tools-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.related-tools-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.related-tools-header h3 i {
    color: var(--primary-color);
}

.related-tools-header p {
    color: var(--text-light);
    margin: 0.5rem 0 0 0;
    font-size: 0.95rem;
}

.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.related-tool-link {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: var(--primary-color);
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid #e5e7eb;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.related-tool-link:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, #059669 100%);
    color: #ffffff;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.related-tool-link i {
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tool-container {
        padding: 1rem;
    }

    .calculator-card {
        padding: 1.5rem;
    }

    .formula-selection {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }

    .section-label {
        font-size: 0.95rem;
        margin-bottom: 0.75rem;
    }

    .formula-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .formula-btn {
        padding: 0.375rem 0.25rem;
        gap: 0.25rem;
        min-height: 35px;
        touch-action: manipulation;
        flex-direction: column;
        text-align: center;
    }

    .formula-icon {
        font-size: 1.25rem;
        min-width: auto;
        margin-bottom: 0.25rem;
    }

    .formula-info {
        align-items: center;
        gap: 0.125rem;
    }

    .formula-name {
        font-size: 0.8rem;
        font-weight: 600;
        line-height: 1.1;
    }

    .formula-equation {
        font-size: 0.7rem;
        line-height: 1.1;
    }

    .input-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .action-controls {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .calculate-btn, .clear-btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
        min-height: 48px;
        touch-action: manipulation;
        width: 280px;
        max-width: 90%;
        justify-content: center;
    }

    .pressure-value {
        font-size: 2rem;
    }

    .conversions-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .examples-grid {
        grid-template-columns: 1fr;
    }

    .history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .seo-content {
        padding: 1rem;
    }

    .related-tools-section {
        padding: 1.5rem;
        margin: 1.5rem 1rem;
    }

    .related-tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .related-tool-link {
        padding: 0.625rem 0.75rem;
        font-size: 0.8rem;
        flex-direction: column;
        gap: 4px;
    }

    .related-tool-link i {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .tool-header h1 {
        font-size: 1.5rem;
    }

    .calculator-card {
        padding: 1rem;
    }

    .formula-selection {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }

    .section-label {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }

    .formula-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.375rem;
    }

    .formula-btn {
        padding: 0.375rem 0.1875rem;
        gap: 0.1875rem;
        min-height: 40px;
        border-radius: 6px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        flex-direction: column;
        text-align: center;
    }

    .formula-btn:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }

    .formula-icon {
        font-size: 1.1rem;
        min-width: auto;
        margin-bottom: 0.25rem;
    }

    .formula-info {
        align-items: center;
        gap: 0.125rem;
    }

    .formula-name {
        font-size: 0.75rem;
        font-weight: 600;
        line-height: 1.1;
    }

    .formula-equation {
        font-size: 0.65rem;
        line-height: 1.1;
    }

    .section-label {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }

    .input-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 1.25rem;
    }

    .input-group {
        gap: 0.5rem;
    }

    .input-label {
        font-size: 0.9rem;
        font-weight: 600;
    }

    .input-with-unit {
        min-height: 52px;
        border-width: 2px;
    }

    .form-input {
        padding: 1rem;
        font-size: 1rem;
    }

    .unit-select, .unit-label {
        padding: 1rem 0.75rem;
        font-size: 0.9rem;
        min-width: 110px;
        font-weight: 500;
        position: relative;
        z-index: 20;
    }

    .unit-select {
        padding-right: 2.5rem;
        background-size: 1.2rem;
        background-position: right 0.75rem center;
    }

    .action-controls {
        gap: 0.5rem;
        margin-bottom: 1.5rem;
        align-items: center;
    }

    .calculate-btn, .clear-btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.9rem;
        min-height: 48px;
        border-radius: 8px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        width: 260px;
        max-width: 85%;
        justify-content: center;
    }

    .pressure-value {
        font-size: 1.75rem;
    }

    .conversions-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .conversion-item {
        padding: 0.5rem;
    }

    .example-item {
        padding: 0.75rem;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    .related-tools-section {
        padding: 1rem;
        margin: 1rem 0.75rem;
    }

    .related-tools-grid {
        grid-template-columns: 1fr;
    }

    .related-tool-link {
        flex-direction: row;
        gap: 8px;
        justify-content: flex-start;
        text-align: left;
    }
}

/* Extra Small Mobile Devices */
@media (max-width: 360px) {
    .calculator-card {
        padding: 0.75rem;
    }

    .formula-selection {
        padding: 0.5rem;
        margin-bottom: 0.75rem;
    }

    .section-label {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }

    .formula-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.25rem;
    }

    .formula-btn {
        padding: 0.625rem 0.25rem;
        gap: 0.25rem;
        min-height: 60px;
        flex-direction: column;
        text-align: center;
    }

    .formula-icon {
        font-size: 1rem;
        min-width: auto;
        margin-bottom: 0.125rem;
    }

    .formula-info {
        align-items: center;
        gap: 0.125rem;
    }

    .formula-name {
        font-size: 0.7rem;
        line-height: 1.1;
    }

    .formula-equation {
        font-size: 0.6rem;
        line-height: 1.1;
    }

    .input-grid {
        gap: 0.875rem;
        margin-bottom: 1rem;
    }

    .input-group {
        gap: 0.5rem;
    }

    .input-label {
        font-size: 0.875rem;
        font-weight: 600;
    }

    .input-with-unit {
        flex-direction: column;
        min-height: auto;
        border-width: 2px;
    }

    .form-input {
        padding: 1rem;
        font-size: 1rem;
        min-height: 48px;
    }

    .unit-select, .unit-label {
        border-left: none;
        border-top: 2px solid #e5e7eb;
        min-width: auto;
        width: 100%;
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
        font-weight: 500;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        z-index: 30;
    }

    .unit-select {
        padding-right: 3rem;
        background-size: 1.5rem;
        background-position: right 1rem center;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        cursor: pointer;
    }

    .calculate-btn, .clear-btn {
        padding: 1rem;
        font-size: 0.85rem;
        min-height: 52px;
        width: 240px;
        max-width: 80%;
        justify-content: center;
    }
}

/* Print Styles */
@media print {
    .pressure-calculator-tool {
        background: white !important;
    }

    .action-controls,
    .popular-examples,
    .calculation-history {
        display: none !important;
    }

    .calculator-card,
    .result-display {
        box-shadow: none !important;
        border: 1px solid #000 !important;
    }

    .formula-btn {
        border: 1px solid #000 !important;
    }

    .pressure-value {
        color: #000 !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .calculator-card,
    .result-display,
    .popular-examples,
    .calculation-history {
        border: 2px solid #000;
    }

    .formula-btn {
        border: 2px solid #000;
    }

    .formula-btn.active {
        background: #000;
        color: #fff;
    }

    .form-input {
        border: 2px solid #000;
    }

    .calculate-btn {
        background: #000;
        border: 2px solid #000;
    }
}
