/* Import modern fonts */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Exo+2:wght@300;400;600;700&display=swap');

/* CSS Variables for consistent theming */
:root {
    --primary-bg: #0a0a0f;
    --secondary-bg: #1a1a2e;
    --accent-bg: #16213e;
    --glass-bg: rgba(26, 26, 46, 0.8);
    --neon-blue: #00d4ff;
    --neon-cyan: #00ffff;
    --neon-purple: #8a2be2;
    --neon-green: #39ff14;
    --text-primary: #ffffff;
    --text-secondary: #b8c5d6;
    --text-accent: #00d4ff;
    --border-glow: rgba(0, 212, 255, 0.5);
    --shadow-glow: 0 0 20px rgba(0, 212, 255, 0.3);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    
    /* Added theme colors for validation states for consistency */
    --color-error: #ff4757;
    --color-caution: #ffc107;
    --glow-error: 0 0 15px rgba(255, 71, 87, 0.5);
    --glow-caution: 0 0 15px rgba(255, 193, 7, 0.5);
}

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

body {
    font-family: 'Exo 2', sans-serif;
    background: var(--primary-bg);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Animated background */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(45deg, #0a0a0f, #1a1a2e, #16213e);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Grid overlay for tech aesthetic */
.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 212, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Floating particles */
.floating-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--neon-cyan);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--neon-cyan);
    animation: float 6s ease-in-out infinite;
}

.particle:nth-child(1) {
    left: 20%;
    animation-delay: 0s;
    animation-duration: 6s;
}

.particle:nth-child(2) {
    left: 40%;
    animation-delay: 2s;
    animation-duration: 8s;
}

.particle:nth-child(3) {
    left: 60%;
    animation-delay: 4s;
    animation-duration: 7s;
}

.particle:nth-child(4) {
    left: 80%;
    animation-delay: 1s;
    animation-duration: 9s;
}

.particle:nth-child(5) {
    left: 10%;
    animation-delay: 3s;
    animation-duration: 5s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10%, 90% {
        opacity: 1;
    }
    50% {
        transform: translateY(-10vh) rotate(180deg);
    }
}

/* Main container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

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

.title-glow {
    font-family: 'Orbitron', monospace;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
    margin-bottom: 10px;
    text-align: center;
    position: relative;
    width: 100%;
}

.title-glow i {
    color: var(--neon-cyan);
    filter: drop-shadow(0 0 10px var(--neon-cyan));
    animation: pulse 2s ease-in-out infinite alternate;
    position: absolute;
    left: -60px;
    top: 50%;
    transform: translateY(-50%);
}

.title-info-btn {
    background: none;
    border: none;
    color: var(--neon-cyan);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0px;
    border-radius: 50%;
    transition: all 0.3s ease;
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
}

.title-info-btn:hover {
    color: var(--neon-blue);
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.6);
    transform: scale(1.1);
}




@keyframes pulse {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Form styling */
.calculation-form {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-glow);
    position: relative;
    overflow: hidden;
}

.calculation-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-accent);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ---------- Input alerts styled like Application Notes ---------- */
/* === Input alert outlines ON THE FIELD ITSELF === */

/* Caution (yellow) */
.modern-input.field-caution,
.modern-select.field-caution {
  border: 2px solid var(--color-caution) !important;
  box-shadow:
    0 0 6px 1px rgba(255, 193, 7, 0.6),
    0 0 12px 2px rgba(255, 193, 7, 0.4);
  border-radius: 12px;
  background-image: none !important; /* kill shimmer layer */
  animation: none !important;
}

/* Error (red) */
.modern-input.field-error,
.modern-select.field-error {
  border: 2px solid var(--color-error) !important;
  box-shadow:
    0 0 6px 1px rgba(255, 71, 87, 0.65),
    0 0 12px 2px rgba(255, 71, 87, 0.45);
  border-radius: 12px;
  background-image: none !important;
  animation: none !important;
}

/* Focus states still pop */
.modern-input.field-caution:focus,
.modern-select.field-caution:focus {
  box-shadow:
    0 0 0 3px rgba(255, 193, 7, 0.5),
    0 0 12px 2px rgba(255, 193, 7, 0.6);
}

.modern-input.field-error:focus,
.modern-select.field-error:focus {
  box-shadow:
    0 0 0 3px rgba(255, 71, 87, 0.5),
    0 0 12px 2px rgba(255, 71, 87, 0.6);
}

.form-grid {
    display: grid;
    gap: 25px;
}

.input-group {
    position: relative;
}

.input-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-accent);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.input-label i {
    color: var(--neon-cyan);
    filter: drop-shadow(0 0 5px var(--neon-cyan));
}

/* Modern input styling */
.modern-input, .modern-select {
    width: 100%;
    padding: 15px 20px;
    background: rgba(26, 26, 46, 0.6);
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: 'Exo 2', sans-serif;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

/* Hide default dropdown arrow for select elements */
.modern-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: none;
    padding-right: 50px; /* Make room for custom arrow */
}

/* Remove default arrow in IE */
.modern-select::-ms-expand {
    display: none;
}

.modern-input:focus, .modern-select:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
    transform: translateY(-2px);
}

.modern-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Select wrapper for custom arrow */
.select-wrapper {
    position: relative;
}

.select-arrow {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--neon-cyan);
    pointer-events: none;
    transition: transform 0.3s ease;
}

.select-wrapper:hover .select-arrow {
    transform: translateY(-50%) rotate(180deg);
}

/* Specs grid for PTO specifications */
.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* ---------- Submit container + button ---------- */
.submit-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 30px;
}

/* inline message under the button */
#submit-msg {
  font-size: .9rem;
  line-height: 1.3;
  opacity: .95;
  text-align: center;
  min-height: 1.2em;   /* reserve space so layout doesn't jump */
}
#submit-msg.is-error { color: var(--color-error); }
#submit-msg.is-warn  { color: var(--color-caution); }
#submit-msg.is-clear { color: transparent; }

/* button shake animation */
@keyframes btn-shake {
  0%,100% { transform: translateX(0); }
  20%     { transform: translateX(-8px); }
  40%     { transform: translateX(8px); }
  60%     { transform: translateX(-6px); }
  80%     { transform: translateX(6px); }
}
.submit-btn.shake,
.reset-btn.shake { animation: btn-shake .45s ease; }

