/* Engine Calculator Specific Styles */

/* Engine Preview in Header */
.engine-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.engine-info {
    text-align: center;
}

.compression-ratio {
    display: block;
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.ratio-label {
    display: block;
    font-size: 0.9rem;
    color: var(--gray-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Input Section Styles */
.input-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.input-section h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-section h3::before {
    content: '';
    width: 3px;
    height: 20px;
    background: var(--primary);
    border-radius: 2px;
}

/* Engine-specific input styles */
.engine-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.engine-inputs .form-group {
    margin-bottom: 0;
}

/* Unit labels */
.unit-label {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-light);
    font-size: 0.8rem;
    pointer-events: none;
}

.form-group {
    position: relative;
}

.form-group input {
    padding-right: 3rem;
}

/* Results Grid for Engine Calculations */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.result-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.result-card:hover::before {
    transform: scaleX(1);
}

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.result-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.result-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary);
}

.result-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--light);
}

.result-value {
    font-family: 'Courier New', monospace;
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.75rem 1rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0.5rem 0;
    word-break: break-all;
}

.result-details {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--gray-light);
}

/* Engine-specific result styles */
.compression-result .result-icon {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1);
}

.volume-result .result-icon {
    background: linear-gradient(45deg, #96ceb4, #feca57, #ff9ff3);
}

.pressure-result .result-icon {
    background: linear-gradient(45deg, #ff9ff3, #54a0ff, #5f27cd);
}

.efficiency-result .result-icon {
    background: linear-gradient(45deg, #00d2d3, #ff9f43, #ee5a24);
}

/* Compression ratio specific styling */
.compression-ratio-display {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary);
    text-align: center;
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 2px solid var(--primary);
}

.compression-ratio-display.low {
    color: #4ecdc4;
    border-color: #4ecdc4;
}

.compression-ratio-display.medium {
    color: #feca57;
    border-color: #feca57;
}

.compression-ratio-display.high {
    color: #ff6b6b;
    border-color: #ff6b6b;
}

/* Volume calculations display */
.volume-breakdown {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.volume-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.volume-item:last-child {
    border-bottom: none;
    font-weight: bold;
    color: var(--primary);
}

.volume-label {
    color: var(--gray-light);
}

.volume-value {
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

/* Warning and info boxes */
.warning-box {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    color: #ffc107;
}

.danger-box {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    color: #dc3545;
}

.success-box {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    color: #28a745;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .engine-inputs {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .engine-preview {
        padding: 1.5rem;
    }
    
    .compression-ratio {
        font-size: 1.2rem;
    }
    
    .input-section {
        padding: 1rem;
    }
}

/* Animation for calculations */
@keyframes calculatePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.calculating {
    animation: calculatePulse 0.5s ease;
}

/* Accessibility improvements */
input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .result-card {
        border-width: 2px;
    }
    
    .input-section {
        border-width: 2px;
    }
}

/* Unit Toggle Styles */
.unit-toggle-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.unit-toggle-section h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.unit-toggle {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.unit-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--gray-light);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.unit-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    color: var(--light);
}

.unit-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.unit-btn i {
    font-size: 1rem;
}

/* Dark mode specific adjustments */
@media (prefers-color-scheme: dark) {
    .engine-preview {
        background: rgba(0, 0, 0, 0.3);
    }
    
    .result-card {
        background: rgba(0, 0, 0, 0.2);
    }
    
    .input-section {
        background: rgba(0, 0, 0, 0.2);
    }
    
    .unit-toggle-section {
        background: rgba(0, 0, 0, 0.2);
    }
}

/* Tips Section Styles */
.tips-section {
    padding: 4rem 0;
}

.tips-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--light);
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.tip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tip::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tip:hover::before {
    transform: scaleX(1);
}

.tip:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.tip i {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    display: block;
}

.tip h4 {
    color: var(--light);
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.tip p {
    color: var(--gray-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Light theme adjustments for tips */
body.light-theme .tips-section h2 {
    color: var(--dark);
}

body.light-theme .tip {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .tip h4 {
    color: var(--dark);
}

body.light-theme .tip p {
    color: var(--gray);
}

/* Responsive adjustments for tips */
@media (max-width: 768px) {
    .tips-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .tips-section h2 {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }
} 