/* Ĥashwar Hebrew Transcriber Styles v2.1 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    line-height: 1.6;
    padding: 20px;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #667eea;
}

header h1 {
    color: #667eea;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    font-size: 1.1em;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #ddd;
}

.tab-button {
    padding: 12px 24px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 1.1em;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.tab-button:hover {
    color: #667eea;
}

.tab-button.active {
    color: #667eea;
    border-bottom-color: #667eea;
    font-weight: bold;
}

.tab-content {
    display: none;
    padding: 20px 0;
}

.tab-content.active {
    display: block;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 1.05em;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1.1em;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
    font-family: 'Arial', sans-serif;
}

/* Buttons */
.btn-primary {
    background: #667eea;
    color: white;
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #ffd700;
    color: #333;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-secondary:hover {
    background: #ffed4e;
    transform: translateY(-1px);
}

.btn-reset {
    background: transparent;
    color: #667eea;
    padding: 14px 24px;
    border: 2px solid #667eea;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-left: 10px;
}

.btn-reset:hover {
    background: #667eea;
    color: white;
}

.audio-btn {
    background: transparent;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    margin-left: 10px;
    transition: transform 0.2s;
    padding: 0 8px;
}

.audio-btn:hover {
    transform: scale(1.2);
}

/* Loading Spinner */
#loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Error Box */
.error-box {
    background: #ffe6e6;
    border: 2px solid #ff4444;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    color: #cc0000;
    font-weight: 600;
}

/* Results Section */
#results {
    margin-top: 30px;
    padding: 25px;
    background: #f8f9ff;
    border-radius: 12px;
    border: 2px solid #667eea;
}

#results h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.hebrew-display {
    font-size: 1.8em;
    padding: 15px;
    background: white;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    border: 2px solid #ddd;
}

/* Dual Analysis Display */
.dual-analysis {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

@media (max-width: 768px) {
    .dual-analysis {
        grid-template-columns: 1fr;
    }
}

.analysis-box {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.analysis-box.uninflected {
    border-left: 5px solid #4CAF50;
}

.analysis-box.inflected {
    border-left: 5px solid #2196F3;
}

.analysis-box h3 {
    color: #333;
    margin-bottom: 5px;
    font-size: 1.3em;
}

.analysis-note {
    color: #666;
    font-size: 0.9em;
    font-style: italic;
    margin-bottom: 15px;
}

.result-row {
    margin: 12px 0;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 6px;
}

.result-row strong {
    color: #555;
    display: inline-block;
    min-width: 140px;
}

.transcription-text {
    font-size: 1.3em;
    font-weight: 600;
    color: #667eea;
}

/* Verse Input results */
.verse-word-card {
    background: white;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-left: 5px solid #4CAF50;
}

.verse-word-card.equivocal {
    border-left: 5px solid #ffc107;
}

.verse-word-card .verse-word-header {
    display: flex;
    align-items: baseline;
    gap: 14px;
    flex-wrap: wrap;
}

.verse-word-hebrew {
    font-size: 1.4em;
    font-weight: 600;
}

.verse-word-transcription {
    font-size: 1.1em;
    color: #667eea;
    font-weight: 600;
}

.badge-equivocal {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #856404;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 20px;
    padding: 3px 10px;
    letter-spacing: 0.02em;
}

.badge-notfound {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #721c24;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 20px;
    padding: 3px 10px;
}

.verse-word-gloss {
    margin-top: 6px;
    font-size: 0.95rem;
    color: #444;
}

.verse-word-grammar {
    margin-top: 4px;
    font-size: 0.85rem;
    color: #6a4fb3;
    font-style: italic;
}

.verse-word-relation {
    display: block;
    margin-top: 2px;
    color: #b35c00;
    font-style: normal;
    font-size: 0.8rem;
}

.verse-word-details {
    margin-top: 10px;
    border-top: 1px dashed #ddd;
    padding-top: 8px;
}

.verse-word-details summary {
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 700;
    color: #4472c4;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    list-style: none;
}

.verse-word-details summary::-webkit-details-marker {
    display: none;
}

.verse-word-details summary::before {
    content: "▸ ";
}

.verse-word-details[open] summary::before {
    content: "▾ ";
}

.verse-word-details-body {
    margin-top: 8px;
}

.verse-word-section {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #ddd;
    font-size: 0.92rem;
}

.verse-word-details-body .verse-word-section:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.verse-word-section-label {
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 6px;
}

.multi-sense-label { color: #856404; }
.segmentation-label { color: #b35c00; }

.pronunciation-text {
    font-size: 1.2em;
    color: #764ba2;
    font-style: italic;
}

/* Strong's Citation */
.strongs-box {
    background: #fff8dc;
    border: 2px solid #daa520;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.strongs-box h3 {
    color: #8b6914;
    margin-bottom: 10px;
}

#strongs-content {
    font-size: 1.1em;
    color: #333;
}

/* Lookup Results */
#lookup-results {
    margin-top: 20px;
    padding: 20px;
    background: #f0f0f0;
    border-radius: 10px;
}

#lookup-results h3 {
    color: #667eea;
    margin-bottom: 15px;
}

.lookup-result-item {
    background: white;
    padding: 15px;
    margin: 10px 0;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.lookup-hebrew {
    font-size: 1.8em;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.lookup-transliteration {
    color: #666;
    font-style: italic;
    margin-bottom: 5px;
}

.lookup-type {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.9em;
    margin-right: 10px;
}

.lookup-strongs {
    color: #8b6914;
    font-weight: 600;
    margin-top: 5px;
}

/* About Section */
.about-section {
    margin-top: 40px;
    padding: 25px;
    background: #f9f9f9;
    border-radius: 12px;
    border: 2px solid #ddd;
}

.about-section h2 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.6em;
}

.about-section h3 {
    color: #555;
    margin: 20px 0 10px;
    font-size: 1.2em;
}

.about-toggle {
    margin: 18px 0;
    padding-top: 14px;
    border-top: 1px solid #ddd;
}

.about-toggle:first-of-type {
    border-top: none;
    padding-top: 0;
}

.about-toggle summary {
    cursor: pointer;
    color: #555;
    font-size: 1.2em;
    font-weight: 700;
    list-style: none;
}

.about-toggle summary::-webkit-details-marker {
    display: none;
}

.about-toggle summary::before {
    content: "▸ ";
    color: #667eea;
}

.about-toggle[open] summary::before {
    content: "▾ ";
}

.about-toggle-body {
    margin-top: 12px;
}

.about-section h4 {
    color: #4472c4;
    margin: 16px 0 8px;
    font-size: 1.05em;
}

.about-section ul {
    margin-left: 30px;
}

.about-section li {
    margin: 8px 0;
}

.about-section p {
    margin-bottom: 15px;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    background: white;
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border: 1px solid #ddd;
}

table th {
    background: #667eea;
    color: white;
    font-weight: 600;
}

table tr:nth-child(even) {
    background: #f9f9f9;
}

.special-chars-table td {
    font-size: 1.1em;
    font-weight: 600;
}

.cv-patterns-table th {
    background: #764ba2;
}

.affixes-table td:first-child {
    font-weight: 600;
    color: #667eea;
}

/* Footer */
footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #ddd;
    text-align: center;
    color: #666;
}

footer p {
    margin: 5px 0;
}

footer em {
    font-size: 0.95em;
    color: #888;
}

/* Audio Button */
.audio-button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
    transition: background-color 0.3s;
}