/* Row layout for the two buttons, centered as a pair with breathing room */
.submit-actions {
  display: flex;
  flex-wrap: wrap;                  /* stacks on narrow screens */
  align-items: center;
  justify-content: space-between;   /* pushes the two buttons apart */
  column-gap: clamp(24px, 5vw, 96px);
  row-gap: 14px;
  width: 100%;
  max-width: 640px;                 /* tune: 560–720px also looks good */
  margin: 8px auto 0;               /* centers the row in the form body */
}
/* keep the status message on its own line under the buttons */
.submit-container #submit-msg {
  flex-basis: 100%;
  text-align: center;
  margin-top: 10px;
}

/* Base look shared by both buttons */
.submit-btn,
.reset-btn {
  background: var(--gradient-accent);
  border: none;
  padding: 18px 40px;
  border-radius: 50px;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 700;
  font-family: 'Orbitron', monospace;
  cursor: pointer;

  position: relative;               /* needed for ::before shimmer */
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
  text-transform: uppercase;
  letter-spacing: 2px;
  min-width: 200px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
}

/* animated shimmer overlay */
.submit-btn::before,
.reset-btn::before {
  content: '';
  position: absolute;
  inset: 0;            /* top:0 right:0 bottom:0 left:0 */
  left: -100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,0.2),
    transparent
  );
  transition: left .5s;
}
.submit-btn:hover::before,
.reset-btn:hover::before { left: 100%; }

/* hover glow */
.submit-btn:hover,
.reset-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(0, 212, 255, 0.5);
}
/* don’t fight the shake */
.submit-btn.shake:hover,
.reset-btn.shake:hover { transform: none; }

/* loading state (spinner only shows on submit in your markup, but safe for both) */
.submit-btn.loading,
.reset-btn.loading { pointer-events: none; }
.submit-btn.loading .btn-text,
.reset-btn.loading .btn-text { opacity: 0; }
.submit-btn .spinner,
.reset-btn .spinner { display: none; }
.submit-btn.loading .spinner,
.reset-btn.loading .spinner { display: block; }

/* Optional: on very small screens, keep the pair centered when they wrap */
@media (max-width: 520px) {
  .submit-actions { justify-content: center; }
}


/* Spinner styling */
.spinner {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.spinner-ring {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid var(--neon-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Results and suggestions sections */
.result-section, .suggestion-section {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-glow);
    position: relative;
    overflow: hidden;
    display: none; /* Hide by default */
}


/* Alternative approach - show when they have actual content */
.result-section.has-content, .suggestion-section.has-content {
    display: block;
}

.result-section h3, .suggestion-section h3 {
    color: var(--neon-cyan);
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
}

.result-section h3::after, .suggestion-section h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: var(--gradient-accent);
}

/* Chat interface */
.chat-interface {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(138, 43, 226, 0.3);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.3);
    position: relative;
    overflow: hidden;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(138, 43, 226, 0.3);
}

