/* ============================================
   CSS Custom Properties (Design Tokens)
   ============================================ */
:root {
    /* Primary Colors */
    --color-primary: #6b8e23;
    --color-accent: #8fbc1e;
    
    /* Text Colors */
    --color-text-light: #c8d4a0;
    --color-text-muted: #95a585;
    
    /* Background Colors */
    --color-bg-dark: #2a3532;
    
    /* Border Colors */
    --color-border: #3a4a45;
    --color-border-light: #4a5a52;
    
    /* Semantic Colors */
    --color-error: #a85050;
    --color-purple: #8f69bc;
    
    /* Border Radius */
    --radius-sm: 2px;
    --radius-md: 4px;
    --radius-lg: 8px;
    
    /* CLS Prevention: Magic number for app min-height
       This value accounts for the typical height of all visible components
       to prevent Cumulative Layout Shift during initial page load */
    --app-min-height: 1166px;
}

* {
    box-sizing: border-box;
}
html {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1f1e 0%, var(--color-bg-dark) 100%);
    background-attachment: fixed;
}
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: 'Segoe UI', 'Roboto', Arial, sans-serif;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    background: transparent;
    color: #e8e8e8;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Flexbox Layout: main container grows to fill space */
main {
    display: flex;
    flex-direction: column;
}

/* CLS Prevention: Reserve space for dynamic content */
#app {
    position: relative;
    left: 0;
    right: 0;
    width: 100%;
    min-height: var(--app-min-height);
}

#loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    min-height: var(--app-min-height);
    height: 100%;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 16px;
}

#rocketSuggestion {
    transform: translateZ(0);
}
#rocketSuggestion:not(.cls-hidden) {
    min-height: 60px;
}

#rangeIndicator:not(.cls-hidden) {
    min-height: 40px;
}

.result:not(.cls-hidden) {
    min-height: 200px;
}

#historyPanel:not(.cls-hidden) {
    min-height: 100px;
}

#ffeContainer:not(.cls-hidden) {
    min-height: 150px;
}

