/* !!!!prompt/styles.css */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', sans-serif;
    background-color: #fbfbfd;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #e5e7eb; border-radius: 10px; }
::-webkit-scrollbar-thumb { background: #9ca3af; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #6b7280; }
.step-section { display: none; }
.step-section.active { display: block; }

.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 12px 24px;
    color: white;
    border-radius: 0.375rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 1050;
    opacity: 0;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    font-size: 0.9rem;
}
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.toast.error { background-color: #ef4444; }
.toast.success { background-color: #22c55e; }
.toast.info { background-color: #3b82f6; }

.main-loader {
     border: 4px solid #3b82f6;
    border-top: 4px solid #bfdbfe;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1.2s linear infinite;
    margin: 20px auto;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
textarea:focus, input[type="text"]:focus, input[type="file"]:focus, select:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
    border-color: #3b82f6;
}

.content-card, .prompt-card-item, .category-selection-block {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background-color: #ffffff;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.03);
}
.prompt-card-item {
     background-color: #f9fafb;
}
.category-selection-block .category-icon {
    width: 20px;
    height: 20px;
    margin-right: 0.75rem;
    color: #3b82f6;
    flex-shrink: 0;
}
.section-header {
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #d1d5db;
}
.section-header h2 {
    color: #1e3a8a;
    font-weight: 600;
}
.file-input-label {
    cursor: pointer;
    padding: 0.625rem 1.25rem;
    border-radius: 0.375rem;
    background-color: #3b82f6;
    color: white;
    transition: background-color 0.2s;
    font-weight: 500;
}
.file-input-label:hover {
    background-color: #2563eb;
}
#fileNameDisplay {
    margin-top: 0.5rem;
    font-style: italic;
    color: #6b7280;
}

.markdown-content h1, .markdown-content h2, .markdown-content h3 { color: #1e3a8a; margin-bottom: 0.5em; margin-top: 0.8em; }
.markdown-content h1 { font-size: 1.5em; font-weight:bold; }
.markdown-content h2 { font-size: 1.3em; font-weight:bold; }
.markdown-content h3 { font-size: 1.15em; font-weight:bold; }
.markdown-content p { margin-bottom: 0.75em; line-height: 1.6; color: #374151; }
.markdown-content ul, .markdown-content ol { margin-left: 1.5em; margin-bottom: 0.75em; list-style-position: outside; color: #374151; }
.markdown-content li { margin-bottom: 0.3em; }
.markdown-content strong { font-weight: bold; color: #1f2937; }
.markdown-content em { font-style: italic; }
.markdown-content code { background-color: #e5e7eb; padding: 0.2em 0.4em; border-radius: 0.25em; font-family: monospace; color: #1e3a8a; }
.markdown-content pre { background-color: #f3f4f6; border: 1px solid #e5e7eb; padding: 0.75em; border-radius: 0.375em; overflow-x: auto; margin-bottom: 0.75em; }
.markdown-content pre code { background-color: transparent; padding: 0; color: #1e3a8a;}
.markdown-content blockquote { border-left: 4px solid #3b82f6; padding-left: 1em; margin-left: 0; margin-bottom: 0.75em; color: #4b5563; font-style: italic; }
.markdown-content a { color: #3b82f6; text-decoration: underline; }
.markdown-content a:hover { color: #2563eb; }
.markdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.25rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    overflow: hidden;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.markdown-content th, .markdown-content td {
    border: 1px solid #e5e7eb;
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.875rem;
}
.markdown-content th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #374151;
}
.markdown-content tr:nth-child(even) td {
    background-color: #f9fafb;
}
.markdown-content tr:hover td {
    background-color: #eff6ff;
}

/* Step Indicator Bar Styles */
.step-indicator-bar {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 2rem;
    overflow-x: auto;
    white-space: nowrap;
}
.step-indicator {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #6b7280;
    border-bottom: 3px solid transparent;
    transition: color 0.2s, border-color 0.2s;
    cursor: pointer;
    display: flex;
    align-items: center;
    margin-right: 0.5rem;
}
.step-indicator .step-icon {
    margin-right: 0.5rem;
    width: 18px; height: 18px;
    color: #9ca3af;
}
.step-indicator:hover:not(.active):not(.disabled) {
    color: #3b82f6;
    border-bottom-color: #93c5fd;
}
.step-indicator.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
    font-weight: 600;
    cursor: default;
}
.step-indicator.active .step-icon {
    color: #2563eb;
}
.step-indicator.completed {
     color: #3b82f6;
}
.step-indicator.completed .step-icon {
    color: #3b82f6;
}
.step-indicator.disabled {
    color: #9ca3af;
    cursor: not-allowed;
    border-bottom-color: transparent !important;
}
.step-indicator.disabled .step-icon {
    color: #d1d5db;
}
.step-indicator.disabled:hover {
    color: #9ca3af;
    border-bottom-color: transparent;
}

.app-footer {
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 2rem;
    border-top: 1px solid #e0e0e0;
    font-size: 0.875rem;
    color: #6b7280;
}
.app-footer .footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 0.5rem;
}
.app-footer .footer-links .menu-item {
     padding: 0.25rem 0.5rem;
     font-size: 0.85rem;
     color: #4b5563;
}
 .app-footer .footer-links .menu-item:hover {
    background-color: #f0f0f0;
    color: #1f2937;
 }
#footerLanguageMenuPopup {
    position: relative;
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
    padding: 1rem;
    z-index: 1000;
    width: 280px;
    margin-top: 0.5rem;
}

/* Skeleton Loader Styles */
.skeleton-loader {
    padding: 1.5rem;
    background-color: #ffffff;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    max-width: 100%;
    box-sizing: border-box;
}

.skeleton-line {
    height: 1rem;
    background-color: #e5e7eb;
    border-radius: 0.25rem;
    margin-bottom: 0.75rem;
    animation: pulse 1.2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    max-width: 100%;
    box-sizing: border-box;
}

.skeleton-line:last-child {
    margin-bottom: 0;
}

.skeleton-line.short { width: 60%; }
.skeleton-line.medium { width: 80%; }
.skeleton-line.long { width: 100%; }
.skeleton-title { 
    height: 1.5rem; 
    width: 40%; 
    margin-bottom: 1rem; 
}

.skeleton-card {
    padding: 1rem;
    background-color: #f9fafb;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    max-width: 100%;
    box-sizing: border-box;
}

.skeleton-card:last-child {
    margin-bottom: 0;
}

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

.score-circle {
    width: 50px; height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem; font-weight: bold;
    color: white;
    margin-right: 1rem;
    flex-shrink: 0;
}
.score-circle.high-score { background-color: #10b981; } /* Emerald 500 */
.score-circle.medium-score { background-color: #f59e0b; } /* Amber 500 */
.score-circle.low-score { background-color: #ef4444; } /* Red 500 */

#initialScoreCard {
    border-left: 4px solid #3b82f6; /* Blue 600 */
    background-color: #eff6ff; /* Blue 50 */
}
/* New styles for Misunderstanding Risk Meter */
.risk-meter-display {
    margin-top: 1rem;
}
.risk-meter-bar-container {
    width: 100%;
    background-color: #e5e7eb; /* Gray 200 */
    border-radius: 0.375rem; /* rounded-md */
    padding: 2px;
    height: 28px;
    display: flex;
    align-items: center;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}
.risk-meter-bar {
    height: 100%;
    border-radius: 0.25rem; /* rounded-sm */
    transition: width 0.5s ease-in-out, background-color 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    font-weight: 600; /* Semibold */
    font-size: 0.75rem; /* text-xs */
    padding: 0 8px;
    box-sizing: border-box;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.2);
}
.risk-meter-bar.low {
    background-color: #10b981; /* Emerald 500 */
    width: 33%;
}
.risk-meter-bar.medium {
    background-color: #f59e0b; /* Amber 500 */
    width: 66%;
}
.risk-meter-bar.high {
    background-color: #ef4444; /* Red 500 */
    width: 100%;
}
/* End of New Styles */

.final-prompt-score-section-incard {
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    background-color: #e0f2fe; /* Light blue for score section */
    border: 1px solid #7dd3fc; /* Sky 300 */
    border-radius: 0.375rem;
}
 .final-prompt-score-section-incard .score-badge {
    padding: 0.25em 0.75em;
    font-size: 0.8em;
    border-radius: 9999px; /* pill shape */
}

/* Hall of Fame Styles - Apple Design System */
.hall-of-fame-section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.hall-of-fame-section-header h2 {
    font-size: 3rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
}

.hall-of-fame-section-header p {
    font-size: 1.25rem;
    color: #86868b;
    font-weight: 400;
    max-width: 800px;
    margin: 0 auto;
}

/* Feature Section */
.hall-of-fame-feature {
    background: linear-gradient(to bottom, #fbfbfd, #f5f5f7);
    border-radius: 1.5rem;
    padding: 3rem;
    margin-bottom: 3rem;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.feature-badge {
    display: inline-flex;
    align-items: center;
    background: #0071e3;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    gap: 0.5rem;
}

.feature-title {
    font-size: 2.5rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.feature-visualization {
    margin: 2rem 0;
    padding: 2rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.disaster-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.disaster-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid #f5f5f7;
    transition: all 0.2s ease;
}

.disaster-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.disaster-icon {
    width: 40px;
    height: 40px;
    background: #f5f5f7;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.disaster-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 0.5rem;
}

.disaster-description {
    font-size: 0.9375rem;
    color: #86868b;
    line-height: 1.5;
}

/* Test It Yourself Section */
.test-section {
    background: #f5f5f7;
    border-radius: 1rem;
    padding: 2rem;
    margin: 2rem 0;
}

.test-section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 1.5rem;
}

.prompt-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.prompt-example {
    background: white;
    border-radius: 0.75rem;
    padding: 1.25rem;
    border: 1px solid #e8e8ed;
}

.prompt-example.bad {
    border-color: #ff3b30;
    background: rgba(255, 59, 48, 0.02);
}

.prompt-example.good {
    border-color: #34c759;
    background: rgba(52, 199, 89, 0.02);
}

.prompt-label {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
}

.prompt-label.bad {
    color: #ff3b30;
}

.prompt-label.good {
    color: #34c759;
}

.prompt-text {
    font-family: 'SF Mono', monospace;
    font-size: 0.9375rem;
    color: #1d1d1f;
    background: #f5f5f7;
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
}

.prompt-result {
    font-size: 0.875rem;
    color: #86868b;
    font-style: italic;
}

/* Hall of Fame Entry */
.hall-of-fame-entry {
    position: relative;
    margin-bottom: 1rem;
    background: #ffffff;
    border-radius: 1rem;
    border: 1px solid #f5f5f7;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.hall-of-fame-entry:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: #e8e8ed;
}

.hall-of-fame-entry.worst-of-all {
    background: linear-gradient(135deg, #fefefe 0%, #fafafa 100%);
    border: 1px solid #d2d2d7;
}

.hall-of-fame-entry-inner {
    padding: 1.75rem 2rem;
}

.entry-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.entry-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.75rem;
    background: #f5f5f7;
    color: #1d1d1f;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-right: 1rem;
}

.hall-of-fame-entry.worst-of-all .entry-rank {
    background: linear-gradient(135deg, #ffb900 0%, #ff8c00 100%);
    color: white;
}

.crown-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ffb900 0%, #ff8c00 100%);
    border-radius: 50%;
    color: white;
    font-size: 1rem;
}

.daily-badge {
    position: absolute;
    top: 1rem;
    right: 3.5rem;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #007aff;
    border-radius: 50%;
    color: white;
    font-size: 0.875rem;
}

.entry-prompt {
    font-size: 1.375rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 1rem;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1rem;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.category-vague { 
    background: rgba(255, 59, 48, 0.1); 
    color: #ff3b30; 
}
.category-psychic { 
    background: rgba(94, 92, 230, 0.1); 
    color: #5e5ce6; 
}
.category-mindreader { 
    background: rgba(175, 82, 222, 0.1); 
    color: #af52de; 
}
.category-context { 
    background: rgba(255, 149, 0, 0.1); 
    color: #ff9500; 
}
.category-define { 
    background: rgba(52, 199, 89, 0.1); 
    color: #34c759; 
}
.category-who { 
    background: rgba(0, 122, 255, 0.1); 
    color: #007aff; 
}
.category-default { 
    background: #f5f5f7; 
    color: #86868b; 
}

.badness-meter {
    display: inline-flex;
    align-items: center;
    height: 1.75rem;
    background: #f5f5f7;
    border-radius: 999px;
    padding: 0.125rem;
    min-width: 140px;
    position: relative;
    overflow: hidden;
}

.badness-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: linear-gradient(90deg, #ff9500 0%, #ff3b30 100%);
    border-radius: 999px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.badness-text {
    position: relative;
    z-index: 1;
    padding: 0 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #1d1d1f;
    width: 100%;
    text-align: center;
}

.interpretations-panel {
    background: #f5f5f7;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin: 1rem 0;
}

.interpretations-title {
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.interpretations-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.interpretations-list li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #424245;
    line-height: 1.5;
}

.interpretations-list li:before {
    content: "–";
    position: absolute;
    left: 0;
    color: #86868b;
}

.entry-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #f5f5f7;
}

.entry-metadata {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.submitted-by, .submission-date {
    font-size: 0.8125rem;
    color: #86868b;
}

.vote-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.vote-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.vote-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    border: 1px solid #d2d2d7;
    background: #ffffff;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: #1d1d1f;
}

.vote-btn:hover {
    transform: scale(1.05);
}

.vote-btn.upvote:hover { 
    background: #34c759; 
    border-color: #34c759;
    color: white;
}
.vote-btn.downvote:hover { 
    background: #ff3b30; 
    border-color: #ff3b30;
    color: white;
}

.vote-btn.voted {
    font-weight: 600;
}
.vote-btn.upvote.voted { 
    background: #34c759; 
    border-color: #34c759;
    color: white; 
}
.vote-btn.downvote.voted { 
    background: #ff3b30; 
    border-color: #ff3b30;
    color: white; 
}

.net-score {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: 999px;
    background: #f5f5f7;
    color: #1d1d1f;
}
.net-score.positive { 
    background: rgba(52, 199, 89, 0.1); 
    color: #34c759; 
}
.net-score.negative { 
    background: rgba(255, 59, 48, 0.1); 
    color: #ff3b30; 
}

.fix-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: #007aff;
    color: white;
    border: none;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 1.25rem;
    letter-spacing: -0.01em;
}

.fix-btn:hover {
    background: #0051d5;
    transform: scale(1.02);
}

.fix-btn:active {
    transform: scale(0.98);
}

/* Hall of Fame submission form */
.hall-of-fame-submit {
    background: #ffffff;
    border: 1px solid #d2d2d7;
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.hall-of-fame-submit h3 {
    color: #1d1d1f;
    margin-bottom: 1.5rem;
    font-size: 1.375rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.hall-of-fame-submit .form-group {
    margin-bottom: 1.25rem;
}

.hall-of-fame-submit label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #1d1d1f;
    margin-bottom: 0.5rem;
}

.hall-of-fame-submit input[type="text"],
.hall-of-fame-submit select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d2d2d7;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    background: #fafafa;
    transition: all 0.2s;
}

.hall-of-fame-submit input[type="text"]:focus,
.hall-of-fame-submit select:focus {
    background: #ffffff;
    border-color: #007aff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.hall-of-fame-submit button {
    background: #34c759;
    color: white;
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: -0.01em;
}

.hall-of-fame-submit button:hover {
    background: #2fb742;
    transform: scale(1.05);
}

.hall-of-fame-submit button:active {
    transform: scale(0.95);
}

/* Tool Navigation */
.tool-navigation {
    background: #fafafa;
    padding: 0.375rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    display: inline-flex;
    width: 100%;
    justify-content: center;
}

.tool-nav-btn {
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    border: none;
    background: transparent;
    color: #1d1d1f;
}

.tool-nav-btn:hover:not(:disabled):not(.active) {
    background: rgba(0, 0, 0, 0.06);
}

.tool-nav-btn.active {
    background: #007aff;
    color: white;
    font-weight: 600;
}

.tool-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* SF Symbols style icons */
.icon-document {
    background: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14 2H6C4.9 2 4 2.9 4 4V20C4 21.1 4.9 22 6 22H18C19.1 22 20 21.1 20 20V8L14 2Z' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M14 2V8H20' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center no-repeat;
    width: 24px;
    height: 24px;
    display: inline-block;
}

.icon-chart {
    background: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 3V21H21' stroke='%23ff3b30' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M18 17L13 12L9 16L3 10' stroke='%23ff3b30' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center no-repeat;
    width: 24px;
    height: 24px;
}

.icon-medical {
    background: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2L2 7V12C2 16.5 5 20.74 12 22C19 20.74 22 16.5 22 12V7L12 2Z' stroke='%23ff9500' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M12 8V16M8 12H16' stroke='%23ff9500' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center no-repeat;
    width: 24px;
    height: 24px;
}

.icon-legal {
    background: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2L3 7V11C3 16 6.5 20.16 12 21C17.5 20.16 21 16 21 11V7L12 2Z' stroke='%235e5ce6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center no-repeat;
    width: 24px;
    height: 24px;
}

.icon-warning {
    background: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.29 3.86L1.82 18C1.64539 18.3024 1.55296 18.6453 1.55199 18.9945C1.55101 19.3437 1.64151 19.6871 1.81442 19.9905C1.98734 20.2939 2.23674 20.5467 2.53771 20.7238C2.83867 20.901 3.18079 20.9962 3.53 21H20.47C20.8192 20.9962 21.1613 20.901 21.4623 20.7238C21.7633 20.5467 22.0127 20.2939 22.1856 19.9905C22.3585 19.6871 22.449 19.3437 22.448 18.9945C22.447 18.6453 22.3546 18.3024 22.18 18L13.71 3.86C13.5317 3.56611 13.2807 3.32313 12.9812 3.15449C12.6817 2.98585 12.3437 2.89726 12 2.89726C11.6563 2.89726 11.3183 2.98585 11.0188 3.15449C10.7193 3.32313 10.4683 3.56611 10.29 3.86Z' stroke='%23ff3b30' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M12 9V13' stroke='%23ff3b30' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M12 17H12.01' stroke='%23ff3b30' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center no-repeat;
    width: 20px;
    height: 20px;
    display: inline-block;
}

.icon-lightbulb {
    background: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2C10.0222 2 8.08879 2.58649 6.4443 3.6853C4.79981 4.78412 3.51809 6.3459 2.76121 8.17317C2.00433 10.0004 1.8063 12.0111 2.19215 13.9509C2.578 15.8907 3.53041 17.6725 4.92894 19.0711C6.32746 20.4696 8.10929 21.422 10.0491 21.8079C11.9889 22.1937 13.9996 21.9957 15.8268 21.2388C17.6541 20.4819 19.2159 19.2002 20.3147 17.5557C21.4135 15.9112 22 13.9778 22 12C22 10.6868 21.7413 9.38642 21.2388 8.17317C20.7363 6.95991 19.9997 5.85752 19.0711 4.92893C18.1425 4.00035 17.0401 3.26375 15.8268 2.7612C14.6136 2.25866 13.3132 2 12 2Z' stroke='%2334c759' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M12 8V12' stroke='%2334c759' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M12 16H12.01' stroke='%2334c759' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center no-repeat;
    width: 20px;
    height: 20px;
    display: inline-block;
}

/* AI Therapist Styles */

/* Therapist Chat Container */
.therapist-container {
    max-width: 800px;
    margin: 0 auto;
}

.therapist-header {
    text-align: center;
    padding: 2rem 0;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 2rem;
}

.therapist-title {
    font-size: 2.5rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 0.5rem;
}

.therapist-subtitle {
    font-size: 1.25rem;
    color: #86868b;
    font-style: italic;
}

/* Chat Window */
.therapist-chat-window {
    background: #f5f5f7;
    border-radius: 1rem;
    padding: 1.5rem;
    height: 500px;
    display: flex;
    flex-direction: column;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.05);
}

#therapistChat {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Messages */
.therapist-message {
    display: flex;
    gap: 0.75rem;
    animation: fadeIn 0.3s ease-in;
}

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

.user-message {
    justify-content: flex-end;
}

.therapist-response {
    justify-content: flex-start;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.therapist-emoji {
    font-size: 1.5rem;
}

.message-content {
    max-width: 70%;
    background: white;
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.user-message .message-content {
    background: #007aff;
    color: white;
}

.message-author {
    font-size: 0.75rem;
    font-weight: 600;
    color: #86868b;
    margin-bottom: 0.25rem;
}

.user-message .message-author {
    color: rgba(255, 255, 255, 0.8);
}

.message-text {
    font-size: 0.9375rem;
    line-height: 1.5;
    color: #1d1d1f;
}

.user-message .message-text {
    color: white;
}

.message-text em {
    font-style: italic;
    opacity: 0.8;
}

.message-time {
    font-size: 0.75rem;
    color: #86868b;
    margin-top: 0.25rem;
}

.user-message .message-time {
    color: rgba(255, 255, 255, 0.7);
}

/* Frustration Meter in Messages */
.frustration-meter {
    display: inline-block;
    font-family: monospace;
    font-size: 0.875rem;
    color: #ff3b30;
    background: rgba(255, 59, 48, 0.1);
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    margin: 0.5rem 0;
}

.mood-emoji {
    font-size: 1.25rem;
    margin-left: 0.5rem;
}

/* Typing indicator */
.typing-indicator .message-content {
    padding: 0.75rem 1.5rem;
}

.typing-dots {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: #86868b;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Input Area */
.therapist-input-area {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    background: white;
    border-radius: 0.75rem;
    margin-top: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

#therapistInput {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #d2d2d7;
    border-radius: 999px;
    font-size: 0.9375rem;
    background: #fafafa;
    transition: all 0.2s;
    resize: none;
    overflow: hidden;
}

#therapistInput:focus {
    background: white;
    border-color: #007aff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

#therapistSendButton {
    padding: 0.75rem 1.5rem;
    background: #007aff;
    color: white;
    border: none;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

#therapistSendButton:hover {
    background: #0051d5;
    transform: scale(1.05);
}

#therapistSendButton:active {
    transform: scale(0.95);
}

/* Session Controls */
.therapist-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.session-info {
    font-size: 0.875rem;
    color: #86868b;
}

.control-buttons {
    display: flex;
    gap: 0.75rem;
}

#therapistResetButton,
#therapistExportButton {
    padding: 0.625rem 1.25rem;
    background: #f5f5f7;
    color: #1d1d1f;
    border: 1px solid #d2d2d7;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

#therapistResetButton:hover,
#therapistExportButton:hover {
    background: #e8e8ed;
    border-color: #c2c2c7;
}

/* Frustration Level Indicator */
.frustration-indicator {
    background: white;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.frustration-label {
    font-size: 0.875rem;
    color: #86868b;
    margin-bottom: 0.5rem;
}

.frustration-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.frustration-bar {
    width: 200px;
    height: 8px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.frustration-fill {
    height: 100%;
    background: linear-gradient(90deg, #34c759 0%, #ff9500 50%, #ff3b30 100%);
    transition: width 0.5s ease;
}

.frustration-emoji-display {
    font-size: 2rem;
}

/* Prompt Autopsy Styles */
.autopsy-container {
    max-width: 900px;
    margin: 0 auto;
}

.autopsy-header {
    text-align: center;
    padding: 2rem 0;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 2rem;
}

.autopsy-title {
    font-size: 2.5rem;
    font-weight: 600;
    color: #dc2626;
    margin-bottom: 0.5rem;
}

.autopsy-subtitle {
    font-size: 1.25rem;
    color: #86868b;
}

/* Common Problems */
.common-problems {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 2rem;
}

.problem-example-btn {
    padding: 0.375rem 0.875rem;
    background: white;
    border: 1px solid #ef4444;
    color: #dc2626;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.problem-example-btn:hover {
    background: #fef2f2;
    border-color: #dc2626;
}

/* Input Area */
.autopsy-input-area {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

/* Loading State */
.autopsy-loading {
    text-align: center;
    padding: 3rem;
}

.autopsy-animation {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto;
}

.autopsy-scanner {
    width: 100px;
    height: 100px;
    border: 3px solid #ef4444;
    border-radius: 50%;
    position: relative;
    animation: rotate 2s linear infinite;
}

.autopsy-scanner::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border: 3px solid transparent;
    border-top-color: #dc2626;
    border-radius: 50%;
    animation: rotate 1s linear infinite reverse;
}

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

.autopsy-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background: #ef4444;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 1.5s ease-in-out infinite;
}

/* Results */
.result-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 1rem;
}

.vagueness-bar {
    flex: 1;
    max-width: 200px;
    height: 8px;
    background: #fee2e2;
    border-radius: 999px;
    overflow: hidden;
}

.vagueness-fill {
    height: 100%;
    transition: width 0.5s ease;
}

.vagueness-fill.bg-red-500 {
    background-color: #ef4444;
}

.vagueness-fill.bg-yellow-500 {
    background-color: #f59e0b;
}

.vagueness-fill.bg-green-500 {
    background-color: #10b981;
}

.diagnosis-section h4,
.improvements-section h4 {
    margin-bottom: 0.5rem;
}

/* History */
.autopsy-history {
    background: #f9fafb;
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.history-item {
    transition: all 0.2s;
}

.history-item:hover {
    transform: translateX(4px);
}

/* Responsive fixes for Hall of Fame and AI Therapist */
@media (max-width: 768px) {
    .hall-of-fame-section-header h2 {
        font-size: 2.25rem;
    }
    
    .feature-title {
        font-size: 1.875rem;
    }
    
    .prompt-comparison {
        grid-template-columns: 1fr;
    }
    
    .disaster-examples {
        grid-template-columns: 1fr;
    }
    
    .hall-of-fame-entry-inner {
        padding: 1.25rem;
    }
    
    .entry-prompt {
        font-size: 1.125rem;
    }
    
    .entry-footer {
        flex-direction: column;
        align-items: stretch;
    }
    
    .vote-section {
        justify-content: space-between;
    }
    
    .interpretations-panel {
        padding: 0.875rem 1rem;
    }
    
    /* Therapist mobile styles */
    .therapist-chat-window {
        height: 400px;
        padding: 1rem;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .therapist-title {
        font-size: 2rem;
    }
    
    .therapist-subtitle {
        font-size: 1rem;
    }
    
    #therapistSendButton {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    .control-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    #therapistResetButton,
    #therapistExportButton {
        width: 100%;
    }
}

/* Fix for multitool sections */
.multitool-section {
    display: none;
}

.multitool-section.active {
    display: block;
}
/* Step Indicator Alignment Fix */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 120px; /* Ensure consistent width */
    padding: 0.75rem 1.25rem;
    white-space: nowrap;
}

.step-indicator .step-icon {
    margin-right: 0.5rem;
    width: 18px;
    height: 18px;
    flex-shrink: 0; /* Prevent icon from shrinking */
}

/* Tool Navigation Alignment */
.tool-navigation {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.tool-navigation .flex {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tool-nav-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.625rem 1.25rem;
    min-height: 44px; /* Consistent height */
}