.chat-title {
    color: var(--neon-purple);
    font-family: 'Orbitron', monospace;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.chat-title i {
    animation: pulse 2s ease-in-out infinite alternate;
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.status-indicator {
    width: 8px;
    height: 8px;
    background: var(--neon-green);
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 10px var(--neon-green);
}

.chat-input-container {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.chat-input {
    flex: 1;
    padding: 15px 20px;
    background: rgba(26, 26, 46, 0.6);
    border: 2px solid rgba(138, 43, 226, 0.3);
    border-radius: 25px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: 'Exo 2', sans-serif;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.chat-input:focus {
    outline: none;
    border-color: var(--neon-purple);
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.4);
}

.chat-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.chat-submit {
    background: var(--gradient-secondary);
    border: none;
    padding: 15px 20px;
    border-radius: 25px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(138, 43, 226, 0.3);
}

.chat-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(138, 43, 226, 0.5);
}

.chat-response {
    background: rgba(26, 26, 46, 0.4);
    border-radius: 15px;
    padding: 20px;
    border-left: 4px solid var(--neon-purple);
    display: none;
    animation: fadeInUp 0.5s ease;
    max-height: 500px;
    overflow-y: auto;
}

/* Chat message bubbles */
.chat-message {
    margin-bottom: 16px;
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 85%;
    word-wrap: break-word;
    animation: messageSlideIn 0.3s ease;
}

.chat-message.user-message {
    background: linear-gradient(135deg, var(--neon-purple) 0%, #6b46c1 100%);
    color: var(--text-primary);
    margin-left: auto;
    margin-right: 0;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 12px rgba(138, 43, 226, 0.4);
    text-align: left;
}

.chat-message.ai-message {
    background: rgba(45, 45, 65, 0.6);
    color: var(--text-primary);
    margin-right: auto;
    margin-left: 0;
    border-bottom-left-radius: 4px;
    border-left: 3px solid var(--neon-cyan);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.chat-message.ai-message.loading {
    background: rgba(45, 45, 65, 0.4);
    border-left: 3px solid var(--neon-purple);
}

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

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

/* Loading dots animation */
.loading-dots {
    display: flex;
    gap: 5px;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background: var(--neon-purple);
    border-radius: 50%;
    animation: loadingDots 1.4s ease-in-out infinite both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes loadingDots {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Error message styling */
.error-message {
    color: var(--color-error);
    text-align: center;
    padding: 15px;
    background: rgba(255, 71, 87, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(255, 71, 87, 0.3);
}

/* Read-only field styling */
.readonly {
    background: rgba(0, 212, 255, 0.1) !important;
    border-color: rgba(0, 212, 255, 0.5) !important;
    cursor: not-allowed;
}

/* Status messages */
.status-message {
    padding: 15px 20px;
    background: rgba(0, 212, 255, 0.1);
    border-left: 4px solid var(--neon-cyan);
    border-radius: 10px;
    margin: 15px 0;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.status-pass {
    color: var(--neon-green) !important;
    font-weight: bold;
    text-shadow: 0 0 10px var(--neon-green);
}

.status-warning {
    color: var(--color-caution) !important;
    font-weight: bold;
    text-shadow: 0 0 10px var(--color-caution);
}

.status-fail {
    color: var(--color-error) !important;
    font-weight: bold;
    text-shadow: 0 0 10px var(--color-error);
}

/* Body text styling */
.body-text {
    font-family: 'Exo 2', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
}

.body-text p {
    margin: 10px 0;
}

.body-text strong {
    color: var(--neon-cyan);
    font-weight: 600;
}

.body-text ol, .body-text ul {
    margin: 15px 0;
    padding-left: 25px;
}

.body-text li {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

/* Formula and code styling */
.body-text pre {
    background: rgba(26, 26, 46, 0.8);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    color: var(--neon-cyan);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.2);
}

/* Math equations */
.math-equation {
    display: block;
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background: rgba(26, 26, 46, 0.6);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 10px;
    color: var(--text-primary);
}

/* Example sections */
.example {
    background: rgba(57, 255, 20, 0.1);
    border-left: 4px solid var(--neon-green);
    padding: 15px 20px;
    border-radius: 10px;
    margin: 15px 0;
    font-style: italic;
    color: var(--text-secondary);
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .calculation-form {
        padding: 25px;
    }
    
    .title-glow {
        font-size: 2rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .specs-grid {
        grid-template-columns: 1fr;
    }
    
    .chat-input-container {
        flex-direction: column;
    }
    
    .chat-submit {
        align-self: flex-end;
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .title-glow {
        font-size: 1.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .calculation-form {
        padding: 20px;
    }
    
    .modern-input, .modern-select {
        padding: 12px 15px;
    }
    
    .submit-btn {
        padding: 15px 30px;
        font-size: 1rem;
    }
}

/* Hover effects for interactive elements */
.input-group:hover .input-label i {
    transform: scale(1.2);
    transition: transform 0.3s ease;
}

.modern-input:hover, .modern-select:hover {
    border-color: rgba(0, 212, 255, 0.6);
    transform: translateY(-1px);
}

/* A general transition rule was here, but it's better to apply transitions to specific elements. 
   Many elements already have their own transitions defined, so a global '*' rule can be problematic. 
   I've removed it for better performance and predictability. */

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--secondary-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-accent);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--neon-cyan);
}



/* Enhanced Results Styling */
.results-header h3 {
    color: var(--neon-cyan);
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    margin-bottom: 25px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.result-card {
    background: rgba(26, 26, 46, 0.6);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.result-card:hover {
    border-color: var(--neon-cyan);
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.3);
    transform: translateY(-2px);
}

.result-card h4 {
    color: var(--neon-cyan);
    font-family: 'Orbitron', monospace;
    font-size: 1.1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.3);
    padding-bottom: 8px;
}

.spec-item, .efficiency-item, .flow-item, .power-item {
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.spec-item:last-child, .efficiency-item:last-child, .flow-item:last-child, .power-item:last-child {
    border-bottom: none;
}

.efficiency-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.efficiency-label {
    color: var(--text-secondary);
}

.efficiency-value {
    color: var(--neon-green);
    font-weight: 600;
    font-family: 'Orbitron', monospace;
}

.flow-values, .power-value {
    color: var(--text-primary);
    font-family: 'Orbitron', monospace;
    font-weight: 500;
    margin-top: 5px;
}

.power-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.power-item strong {
    color: var(--text-accent);
}

.summary-card {
    background: rgba(26, 26, 46, 0.8);
    border: 2px solid rgba(0, 212, 255, 0.4);
    border-radius: 15px;
    padding: 25px;
    backdrop-filter: blur(15px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
}

.summary-card h4 {
    color: var(--neon-cyan);
    font-family: 'Orbitron', monospace;
    font-size: 1.3rem;
    margin-bottom: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: rgba(26, 26, 46, 0.6);
    border-radius: 10px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.summary-label {
    color: var(--text-secondary);
    font-weight: 500;
}

/* This `.status-indicator` rule was for a small dot. The one below is for a larger text-based tag.
   To avoid conflict, I am renaming the tag-based one to `.status-tag` for clarity. */
.summary-item .status-tag {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Orbitron', monospace;
}

.status-tag.status-pass {
    background: rgba(57, 255, 20, 0.2);
    color: var(--neon-green);
    border: 1px solid var(--neon-green);
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.3);
}

.status-tag.status-warning {
    background: rgba(255, 193, 7, 0.2);
    color: var(--color-caution);
    border: 1px solid var(--color-caution);
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.3);
}

.status-tag.status-fail {
    background: rgba(255, 71, 87, 0.2);
    color: var(--color-error);
    border: 1px solid var(--color-error);
    box-shadow: 0 0 10px rgba(255, 71, 87, 0.3);
}

/* AI Response Styling */
.ai-response-header h3 {
    color: var(--neon-purple);
    font-family: 'Orbitron', monospace;
    font-size: 1.4rem;
    margin-bottom: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.suggestions-content {
    background: rgba(26, 26, 46, 0.4);
    border-radius: 12px;
    padding: 20px;
    border-left: 4px solid var(--neon-purple);
}

.suggestion-header {
    color: var(--neon-purple);
    font-size: 1.1rem;
    font-weight: 700;
    margin: 15px 0 10px 0;
    font-family: 'Orbitron', monospace;
}

.suggestion-item {
    color: var(--text-secondary);
    margin: 8px 0;
    padding-left: 15px;
    line-height: 1.6;
}

.suggestion-text {
    color: var(--text-primary);
    margin: 10px 0;
    line-height: 1.6;
}

/* Responsive adjustments for results */
@media (max-width: 768px) {
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
    
    .summary-item {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .result-card {
        padding: 15px;
    }
    
    .summary-card {
        padding: 20px;
    }
}


/* Application Notes Panel Styling */
.info-btn {
    background: none;
    border: none;
    color: var(--neon-cyan);
    font-size: 1rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
    margin-left: 8px;
    opacity: 0.7;
}

.info-btn:hover {
    opacity: 1;
    color: var(--neon-green);
    transform: scale(1.1);
    filter: drop-shadow(0 0 10px var(--neon-green));
}

.info-btn.active {
    opacity: 1;
    color: var(--neon-green);
    filter: drop-shadow(0 0 15px var(--neon-green));
    animation: pulse 2s ease-in-out infinite;
}

.application-notes-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(0, 212, 255, 0.4); /* Changed to neon-blue */
    border-radius: 15px;
    padding: 0;
    margin: 20px 0;
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2); /* Changed to neon-blue */
    position: relative;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.application-notes-panel.show {
    max-height: 600px;
    opacity: 1;
    transform: translateY(0);
}

.application-notes-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-accent); /* Changed to neon-blue gradient */
    animation: shimmer 3s ease-in-out infinite;
}

.notes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.3); /* Changed to neon-blue */
    background: rgba(0, 212, 255, 0.1); /* Changed to neon-blue */
}

.notes-header h4 {
    color: var(--neon-cyan); /* Changed to neon-cyan */
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.notes-header h4 i {
    color: var(--neon-cyan); /* Changed to neon-cyan */
    filter: drop-shadow(0 0 8px var(--neon-cyan)); /* Changed to neon-cyan */
    animation: pulse 2s ease-in-out infinite alternate;
}

.close-notes-btn {
    background: none;
    border: none;
    color: var(--neon-cyan); /* Changed to neon-cyan */
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.close-notes-btn:hover {
    opacity: 1;
    color: var(--color-error); /* Keep error color for closing for contrast, or change to neon-green */
    transform: rotate(90deg);
    filter: drop-shadow(0 0 10px var(--color-error));
}

.notes-content {
    padding: 25px;
    max-height: 500px;
    overflow-y: auto;
}

.notes-content h5 {
    color: var(--neon-cyan); /* Changed to neon-cyan */
    font-family: 'Orbitron', monospace;
    font-size: 1.1rem;
    margin-bottom: 20px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.3); /* Changed to neon-blue */
    padding-bottom: 10px;
}

.note-item {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid;
    transition: all 0.3s ease;
    border-width: 1px 1px 1px 4px;
    border-style: solid;
}

.note-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* These specific note colors are likely for semantic meaning, 
   so I'll only change the *icon color* within them to neon-cyan, 
   but keep the background and left border colors for distinction. */
.caution-note {
    background: rgba(255, 71, 87, 0.1);
    border-color: var(--color-error);
}

.warning-note {
    background: rgba(255, 193, 7, 0.1);
    border-color: var(--color-caution);
}

.info-note {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--neon-cyan);
}

.note-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Exo 2', sans-serif;
}

/* Updated icon colors for consistency */
.caution-note .note-header {
    color: var(--color-error);
}
.caution-note .note-header i {
    color: var(--color-error); /* CORRECTED: Icon is now red */
}


.warning-note .note-header {
    color: var(--color-caution);
}
.warning-note .note-header i {
    color: var(--color-caution); /* CORRECTED: Icon is now yellow */
}

.info-note .note-header {
    color: var(--neon-cyan);
}
.info-note .note-header i {
    color: var(--neon-cyan); /* This was already correct */
}

.note-header i {
    font-size: 1rem;
    filter: drop-shadow(0 0 5px currentColor);
}

.note-text {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.9rem;
    margin-left: 24px;
}

/* Custom scrollbar for notes content */
.notes-content::-webkit-scrollbar {
    width: 6px;
}

.notes-content::-webkit-scrollbar-track {
    background: rgba(0, 212, 255, 0.1); /* Changed to neon-blue */
    border-radius: 3px;
}

.notes-content::-webkit-scrollbar-thumb {
    background: var(--neon-cyan); /* Changed to neon-cyan */
    border-radius: 3px;
}

.notes-content::-webkit-scrollbar-thumb:hover {
    background: #00ffff; /* Brighter cyan on hover */
}

.about-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    animation: fadeIn 0.3s ease forwards;
    overflow-y: auto;
    padding: 24px 12px;
}

.about-modal-content {
    width: min(800px, 95%);
    max-height: calc(100vh - 48px);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    color: var(--text-primary);
    border-radius: 20px;
    border: 1px solid var(--border-glow);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5), var(--shadow-glow);
    overflow: auto;
    animation: fadeInUp 0.4s ease backwards;
}

.about-modal-header {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 1;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-glow);
    background: inherit;
    backdrop-filter: inherit;
    border-radius: 20px 20px 0 0;
}

.about-modal-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.4rem;
    color: var(--neon-cyan);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-modal-btn {
    border: none;
    background: none;
    color: var(--neon-cyan);
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 50%;
}

.close-modal-btn:hover {
    color: var(--color-error);
    transform: rotate(90deg) scale(1.1);
}

.about-modal-body {
    padding: 25px;
    line-height: 1.6;
}

.about-modal-body h5 {
    color: var(--neon-cyan);
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    margin: 25px 0 15px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.about-modal-body h5:first-child {
    margin-top: 0;
}

.about-modal-body ul {
    margin: 15px 0;
    padding-left: 20px;
}

.about-modal-body li {
    margin-bottom: 10px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.about-modal-body strong {
    color: var(--neon-cyan);
    font-weight: 600;
}

/* Responsive adjustments for application notes */
@media (max-width: 768px) {
    .application-notes-panel.show {
        max-height: 400px;
    }
    
    .notes-content {
        padding: 20px;
        max-height: 300px;
    }
    
    .note-item {
        padding: 12px;
    }
    
    .notes-header {
        padding: 15px 20px;
    }
    
    .notes-header h4 {
        font-size: 1rem;
    }
    
    .note-text {
        margin-left: 0;
        margin-top: 8px;
    }
}

/* Animation for note items */
.note-item {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

.note-item:nth-child(1) { animation-delay: 0.1s; }
.note-item:nth-child(2) { animation-delay: 0.2s; }
.note-item:nth-child(3) { animation-delay: 0.3s; }
.note-item:nth-child(4) { animation-delay: 0.4s; }
.note-item:nth-child(5) { animation-delay: 0.5s; }
.note-item:nth-child(n+6) { animation-delay: 0.6s; }

/* The fadeInUp keyframes were already defined, so no need to repeat */

/* --- [REFACTORED] Input wrapper and validation icon styling --- */
.input-wrapper {
    position: relative;
}

/* Icon container, sits inside the input field */
.info-icon-container {
  position: absolute;
  right: 15px; /* Aligned with select arrow padding */
  top: 50%;
  transform: translateY(-50%);
  display: none; /* JS toggles to block when caution/error present */
  z-index: 2; /* Ensure it's above the input field */
}

/* The clickable 'i' button for validation info */
.validation-info-btn {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: all .2s ease;
  font-size: 1.1rem;
}

.validation-info-btn:hover {
    transform: scale(1.1);
    filter: brightness(1.2);
}

/* State variants using theme variables, changed icon color to neon-cyan */
.validation-info-btn.error {
    color: var(--color-error);
    background-color: rgba(255, 71, 87, 0.15);  /* Added for effect */
    box-shadow: var(--glow-error);              /* Added for red glow */
}

.validation-info-btn.caution {
    color: var(--color-caution);
    background-color: rgba(255, 193, 7, 0.15); /* Added for effect */
    box-shadow: var(--glow-caution);           /* Added for yellow glow */
}

/* If a select field has an error, move icon to not overlap arrow */
.select-wrapper .info-icon-container {
    right: 50px;
}

/* --- [REFACTORED] Validation Help Modal Styling --- */


@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.validation-modal {
  position: fixed;
  inset: 0;
  display: none;         /* JS toggles to flex */
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 15, 0.7); /* Thematic overlay */
  backdrop-filter: blur(5px);
  z-index: 1000;         /* Ensure above all other content */
  animation: fadeIn 0.3s ease forwards; /* Added fade-in animation */
  overflow-y: auto;
  padding: 24px 12px;
}

.validation-modal-content {
  width: min(680px, 92%);
  background: var(--glass-bg); /* Use glass theme background */
  backdrop-filter: blur(20px);
  color: var(--text-primary);
  border-radius: 15px; /* Match other panels */
  border: 1px solid var(--border-glow); /* Match other panels */
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.5), var(--shadow-glow); /* Deeper shadow */
  overflow: auto; /* To contain header background */
  animation: fadeInUp 0.4s ease backwards; /* Use existing animation */
  max-height: calc(100vh - 64px);
  max-height: calc(100dvh - 64px);
  
}

/* Add state-specific borders to the modal, but keep title color consistent */
.validation-modal.is-error .validation-modal-content {
    border-color: var(--color-error);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5), var(--glow-error);
}
.validation-modal.is-caution .validation-modal-content {
    border-color: var(--color-caution);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5), var(--glow-caution);
}

.validation-modal-header {
  display: flex;
  position: sticky;
  top: 0;
  z-index: 1;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-glow);
  background: inherit;
  backdrop-filter: inherit;
}
.validation-modal.is-error .validation-modal-header {
    border-bottom-color: var(--color-error);
    background: rgba(255, 71, 87, 0.1);
}
.validation-modal.is-caution .validation-modal-header {
    border-bottom-color: var(--color-caution);
    background: rgba(255, 193, 7, 0.1);
}