#fireCorrectionWidget:not(.cls-hidden) {
    min-height: 180px;
}
.header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--color-primary);
    /* LCP optimization */
    contain: layout style;
}
.logo {
    width: 80px;
    height: auto;
    filter: brightness(0) invert(1) drop-shadow(2px 2px 4px rgba(0,0,0,0.5));
}
h1 {
    color: var(--color-text-light);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    font-size: 1.8em;
    text-align: center;
    /* LCP optimization */
    contain: layout style paint;
    font-display: swap;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
h2 {
    color: #b8c7a0;
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 25px;
    margin-bottom: 15px;
    border-left: 4px solid var(--color-primary);
    padding-left: 12px;
}
.container {
    background: rgba(35, 45, 42, 0.85);
    padding: 25px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    margin-bottom: 20px;
    width: 100%;
    max-width: 100%;
    position: relative;
    transform: none;
}
.form-group {
    margin-bottom: 20px;
}
label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #b8c7a0;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
input, select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--color-bg-dark);
    color: #e8e8e8;
    transition: border-color 0.2s;
}
input:focus, select:focus {
    outline: none;
    border-color: var(--color-primary);
    background: #323e3a;
}
.row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
button {
    background: linear-gradient(180deg, #7a9f35 0%, var(--color-primary) 100%);
    color: white;
    padding: 14px 30px;
    border: 1px solid #5a7e1f;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
button:hover {
    background: linear-gradient(180deg, #8ab040 0%, #7a9f35 100%);
    box-shadow: 0 3px 8px rgba(0,0,0,0.4);
}
button:active {
    transform: translateY(1px);
}
button:disabled {
    background: #4a5550;
    border-color: #3a4540;
    cursor: not-allowed;
    opacity: 0.5;
}
.bug-report-btn {
    display: inline-block;
    background: linear-gradient(180deg, var(--color-error) 0%, #903030 100%);
    color: white;
    padding: 8px 16px;
    border: 1px solid #802020;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.bug-report-btn:hover {
    background: linear-gradient(180deg, #b86060 0%, var(--color-error) 100%);
    box-shadow: 0 3px 6px rgba(0,0,0,0.4);
    transform: translateY(-1px);
}
.bug-report-btn:active {
    transform: translateY(0);
}
.btn-press {
    transition: all 0.15s ease;
}
.btn-press:active {
    transform: scale(0.95);
    box-shadow: 0 0 20px rgba(143, 188, 30, 0.8);
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}
.result {
    background: rgba(35, 45, 42, 0.9);
    padding: 20px;
    margin-top: 20px;
    border-radius: var(--radius-md);
    visibility: hidden;
    opacity: 0;
    border: 1px solid var(--color-border);
    min-height: 450px;
    transition: opacity 0.2s ease;
}
.result.active {
    visibility: visible;
    opacity: 1;
}
.result.success {
    background: rgba(35, 45, 42, 0.85);
    border: 2px solid var(--color-primary);
}
.result.error {
    background: rgba(35, 45, 42, 0.85);
    border: 2px solid var(--color-error);
}
.result h2 {
    margin-top: 0;
    color: #d8e4b0;
}
.solution-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 15px;
}
.solution-grid.weapons {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.solution-item {
    background: rgba(20, 25, 22, 0.8);
    padding: 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border-light);
}
.solution-item strong {
    display: block;
    color: #a8b898;
    font-size: 11px;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.solution-item .value {
    font-size: 22px;
    color: #e8f4d0;
    font-weight: bold;
}
.solution-item.weapon-mortar {
    border-left: 3px solid var(--color-accent);
}
.solution-item.weapon-howitzer {
    border-left: 3px solid #d4a06b;
}
.solution-item.weapon-mlrs {
    border-left: 3px solid #d46b6b;
}
.solution-item .weapon-title {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 13px;
}
.solution-item.weapon-mortar .weapon-title {
    color: var(--color-accent);
}
.solution-item.weapon-howitzer .weapon-title {
    color: #d4a06b;
}
.solution-item.weapon-mlrs .weapon-title {
    color: #d46b6b;
}
.solution-item .weapon-list {
    color: #d8e8c8;
    font-size: 12px;
    line-height: 1.5;
}
.weapon-list a {
    color: #a8d8f0;
    text-decoration: none;
    transition: color 0.2s;
}
.weapon-list a:hover {
    color: #c8f0ff;
    text-decoration: underline;
}
.info {
    background: rgba(60, 80, 95, 0.3);
    border: 1px solid #4a6a75;
    padding: 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 13px;
    color: #b8c8d0;
}
.info.info-ffe {
    background: rgba(60, 50, 80, 0.4);
    border-color: rgba(143, 105, 188, 0.3);
}

/* Feature Banner */
.feature-banner {
    background: linear-gradient(135deg, rgba(107, 142, 35, 0.25) 0%, rgba(107, 142, 35, 0.15) 100%);
    border: 2px solid var(--color-primary);
    border-radius: 6px;
    padding: 15px 20px;
    margin: 20px auto;
    max-width: 900px;
    box-shadow: 0 4px 12px rgba(107, 142, 35, 0.2);
}
.feature-banner-inner {
    display: flex;
    align-items: center;
    gap: 15px;
}
.feature-banner-icon {
    font-size: 32px;
    line-height: 1;
}
.feature-banner-content {
    flex: 1;
}
.feature-banner-title {
    color: var(--color-accent);
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.feature-banner-text {
    color: var(--color-text-light);
    font-size: 14px;
    line-height: 1.5;
}
.feature-banner-text strong {
    color: var(--color-accent);
}

/* Share Modal */
.share-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}
.share-modal {
    background: rgba(20, 25, 22, 0.98);
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}
.share-modal-header {
    background: linear-gradient(180deg, var(--color-primary) 0%, #5a7a1c 100%);
    padding: 15px 20px;
    border-bottom: 1px solid var(--color-accent);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.share-modal-header h2 {
    margin: 0;
    color: white;
    font-size: 18px;
    font-weight: 700;
    border-left: none;
    padding-left: 0;
}
.share-modal-close {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 5px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    width: auto;
    margin: 0;
}
.share-modal-body {
    padding: 20px;
}
.share-modal-section h3 {
    color: var(--color-text-light);
    font-size: 15px;
    margin: 0 0 10px 0;
    font-weight: 600;
}
.share-modal-section p {
    color: var(--color-text-muted);
    font-size: 12px;
    margin: 0 0 10px 0;
}
.share-modal-error {
    background: rgba(200, 80, 80, 0.15);
    border: 1px solid rgba(200, 80, 80, 0.4);
    border-radius: var(--radius-md);
    padding: 12px;
    margin-bottom: 15px;
    color: #ff6b6b;
    font-size: 13px;
}
.share-modal-input-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.share-modal-input {
    flex: 1;
    min-width: 250px;
    padding: 10px;
    background: rgba(20, 25, 22, 0.8);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    color: var(--color-text-light);
    font-size: 12px;
    font-family: monospace;
    user-select: all;
}
.share-modal-textarea {
    width: 100%;
    min-height: 100px;
    padding: 10px;
    background: rgba(20, 25, 22, 0.8);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    color: var(--color-text-light);
    font-size: 12px;
    font-family: monospace;
    resize: vertical;
    margin-bottom: 10px;
}
.share-modal-divider {
    border-top: 1px solid var(--color-border);
    margin: 20px 0;
}
.share-modal-footer {
    background: rgba(20, 25, 22, 0.6);
    padding: 15px 20px;
    border-top: 1px solid var(--color-border);
    text-align: right;
}
.share-modal-footer-btn {
    padding: 8px 20px;
    background: linear-gradient(180deg, #555 0%, #444 100%);
    border: 1px solid #666;
    border-radius: var(--radius-md);
    color: var(--color-text-light);
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
    width: auto;
    margin: 0;
}

/* FFE Container */
.ffe-container {
    background: linear-gradient(135deg, rgba(55, 45, 70, 0.95) 0%, rgba(45, 35, 60, 0.95) 100%);
    padding: 15px;
    border-radius: var(--radius-md);
    margin-top: 10px;
    border: 1px solid rgba(143, 105, 188, 0.3);
    transition: opacity 0.2s ease, height 0.2s ease;
    overflow: hidden;
}
.ffe-toggle-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #d4c8e0;
    font-size: 13px;
    font-weight: 600;
}
.ffe-toggle-label input {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}
.ffe-widget h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #d4c8e0;
}
.ffe-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}
.ffe-form-group {
    margin-bottom: 10px;
}
.ffe-form-group label {
    display: block;
    color: #c8b8d8;
    font-size: 13px;
    margin-bottom: 5px;
    font-weight: 600;
}
.ffe-form-group small {
    color: #a89fb8;
    display: block;
    margin-top: 3px;
    font-size: 11px;
}
.ffe-input,
.ffe-select {
    width: 100%;
    padding: 8px;
    background: rgba(20, 15, 25, 0.8);
    border: 1px solid #5a4a62;
    border-radius: 3px;
    color: #d4c8e0;
    font-size: 13px;
}
.ffe-btn {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    background: linear-gradient(180deg, var(--color-purple) 0%, #7a58a8 100%);
    border: 1px solid #9f79cc;
    border-radius: var(--radius-md);
    color: white;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
}
.ffe-btn-secondary {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    background: linear-gradient(180deg, #666 0%, #555 100%);
    border: 1px solid #777;
    border-radius: var(--radius-md);
    color: white;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
}

/* Fire Correction Widget */
.correction-widget {
    background: linear-gradient(135deg, rgba(40, 55, 45, 0.95) 0%, rgba(30, 45, 35, 0.95) 100%);
    padding: 15px;
    border-radius: var(--radius-md);
    margin-top: 10px;
    border: 1px solid rgba(107, 142, 35, 0.3);
    transition: opacity 0.2s ease, height 0.2s ease;
    overflow: hidden;
}
.correction-widget h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: var(--color-text-light);
}
.correction-toggle {
    display: flex;
    align-items: center;
    color: #a8b898;
    font-size: 13px;
    cursor: pointer;
}
.correction-toggle input {
    margin-right: 8px;
    width: auto;
    height: auto;
}
.correction-fo-controls {
    margin-bottom: 12px;
    padding: 10px;
    background: rgba(15, 20, 17, 0.9);
    border-radius: 3px;
    border: 1px solid var(--color-bg-dark);
}
.correction-bearing-display {
    margin-top: 8px;
    padding: 6px;
    background: rgba(40, 55, 45, 0.8);
    border-radius: 3px;
    color: var(--color-accent);
    font-size: 11px;
}
.correction-warning {
    margin-top: 8px;
    padding: 6px;
    background: rgba(168, 80, 80, 0.2);
    border: 1px solid var(--color-error);
    border-radius: 3px;
    color: #ff6b6b;
    font-size: 11px;
}
.correction-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}
.correction-form-group label {
    display: block;
    color: #a8b898;
    font-size: 13px;
    margin-bottom: 5px;
    font-weight: 600;
}
.correction-form-group small {
    color: #999;
    display: block;
    margin-top: 3px;
    font-size: 11px;
}
.correction-input {
    width: 100%;
    padding: 8px;
    background: rgba(20, 25, 22, 0.8);
    border: 1px solid var(--color-border-light);
    border-radius: 3px;
    color: var(--color-text-light);
    font-size: 13px;
}
.correction-btn {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    background: linear-gradient(180deg, #555 0%, #444 100%);
    border: 1px solid var(--color-accent);
    border-radius: var(--radius-md);
    color: white;
    font-weight: 600;
    cursor: not-allowed;
    font-size: 13px;
    transition: all 0.15s ease;
    opacity: 0.5;
}
.correction-btn:enabled {
    background: linear-gradient(180deg, var(--color-primary) 0%, #5a7a1c 100%);
    cursor: pointer;
    opacity: 1;
}
.correction-btn-undo {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    background: linear-gradient(180deg, #d94a4a 0%, #c93a3a 100%);
    border: 1px solid #ff6b6b;
    border-radius: var(--radius-md);
    color: white;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    margin-top: 20px;
    color: var(--color-text-muted);
    font-size: 12px;
    border-top: 1px solid var(--color-border);
}
.footer p {
    margin: 10px 0;
}
.footer p:first-child {
    margin: 15px 0;
}
.footer a {
    color: var(--color-accent);
    text-decoration: none;
}
.footer a:hover {
    text-decoration: underline;
}
.footer-discord {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.footer-discord img {
    height: 16px;
    width: 16px;
    vertical-align: middle;
}

/* Helper classes for common patterns */
.no-margin-top {
    margin-top: 0;
}
.history-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.toggle-label {
    font-weight: 500;
    color: #b8c7a0;
    text-align: center;
}
.coord-hint {
    color: #999;
    display: block;
    margin-top: -15px;
}

/* Range Indicator */
.range-indicator {
    margin: 10px 0;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

/* Rocket Suggestion Banner */
.suggestion-banner {
    margin-top: 10px;
    padding: 10px;
    background: linear-gradient(135deg, rgba(143, 188, 30, 0.15) 0%, rgba(107, 142, 35, 0.15) 100%);
    border: 1px solid rgba(143, 188, 30, 0.4);
    border-radius: var(--radius-md);
}
.suggestion-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.suggestion-content {
    flex: 1;
}
.suggestion-title {
    color: var(--color-accent);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 3px;
}
.suggestion-text {
    color: var(--color-text-light);
    font-size: 11px;
}
.suggestion-buttons {
    display: flex;
    gap: 6px;
}
.suggestion-btn-accept {
    padding: 8px 12px;
    background: linear-gradient(180deg, var(--color-accent) 0%, #7aaa1a 100%);
    border: 1px solid #9fcc2e;
    border-radius: 3px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    font-size: 11px;
    white-space: nowrap;
    margin: 0;
    width: auto;
}
.suggestion-btn-dismiss {
    padding: 8px 12px;
    background: rgba(100, 100, 100, 0.3);
    border: 1px solid rgba(150, 150, 150, 0.4);
    border-radius: 3px;
    color: #aaa;
    font-weight: 600;
    cursor: pointer;
    font-size: 11px;
    white-space: nowrap;
    margin: 0;
    width: auto;
}

/* Button Row */
.btn-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.btn-primary-wide {
    flex: 3;
}
.btn-secondary-flex {
    flex: 1;
    background: linear-gradient(180deg, #666 0%, #555 100%);
}
.btn-share {
    flex: 1;
    background: linear-gradient(180deg, var(--color-primary) 0%, #5a7a1c 100%);
    border: 1px solid var(--color-accent);
}

/* JS-controlled visibility */
.js-hidden {
    display: none;
}

/* Additional utility classes */
.no-margin {
    margin: 0;
}
.mb-0 {
    margin-bottom: 0;
}
.mb-12 {
    margin-bottom: 12px;
}
.mb-25 {
    margin-bottom: 25px;
}
.w-full {
    width: 100%;
}
.btn-copy {
    padding: 10px 15px;
    white-space: nowrap;
}
.correction-grid-sm {
    gap: 8px;
    margin-bottom: 8px;
}
.toggle-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
    padding: 15px;
    background: rgba(107, 142, 35, 0.1);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 100%;
}
.toggle-buttons {
    display: flex;
    gap: 10px;
}
.toggle-option {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    font-size: 14px;
    flex: 1;
    text-align: center;
    white-space: nowrap;
}
.toggle-option.active {
    background: var(--color-primary);
    border-color: var(--color-accent);
    box-shadow: 0 2px 8px rgba(107, 142, 35, 0.4);
}
.toggle-option:hover:not(.active) {
    background: rgba(255, 255, 255, 0.15);
}
.coord-mode {
    display: none;
}
.coord-mode.active {
    display: block;
}
.history-panel {
    background: rgba(35, 45, 42, 0.85);
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    margin-bottom: 20px;
    max-height: 300px;
    overflow-y: auto;
    width: 100%;
    max-width: 100%;
    transition: opacity 0.2s ease, height 0.2s ease;
}
.history-item {
    background: rgba(20, 25, 22, 0.8);
    padding: 12px;
    margin-bottom: 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border-light);
    cursor: pointer;
    transition: all 0.2s;
}
.history-item:hover {
    background: rgba(30, 35, 32, 0.9);
    border-color: var(--color-primary);
}
.history-item.active {
    border: 2px solid var(--color-primary);
    background: rgba(40, 55, 45, 0.9);
}
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}
.history-title {
    color: var(--color-text-light);
    font-weight: 600;
    font-size: 13px;
}
.history-time {
    color: var(--color-text-muted);
    font-size: 11px;
}
.history-details {
    color: #b8c8d0;
    font-size: 12px;
    margin-top: 5px;
}
.history-delete {
    background: transparent;
    border: none;
    color: var(--color-error);
    cursor: pointer;
    padding: 4px 8px;
    font-size: 16px;
    margin: 0;
    width: auto;
    transition: all 0.2s;
}
.history-delete:hover {
    color: #ff6b6b;
    transform: scale(1.2);
}
.clear-history-btn {
    background: linear-gradient(180deg, var(--color-error) 0%, #984040 100%);
    border-color: #883030;
    padding: 8px 16px;
    font-size: 12px;
    margin-top: 10px;
}
.observer-label {
    display: block;
    color: var(--color-text-muted);
    font-size: 11px;
    margin-bottom: 3px;
}
.observer-input {
    width: 100%;
    padding: 6px;
    background: rgba(20, 25, 22, 0.8);
    border: 1px solid var(--color-border-light);
    border-radius: 3px;
    color: var(--color-text-light);
    font-size: 12px;
}
.observer-input-grid {
    font-family: monospace;
}
#ffeContainer {
    transition: opacity 0.2s ease, height 0.2s ease;
    overflow: hidden;
}

#fireCorrectionWidget {
    transition: opacity 0.2s ease, height 0.2s ease;
    overflow: hidden;
}

/* ============================================
   Consolidated Hidden State
   Single implementation for CLS-managed hiding
   ============================================ */
.cls-hidden {
    display: none !important;
}

#rocketSuggestion {
    display: none;
    position: relative;
    z-index: 10;
    min-height: auto;
}
#rocketSuggestion.show {
    display: block !important;
    animation: slideDown 0.3s ease;
    visibility: visible !important;
    opacity: 1 !important;
}
#rocketSuggestion[style*="display: block"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}
@media (max-width: 600px) {
    .row {
        grid-template-columns: 1fr;
    }
    .solution-grid {
        grid-template-columns: 1fr;
    }
    #rocketSuggestion {
        margin-top: 15px !important;
        margin-bottom: 15px !important;
        padding: 12px !important;
    }
    #rocketSuggestion > div {
        flex-direction: column !important;
        gap: 12px !important;
        align-items: stretch !important;
    }
    #rocketSuggestion .suggestion-buttons {
        width: 100%;
        flex-direction: row !important;
        justify-content: stretch !important;
    }
    #rocketSuggestion .suggestion-buttons button {
        flex: 1;
        padding: 10px 15px !important;
        font-size: 12px !important;
    }
}