.audio-button:hover {
    background-color: #2980b9;
}

.audio-button:active {
    background-color: #1f6391;
}

.audio-button:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

/* Hyphenated Pronunciation */
.pronunciation-hyphenated {
    font-style: italic;
    color: #555;
    font-size: 1.05em;
}

/* Floating Help Button */
.help-button {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #667eea;
    color: white;
    border: none;
    font-size: 1.5em;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.5);
    z-index: 1000;
    transition: all 0.3s;
}

.help-button:hover {
    background: #5568d3;
    transform: scale(1.1);
}

/* Floating Feedback Button */
.feedback-button {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #667eea;
    color: white;
    border: none;
    font-size: 1.3em;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.5);
    z-index: 1000;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.feedback-button:hover {
    background: #5568d3;
    transform: scale(1.1);
}

/* Help Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    padding: 20px;
}

.modal-box {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 600px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-box h2 {
    color: #667eea;
    margin-bottom: 15px;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 18px;
    background: transparent;
    border: none;
    font-size: 1.8em;
    line-height: 1;
    color: #999;
    cursor: pointer;
}

.modal-close:hover {
    color: #333;
}

.help-steps {
    margin-left: 22px;
}

.help-steps li {
    margin: 12px 0;
    line-height: 1.5;
}

.help-footer-note {
    margin-top: 20px;
    padding: 12px 15px;
    background: #f0f7ff;
    border-left: 4px solid #4472c4;
    border-radius: 4px;
    font-size: 0.95em;
    color: #333;
}

/* Trust / Verification Showcase Section */
.trust-section {
    margin-top: 40px;
    padding: 25px;
    background: linear-gradient(135deg, #f0f7ff 0%, #f9f5ff 100%);
    border-radius: 12px;
    border: 2px solid #667eea;
}

.trust-section h2 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.6em;
}

.trust-intro {
    color: #555;
    margin-bottom: 20px;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.trust-card {
    background: white;
    border-radius: 10px;
    padding: 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.trust-icon {
    font-size: 1.8em;
    margin-bottom: 8px;
}

.trust-card h3 {
    color: #333;
    font-size: 1.05em;
    margin-bottom: 8px;
}

.trust-card p {
    color: #555;
    font-size: 0.92em;
    line-height: 1.5;
}

/* Why This Result (teaching layer) */
.why-button {
    margin-top: 15px;
    background: #f0f7ff;
    color: #4472c4;
    border: 1px solid #4472c4;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.why-button:hover {
    background: #4472c4;
    color: white;
}

.why-content p {
    margin-bottom: 12px;
    line-height: 1.5;
}

.why-content ul {
    margin: 8px 0 12px 22px;
}

.why-content li {
    margin: 6px 0;
}