/* Style for a title within the modal header - Changed to neon-cyan */
.validation-modal-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    color: var(--neon-cyan); /* Changed to neon-cyan */
    text-transform: uppercase;
    letter-spacing: 1px;
}
/* No need for state-specific title colors if we want them all neon-cyan */
/* .validation-modal.is-error .validation-modal-title { color: var(--color-error); } */
/* .validation-modal.is-caution .validation-modal-title { color: var(--color-caution); } */


.validation-modal-body {
    padding: 20px;
    line-height: 1.6;
}

.close-modal-btn {
  border: none;
  background: none;
  color: var(--neon-cyan); /* Changed to neon-cyan */
  cursor: pointer;
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.close-modal-btn:hover {
  color: var(--color-error); /* Keep error color for closing for contrast, or change to neon-green */
  transform: rotate(90deg) scale(1.1);
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* --- Utility classes --- */
/* Use a simpler, more common class name for hiding elements */
.hidden {
  display: none !important;
}

/* Suggestions moved into results section */
.suggestions-moved {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(138, 43, 226, 0.3);
}

/* Results Action Buttons Container */
.results-actions-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 212, 255, 0.2);
}

/* Results Action Buttons (Copy & Export PDF) */
.results-action-btn {
  background: var(--gradient-accent);
  border: none;
  padding: 14px 28px;
  border-radius: 10px;
  color: var(--text-primary);
  font-family: 'Orbitron', monospace;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3);
  min-width: 180px;
  justify-content: center;
}

.results-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 212, 255, 0.5);
}

/* Mobile responsive */
@media (max-width: 600px) {
  .results-actions-container {
    flex-direction: column;
    gap: 15px;
  }

  .results-action-btn {
    width: 100%;
  }
}

/* ===================================================================
   COMPATIBILITY ANALYSIS PANEL STYLING
   ================================================================= */

.compatibility-analysis-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(0, 200, 83, 0.3);
    border-radius: 15px;
    padding: 0;
    margin-top: 20px;
    box-shadow: 0 10px 30px rgba(0, 200, 83, 0.2);
    overflow: hidden;
}

.compatibility-analysis-panel .notes-header {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 152, 0, 0.1) 100%);
    padding: 15px 20px;
    border-radius: 10px 10px 0 0;
    border-bottom: 2px solid rgba(255, 193, 7, 0.3);
}

.compatibility-analysis-panel .notes-header h4 {
    margin: 0;
    color: #ff9800;
    font-family: 'Exo 2', sans-serif;
    font-weight: 600;
    letter-spacing: 1px;
}

.compatibility-analysis-panel .notes-content {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

/* Recommended Upgrade Path Cards */
.recommended-upgrade-paths-section {
    margin-bottom: 25px;
    padding: 20px;
    border-radius: 12px;
    border-left: 5px solid #00c853;
    background: linear-gradient(135deg, rgba(0, 200, 83, 0.08) 0%, rgba(100, 221, 23, 0.05) 100%);
    border-width: 1px 1px 1px 5px;
    border-style: solid;
    border-color: rgba(0, 200, 83, 0.4) rgba(0, 200, 83, 0.4) rgba(0, 200, 83, 0.4) #00c853;
    box-shadow: 0 2px 8px rgba(0, 200, 83, 0.15);
}

.recommended-upgrade-paths-section .section-header {
    color: #00c853;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.recommended-upgrade-paths-section .section-intro {
    margin-bottom: 15px;
    color: var(--text-secondary);
    font-style: italic;
}

.upgrade-path-card {
    margin-bottom: 20px;
    padding: 20px;
    background: rgba(0, 200, 83, 0.1);
    border-radius: 10px;
    border: 2px solid rgba(0, 200, 83, 0.3);
    box-shadow: 0 3px 10px rgba(0, 200, 83, 0.15);
}

.upgrade-path-card .config-header {
    font-size: 1.1em;
    color: #00c853;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(0, 200, 83, 0.2);
}

.upgrade-path-pto-section {
    margin-bottom: 14px;
    padding: 14px;
    background: rgba(76, 175, 80, 0.1);
    border-left: 4px solid #4caf50;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.upgrade-path-pump-section {
    margin-bottom: 14px;
    padding: 14px;
    background: rgba(33, 150, 243, 0.1);
    border-left: 4px solid #2196f3;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.upgrade-path-performance-section {
    padding: 14px;
    background: rgba(0, 200, 83, 0.1);
    border-radius: 6px;
    border: 2px dashed rgba(0, 200, 83, 0.4);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.subsection-header {
    margin-bottom: 8px;
}

.subsection-header strong {
    font-size: 1.05em;
}

.subsection-content {
    font-size: 0.92em;
    color: var(--text-secondary);
    margin-left: 26px;
    line-height: 1.8;
}

/* Badges for compatibility indicators */
.mount-badge {
    background: #4caf50;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    margin-left: 8px;
    font-weight: 600;
}

.mount-badge.different {
    background: #ff9800;
}

.compatibility-badge {
    color: #4caf50;
    font-weight: 600;
}

.compatibility-badge.warning {
    color: #ff9800;
}

/* Alternative PTO Options Section */
.alternative-ptos-section {
    margin-bottom: 20px;
    padding: 18px;
    border-radius: 10px;
    border-left: 4px solid #4caf50;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.08) 0%, rgba(76, 175, 80, 0.04) 100%);
    border-width: 1px 1px 1px 4px;
    border-style: solid;
    border-color: rgba(76, 175, 80, 0.3) rgba(76, 175, 80, 0.3) rgba(76, 175, 80, 0.3) #4caf50;
    box-shadow: 0 2px 6px rgba(76, 175, 80, 0.1);
}

.alternative-ptos-section .section-header {
    color: #4caf50;
    margin-bottom: 14px;
    font-size: 1.05em;
    font-weight: 700;
}

.alternative-pto-card {
    margin-bottom: 14px;
    padding: 14px;
    border-left: 3px solid rgba(76, 175, 80, 0.5);
    background: rgba(76, 175, 80, 0.1);
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.alternative-pto-card .card-title {
    margin-bottom: 8px;
    color: #4caf50;
    font-size: 1.02em;
    font-weight: 600;
}

.alternative-pto-card .card-details {
    font-size: 0.92em;
    color: var(--text-secondary);
    margin-left: 18px;
    line-height: 1.8;
}

/* Alternative Pump Options Section */
.alternative-pumps-section {
    margin-bottom: 20px;
    padding: 18px;
    border-radius: 10px;
    border-left: 4px solid #2196f3;
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.08) 0%, rgba(33, 150, 243, 0.04) 100%);
    border-width: 1px 1px 1px 4px;
    border-style: solid;
    border-color: rgba(33, 150, 243, 0.3) rgba(33, 150, 243, 0.3) rgba(33, 150, 243, 0.3) #2196f3;
    box-shadow: 0 2px 6px rgba(33, 150, 243, 0.1);
}

.alternative-pumps-section .section-header {
    color: #2196f3;
    margin-bottom: 14px;
    font-size: 1.05em;
    font-weight: 700;
}

.alternative-pump-card {
    margin-bottom: 14px;
    padding: 14px;
    border-left: 3px solid rgba(33, 150, 243, 0.5);
    background: rgba(33, 150, 243, 0.1);
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.alternative-pump-card .card-title {
    margin-bottom: 8px;
    color: #2196f3;
    font-size: 1.02em;
    font-weight: 600;
}

.alternative-pump-card .card-details {
    font-size: 0.92em;
    color: var(--text-secondary);
    margin-left: 18px;
    line-height: 1.8;
}

/* Compatibility Constraint Notes */
.compatibility-constraint-note {
    margin-bottom: 16px;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.08) 0%, rgba(255, 152, 0, 0.04) 100%);
    border-width: 1px 1px 1px 4px;
    border-style: solid;
    border-color: rgba(255, 193, 7, 0.3) rgba(255, 193, 7, 0.3) rgba(255, 193, 7, 0.3) #ffc107;
    box-shadow: 0 2px 5px rgba(255, 193, 7, 0.1);
}

.compatibility-constraint-note .note-header {
    color: #ff9800;
    margin-bottom: 10px;
    font-weight: 700;
}

.compatibility-constraint-note .note-content {
    color: var(--text-secondary);
    line-height: 1.7;
    font-family: 'Exo 2', sans-serif;
}

/* Toggle button for compatibility analysis */
#show-compatibility-btn {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    border: none;
    padding: 14px 28px;
    border-radius: 10px;
    color: white;
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.3);
    min-width: 280px;
    justify-content: center;
    margin-top: 10px;
}

#show-compatibility-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.5);
}

/* Print styles for PDF export */
@media print {
  /* Hide non-essential elements */
  .background-animation,
  .main-header,
  .calculation-form,
  .chat-interface,
  .results-actions-container,
  .title-info-btn,
  .submit-container,
  .close-modal-btn,
  .validation-info-btn,
  .info-btn,
  .suggestion-section,
  .compatibility-analysis-panel,
  #show-compatibility-btn {
    display: none !important;
  }

  /* Make results section clean */
  .result-section,
  .suggestions-moved {
    background: white;
    color: black;
    border: none;
    box-shadow: none;
    margin: 0;
    padding: 20px;
  }

  .result-section h3,
  .suggestions-moved h3 {
    color: black;
    text-align: left;
    border-bottom: 2px solid black;
    padding-bottom: 10px;
  }

  .suggestions-moved {
    border-top: 2px solid black;
    margin-top: 20px;
    padding-top: 20px;
  }

  /* Clean text colors */
  .body-text,
  .body-text p,
  .body-text li,
  .body-text strong {
    color: black !important;
  }

  /* Status indicators */
  .status-pass {
    color: green !important;
  }

  .status-warning {
    color: #ff8c00 !important; /* Dark orange for print visibility */
  }

  .status-fail {
    color: red !important;
  }

  /* Remove animations and effects */
  * {
    animation: none !important;
    transition: none !important;
    box-shadow: none !important;
  }

  /* Page formatting */
  @page {
    margin: 1cm;
  }

  body {
    background: white;
  }

  .container {
    max-width: 100%;
  }
}

/* ============================================================================
   TRAFFIC LIGHT SUMMARY
   ============================================================================ */

.traffic-light-summary {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 24px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-family: 'Exo 2', sans-serif;
    animation: fadeSlideIn 0.4s ease-out;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.traffic-light-indicator {
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.traffic-light-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.traffic-light-status {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.traffic-light-detail {
    font-size: 12px;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Green - VIABLE */
.traffic-green {
    background: linear-gradient(135deg, rgba(57, 255, 20, 0.15) 0%, rgba(0, 200, 83, 0.1) 100%);
    border: 1px solid rgba(57, 255, 20, 0.4);
    box-shadow: 0 4px 20px rgba(57, 255, 20, 0.15);
}

.traffic-green .traffic-light-indicator {
    color: #39ff14;
    text-shadow: 0 0 20px rgba(57, 255, 20, 0.6);
}

.traffic-green .traffic-light-status {
    color: #39ff14;
}

.traffic-green .traffic-light-detail {
    color: #a5d6a7;
}

/* Amber - CONDITIONALLY ACCEPTABLE */
.traffic-amber {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.15) 0%, rgba(255, 152, 0, 0.1) 100%);
    border: 1px solid rgba(255, 193, 7, 0.4);
    box-shadow: 0 4px 20px rgba(255, 193, 7, 0.15);
}

.traffic-amber .traffic-light-indicator {
    color: #ffc107;
    text-shadow: 0 0 20px rgba(255, 193, 7, 0.6);
}

.traffic-amber .traffic-light-status {
    color: #ffc107;
}

.traffic-amber .traffic-light-detail {
    color: #ffe082;
}

/* Red - NOT VIABLE */
.traffic-red {
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.15) 0%, rgba(244, 67, 54, 0.1) 100%);
    border: 1px solid rgba(255, 71, 87, 0.4);
    box-shadow: 0 4px 20px rgba(255, 71, 87, 0.15);
}

.traffic-red .traffic-light-indicator {
    color: #ff4757;
    text-shadow: 0 0 20px rgba(255, 71, 87, 0.6);
}

.traffic-red .traffic-light-status {
    color: #ff4757;
}

.traffic-red .traffic-light-detail {
    color: #ffcdd2;
}

/* ============================================================================
   STATUS BADGES
   ============================================================================ */

.status-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    padding: 12px;
    background: rgba(26, 26, 46, 0.5);
    border-radius: 10px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Exo 2', sans-serif;
    letter-spacing: 0.3px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.badge:hover {
    transform: translateY(-2px);
}

.badge i {
    font-size: 11px;
}

.badge-success {
    background: linear-gradient(135deg, rgba(57, 255, 20, 0.2) 0%, rgba(0, 200, 83, 0.15) 100%);
    color: #39ff14;
    border: 1px solid rgba(57, 255, 20, 0.4);
    box-shadow: 0 2px 10px rgba(57, 255, 20, 0.2);
}

.badge-success:hover {
    box-shadow: 0 4px 15px rgba(57, 255, 20, 0.3);
}

.badge-warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.2) 0%, rgba(255, 152, 0, 0.15) 100%);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.4);
    box-shadow: 0 2px 10px rgba(255, 193, 7, 0.2);
}

.badge-warning:hover {
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.badge-danger {
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.2) 0%, rgba(244, 67, 54, 0.15) 100%);
    color: #ff4757;
    border: 1px solid rgba(255, 71, 87, 0.4);
    box-shadow: 0 2px 10px rgba(255, 71, 87, 0.2);
}

.badge-danger:hover {
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.3);
}

/* ============================================================================
   AI ANALYSIS SECTION (JSON-formatted response)
   ============================================================================ */

.ai-analysis {
    background: rgba(26, 26, 46, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(0, 212, 255, 0.2);
    padding: 20px;
    margin-top: 10px;
}

.ai-summary {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    padding: 12px 16px;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 8px;
    border-left: 4px solid var(--neon-blue);
    margin-bottom: 16px;
    line-height: 1.5;
}

.ai-causes {
    margin-bottom: 16px;
}

.ai-causes strong {
    color: var(--neon-blue);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ai-causes ul {
    margin-top: 8px;
    padding-left: 20px;
}

.ai-causes li {
    color: var(--text-secondary);
    margin-bottom: 6px;
    line-height: 1.5;
}

.ai-actions {
    margin-bottom: 16px;
}

.ai-actions strong {
    color: #ffc107;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.action-item {
    margin: 12px 0;
    padding: 12px 16px;
    background: rgba(255, 193, 7, 0.08);
    border-radius: 8px;
    border-left: 3px solid #ffc107;
}

.action-text {
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.5;
}

/* Why? Button */
.why-btn {
    background: transparent;
    border: 1px solid rgba(0, 212, 255, 0.4);
    color: var(--neon-blue);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    margin-left: 10px;
    transition: all 0.2s ease;
    font-family: 'Exo 2', sans-serif;
}

.why-btn:hover {
    background: rgba(0, 212, 255, 0.15);
    border-color: var(--neon-blue);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.why-details {
    margin-top: 10px;
    padding: 12px;
    background: rgba(0, 212, 255, 0.05);
    border-radius: 6px;
    border: 1px dashed rgba(0, 212, 255, 0.2);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.why-details p {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}

.why-details p + p {
    margin-top: 8px;
}

.why-note {
    color: rgba(0, 212, 255, 0.8) !important;
    font-style: italic;
}

.ai-notes {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 212, 255, 0.15);
}

.ai-notes strong {
    color: #8a2be2;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ai-notes ul {
    margin-top: 8px;
    padding-left: 20px;
}

.ai-notes li {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 4px;
    line-height: 1.4;
}

/* Print styles for new components */
@media print {
    .traffic-light-summary {
        border: 2px solid #333;
        background: white !important;
        box-shadow: none !important;
    }

    .traffic-green .traffic-light-status,
    .traffic-green .traffic-light-indicator {
        color: #228B22 !important;
    }

    .traffic-amber .traffic-light-status,
    .traffic-amber .traffic-light-indicator {
        color: #FF8C00 !important;
    }

    .traffic-red .traffic-light-status,
    .traffic-red .traffic-light-indicator {
        color: #DC143C !important;
    }

    .status-badges {
        background: white !important;
        border: 1px solid #ccc;
    }

    .badge {
        background: white !important;
        border: 1px solid #333 !important;
        color: #333 !important;
    }

    .badge-success { border-color: #228B22 !important; }
    .badge-warning { border-color: #FF8C00 !important; }
    .badge-danger { border-color: #DC143C !important; }

    .why-btn {
        display: none !important;
    }

    .why-details {
        display: block !important;
        border: 1px solid #ccc;
        background: #f9f9f9 !important;
    }
}

/* ============================================================================
   CLEAN MINIMAL DESIGN - Status Bar & Recommendations
   ============================================================================ */

/* Status Bar - Simple one-line status */
.status-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-family: 'Exo 2', sans-serif;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-text {
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-issues {
    color: var(--text-secondary);
    font-size: 13px;
    margin-left: auto;
}

/* Status variants */
.status-bar.status-ok {
    background: rgba(57, 255, 20, 0.1);
    border: 1px solid rgba(57, 255, 20, 0.3);
}
.status-bar.status-ok .status-dot { background: #39ff14; box-shadow: 0 0 8px #39ff14; }
.status-bar.status-ok .status-text { color: #39ff14; }

.status-bar.status-warn {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
}
.status-bar.status-warn .status-dot { background: #ffc107; box-shadow: 0 0 8px #ffc107; }
.status-bar.status-warn .status-text { color: #ffc107; }

.status-bar.status-fail {
    background: rgba(255, 71, 87, 0.1);
    border: 1px solid rgba(255, 71, 87, 0.3);
}
.status-bar.status-fail .status-dot { background: #ff4757; box-shadow: 0 0 8px #ff4757; }
.status-bar.status-fail .status-text { color: #ff4757; }

/* Recommendations Container */
.recommendations-clean {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Recommendation Card - Clean & Minimal */
.rec-card {
    background: rgba(26, 26, 46, 0.5);
    border-radius: 10px;
    padding: 16px 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.rec-main {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.rec-check {
    color: #39ff14;
    font-size: 18px;
    font-weight: bold;
    flex-shrink: 0;
    margin-top: 2px;
}

.rec-circle {
    color: var(--text-secondary);
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.rec-content {
    flex-grow: 1;
}

.rec-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.rec-stats {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Primary recommendation highlight */
.rec-card.rec-primary {
    border-color: rgba(57, 255, 20, 0.3);
    background: linear-gradient(135deg, rgba(57, 255, 20, 0.08) 0%, rgba(26, 26, 46, 0.5) 100%);
}

/* Alternative recommendation (dimmer) */
.rec-card.rec-alt {
    opacity: 0.8;
}

/* OK status card */
.rec-card.rec-ok {
    border-color: rgba(57, 255, 20, 0.3);
    background: linear-gradient(135deg, rgba(57, 255, 20, 0.08) 0%, rgba(26, 26, 46, 0.5) 100%);
}

/* Details toggle button */
.details-btn {
    background: transparent;
    border: 1px solid rgba(0, 212, 255, 0.3);
    color: var(--neon-blue);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-family: 'Exo 2', sans-serif;
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.details-btn:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--neon-blue);
}

.details-btn i {
    font-size: 10px;
    transition: transform 0.2s ease;
}

/* Expanded specs */
.rec-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
    font-size: 12px;
    color: var(--text-secondary);
}

.rec-specs span {
    white-space: nowrap;
}

/* ============================================================================
   AI ENGINEERING EXPLANATION - Simplified
   ============================================================================ */

.ai-engineering-explanation {
    margin-top: 16px;
    background: rgba(26, 26, 46, 0.4);
    border-radius: 10px;
    border: 1px solid rgba(138, 43, 226, 0.2);
    overflow: hidden;
}

.eng-explanation {
    padding: 16px 20px;
}

.eng-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #8a2be2;
    font-weight: 600;
    font-size: 12px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.eng-header i {
    font-size: 14px;
}

.eng-body {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 13px;
}

/* Technical Insight Toggle */
.tech-insight {
    border-top: 1px solid rgba(138, 43, 226, 0.15);
}

.insight-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: transparent;
    border: none;
    color: #8a2be2;
    font-family: 'Exo 2', sans-serif;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.insight-toggle:hover {
    background: rgba(138, 43, 226, 0.1);
}

.insight-toggle .toggle-icon {
    margin-left: auto;
    font-size: 10px;
    transition: transform 0.2s ease;
}

.insight-detail {
    padding: 12px 20px;
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 12px;
    background: rgba(138, 43, 226, 0.05);
}

/* Print styles */
@media print {
    .status-bar {
        border: 2px solid #333;
        background: white !important;
    }
    .status-bar.status-ok .status-text { color: #228B22 !important; }
    .status-bar.status-fail .status-text { color: #DC143C !important; }

    .rec-card {
        border: 1px solid #333;
        background: white !important;
    }

    .ai-engineering-explanation {
        border: 1px solid #8a2be2;
        background: white !important;
    }

    .insight-toggle {
        display: none !important;
    }

    .insight-detail {
        display: block !important;
        border: 1px solid #ddd;
        background: #faf5ff !important;
    }
}
