/* Base styles */
body {
    color: #e7bf8f;
}

.language-page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    color: #e7bf8f;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.main-title {
    font-size: 2.5rem;
    color: #e7bf8f;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.25rem;
    color: rgba(231, 191, 143, 0.7);
}

/* Grid Layout */
.language-grid {
    display: grid;
    gap: 1.5rem;
    color: #e7bf8f;
}

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

/* Card Styles */
.card {
    background-color: #151f25;
    border: 1px solid rgba(231, 191, 143, 0.1);
    border-radius: 0.5rem;
    overflow: hidden;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(231, 191, 143, 0.2);
}

.card-header {
    background-color: rgba(231, 191, 143, 0.1);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-icon {
    color: #e7bf8f;
    font-size: 1.25rem;
}

.card-header h2 {
    color: #e7bf8f;
    font-size: 1.25rem;
    margin: 0;
}

.card-content {
    padding: 1.5rem;
}

/* Dictionary and Idioms Styles */
.dictionary-scroll, .phrases-scroll {
    max-height: 35vh;
    overflow-y: auto;
    padding-right: 1rem;
    color: #e7bf8f;
}

.dictionary-scroll::-webkit-scrollbar {
    width: 8px;
}

.dictionary-scroll::-webkit-scrollbar-track {
    background: rgba(231, 191, 143, 0.1);
    border-radius: 4px;
}

.dictionary-scroll::-webkit-scrollbar-thumb {
    background: rgba(231, 191, 143, 0.3);
    border-radius: 4px;
}

/* Translation Tool Styles */
.translation-grid {
    display: grid;
    gap: 1rem;
}

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

#language-details {
    color: #e7bf8f;
}

.translation-input,
.translation-output {
    background-color: rgba(21, 31, 37, 0.5);
    padding: 1rem;
    border-radius: 0.375rem;
    color: #e7bf8f;
}

textarea.form-control {
    width: 100%;
    background-color: rgba(21, 31, 37, 0.8);
    border: 1px solid rgba(231, 191, 143, 0.2);
    color: #e7bf8f;
    padding: 0.75rem;
    border-radius: 0.375rem;
    resize: vertical;
}

textarea.form-control:focus {
    outline: none;
    border-color: rgba(231, 191, 143, 0.5);
    box-shadow: 0 0 0 2px rgba(231, 191, 143, 0.2);
}

/* Button Styles */
.btn {
    padding: 0.5rem 1.25rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: #e7bf8f;
    color: #151f25;
}

.btn-primary:hover {
    background-color: #d4a877;
}

.btn-secondary {
    background-color: rgba(231, 191, 143, 0.2);
    color: #e7bf8f;
}

.btn-secondary:hover {
    background-color: rgba(231, 191, 143, 0.3);
}

#translate-btn {
    margin-top: 1rem;
    width: 100%;
    color: #151f25;
}

/* Auth Overlay Styles */
.auth-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(21, 31, 37, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
}

.auth-prompt {
    text-align: center;
    padding: 2rem;
}

.auth-prompt h3 {
    color: #e7bf8f;
    margin-bottom: 1rem;
}

.auth-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Translation History Table Styles */
.translation-table {
    width: 100%;
    border-collapse: collapse;
    color: #e7bf8f;
}

.translation-table th,
.translation-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(231, 191, 143, 0.1);
}

.translation-table th {
    color: #e7bf8f;
    font-weight: 500;
    background-color: rgba(231, 191, 143, 0.1);
}

.translation-table tr:hover {
    background-color: rgba(231, 191, 143, 0.05);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(21, 31, 37, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-icon {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(231, 191, 143, 0.3);
    border-radius: 50%;
    border-top-color: #e7bf8f;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Tab Navigation */
.nav-tabs {
    border-bottom: 1px solid rgba(231, 191, 143, 0.2);
    margin-bottom: 2rem;
}

.nav-tabs .nav-item {
    margin-bottom: -1px;
}

.nav-tabs .nav-link {
    color: rgba(231, 191, 143, 0.7);
    background-color: transparent;
    border: 1px solid transparent;
    border-top-left-radius: 0.375rem;
    border-top-right-radius: 0.375rem;
    padding: 0.75rem 1.25rem;
    transition: all 0.2s ease;
}

.nav-tabs .nav-link:hover {
    color: #e7bf8f;
    border-color: transparent;
    background-color: rgba(231, 191, 143, 0.05);
}

.nav-tabs .nav-link.active {
    color: #e7bf8f;
    background-color: transparent;
    border-color: rgba(231, 191, 143, 0.2);
    border-bottom-color: #151f25;
}

/* Dictionary-specific styles */
.dictionary-search {
    margin-bottom: 1.5rem;
}

.dictionary-search input {
    width: 100%;
    max-width: 400px;
    background-color: rgba(21, 31, 37, 0.8);
    border: 1px solid rgba(231, 191, 143, 0.2);
    color: #e7bf8f;
    padding: 0.75rem;
    border-radius: 0.375rem;
}

.dictionary-search input:focus {
    outline: none;
    border-color: rgba(231, 191, 143, 0.5);
    box-shadow: 0 0 0 2px rgba(231, 191, 143, 0.2);
}

/* Dictionary and phrases tables */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: #e7bf8f;
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    background-color: rgba(231, 191, 143, 0.1);
    color: #e7bf8f;
    padding: 0.75rem;
    border-bottom: 2px solid rgba(231, 191, 143, 0.2);
    font-weight: 500;
}

.table tbody tr {
    transition: background-color 0.2s;
}

.table tbody tr:hover {
    background-color: rgba(231, 191, 143, 0.05);
}

.table td {
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid rgba(231, 191, 143, 0.1);
}

/* Loading badges */
.loading-badge {
    background-color: rgba(231, 191, 143, 0.3);
    color: #e7bf8f;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    margin-left: 0.5rem;
    animation: pulse 1.5s infinite;
}

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

/* Dictionary and phrases loading states */
.dictionary-loading, .phrases-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: #e7bf8f;
}

.dictionary-loading .loading-icon, .phrases-loading .loading-icon {
    margin-bottom: 1rem;
}

.error-message {
    background-color: rgba(220, 53, 69, 0.1);
    color: #e7bf8f;
    border-left: 3px solid #dc3545;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0.25rem;
}

/* Responsive table container */
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.language_paragraph,
.language_paragraph * {
  color: #e7bf8f;
}

#dictionary-search{
    background-color: rgba(21, 31, 37, 0.8);
    border: 1px solid rgba(231, 191, 143, 0.2);
    color: #e7bf8f;
}

/*ANd the browser specific galore starts here... */
#dictionary-search::placeholder {
    color: #e7bf8f;
    opacity: 0.6;
}

#dictionary-search::-webkit-input-placeholder { /* Chrome/Safari/Opera */
    color: #e7bf8f;
    opacity: 0.6;
}

#dictionary-search::-moz-placeholder { /* Firefox */
    color: #e7bf8f;
    opacity: 0.6;
}

#dictionary-search:-ms-input-placeholder { /* IE/Edge */
    color: #e7bf8f;
    opacity: 0.6;
}

/* Flexbox styles for dictionary and phrases tables */
.flex-table {
    width: 100%;
    border-collapse: collapse;
    color: #e7bf8f;
}

.flex-table thead tr {
    background-color: rgba(231, 191, 143, 0.1);
}

.flex-table th, .flex-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(231, 191, 143, 0.1);
}

.flex-table tr:hover {
    background-color: rgba(231, 191, 143, 0.05);
}

/* Placeholder content for loading states */
.placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem;
    text-align: center;
}

/* Tab content styling */
.language-section {
    margin-bottom: 2rem;
}

.section-title {
    color: #e7bf8f;
    border-bottom: 1px solid rgba(231, 191, 143, 0.2);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

#textToTranslate {
    color: #e7bf8f;
    margin-bottom: 0.5rem;
}

/* Tab Navigation */
#languageTabs {
    border-bottom-color: rgba(231, 191, 143, 0.2);
}

#languageTabs .nav-link {
    color: #e7bf8f;
}

/* Section Headings */
.language-section h3.section-title {
    color: #e7bf8f;
    border-bottom: 1px solid rgba(231, 191, 143, 0.2);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

h3, .card-content h3 {
    color: #e7bf8f;
    margin-bottom: 1rem;
}

h4, .card-content h4 {
    color: #e7bf8f;
    margin-bottom: 1rem;
}

h5, .card-content h5 {
    color: #e7bf8f;
    opacity: 0.9;
}

/* Dictionary Search */
#dictionary-search {
    background-color: rgba(21, 31, 37, 0.8);
    border: 1px solid rgba(231, 191, 143, 0.2);
    color: #e7bf8f;
}

#dictionary-search::placeholder {
    color: rgba(231, 191, 143, 0.6);
    opacity: 1;
}

#dictionary-search::-webkit-input-placeholder {
    color: rgba(231, 191, 143, 0.6);
}

#dictionary-search::-moz-placeholder {
    color: rgba(231, 191, 143, 0.6);
    opacity: 1;
}

#dictionary-search:-ms-input-placeholder {
    color: rgba(231, 191, 143, 0.6);
}

/* Translation Form */
#translationForm label {
    color: #e7bf8f;
    margin-bottom: 0.5rem;
}

.translation-result {
    display: none;
    background-color: rgba(231, 191, 143, 0.1);
    padding: 1rem;
    border-radius: 0.375rem;
    margin-top: 1rem;
}

.translation-result h4 {
    color: #e7bf8f;
    margin-bottom: 0.5rem;
}

#translationOutput {
    color: #e7bf8f;
}

/* Error Messages */
.error-message {
    background-color: rgba(220, 53, 69, 0.1);
    color: #e7bf8f;
    border-left: 4px solid #dc3545;
    padding: 1rem;
}

/* Loading States */
.placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem;
    text-align: center;
}

.placeholder-content p {
    margin-top: 1.5rem;
    color: #e7bf8f;
}

.placeholder-content p:last-child {
    color: #e7bf8f;
    opacity: 0.7;
}

/* Dictionary and Phrases Tables */
.flex-table {
    width: 100%;
    border-collapse: collapse;
    color: #e7bf8f;
}

.flex-table thead tr {
    background-color: rgba(231, 191, 143, 0.1);
}

.flex-table th, .flex-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(231, 191, 143, 0.1);
}

.flex-table tr:hover {
    background-color: rgba(231, 191, 143, 0.05);
}

/* Language content paragraphs */
.language_paragraph {
    color: #e7bf8f;
    line-height: 1.6;
}

/* Language sections */
.language-section {
    margin-bottom: 2rem;
}


    .tier-selection-container {
        display: flex;
        gap: 20px;
        margin-top: 10px;
    }

    .tier-option {
        flex: 1;
        border: 1px solid #ccc;
        border-radius: 8px;
        padding: 15px;
        position: relative;
        transition: all 0.3s ease;
    }

    .tier-option:hover {
        border-color: #e7bf8f;
        box-shadow: 0 0 10px rgba(231, 191, 143, 0.3);
    }

    .premium-tier {
        border-color: #e7bf8f;
        background-color: rgba(231, 191, 143, 0.05);
    }

.tier-features {
    list-style-type: disc;
    padding-left: 20px;
    margin-top: 10px;
    color: #e7bf8f;
}

.form-check-input:checked + .form-check-label {
    font-weight: bold;
}

.premium-tier .form-check-input:checked + .form-check-label {
    color: #e7bf8f;
}

.subscription-promo {
    border-radius: 8px;
    background-color: rgba(231, 191, 143, 0.1);
}

.subscription-promo .alert {
    background-color: transparent;
    border: none;
    color: #e7bf8f;
}

.badge {
    font-size: 0.7em;
    padding: 4px 8px;
    margin-left: 8px;
    background-color: #e7bf8f;
    color: #151f25;
}

/* Language generator styles*/
#tier {
    color: #e7bf8f;
    background-color: rgba(21, 31, 37, 0.8);
}

.table-wrapper {
    border-radius: 25px;
    overflow: hidden;
    border: 1px solid #f6e6c9;
}

.language-comparison-table {
    margin: 0;
}

.language-comparison-table,
.language-comparison-table th,
.language-comparison-table tbody,
.language-comparison-table td {
    background-color: #151f25;
    color: #e7bf8f;
}

.language-comparison-table th,
.language-comparison-table td {
    border-left: 1px solid #2a2e30;
    border-right: 1px solid #2a2e30; /
}


.language-comparison-table th,
.language-comparison-table td {
    border-top: none;
    border-bottom: none;
}

/* Optional: Remove the very leftmost and rightmost vertical borders for a cleaner look */
.language-comparison-table th:first-child,
.language-comparison-table td:first-child {
    border-left: none;
}
.language-comparison-table th:last-child,
.language-comparison-table td:last-child {
    border-right: none;
}


.premium-teaser-card{
    background-color: #151f25;
    color: #f6e6c9;
    padding: 2vh;
    margin-bottom: 2vh;
    border-radius: 10px;
    border: 1px solid #f6e6c9;
}

/* Contact Language Mixer Styles */
.influence-slider-container {
    margin: 1rem 0;
}

.influence-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    color: rgba(231, 191, 143, 0.7);
}

.influence-labels span {
    font-size: 0.8rem;
    text-align: center;
    flex: 1;
}

.form-range {
    background: rgba(231, 191, 143, 0.1);
    border-radius: 0.25rem;
    height: 0.5rem;
}

.form-range::-webkit-slider-thumb {
    appearance: none;
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 50%;
    background: #e7bf8f;
    cursor: pointer;
    border: 2px solid #151f25;
}

.form-range::-moz-range-thumb {
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 50%;
    background: #e7bf8f;
    cursor: pointer;
    border: 2px solid #151f25;
}

.form-range::-webkit-slider-track {
    background: rgba(231, 191, 143, 0.3);
    border-radius: 0.25rem;
    height: 0.5rem;
}

.form-range::-moz-range-track {
    background: rgba(231, 191, 143, 0.3);
    border-radius: 0.25rem;
    height: 0.5rem;
    border: none;
}

#influence-description {
    margin-top: 0.75rem;
    padding: 0.5rem;
    background: rgba(231, 191, 143, 0.1);
    border-radius: 0.25rem;
    border: 1px solid rgba(231, 191, 143, 0.2);
    color: #e7bf8f;
}

/* Contact Form Specific */
#contactForm .form-select {
    background-color: #151f25;
    border: 1px solid rgba(231, 191, 143, 0.3);
    color: #e7bf8f;
}

#contactForm .form-select:focus {
    border-color: #e7bf8f;
    box-shadow: 0 0 0 0.2rem rgba(231, 191, 143, 0.25);
}

#contactForm .form-control {
    background-color: #151f25;
    border: 1px solid rgba(231, 191, 143, 0.3);
    color: #e7bf8f;
}

#contactForm .form-control:focus {
    border-color: #e7bf8f;
    box-shadow: 0 0 0 0.2rem rgba(231, 191, 143, 0.25);
    background-color: #151f25;
    color: #e7bf8f;
}

/* Language Tree Styles - Mobile Optimized */
.language-tree-container {
    margin: 1rem 0;
}

.language-node {
    display: inline-block;
    min-width: 180px;
    padding: 0.75rem;
    margin: 0.5rem;
    background: rgba(231, 191, 143, 0.1);
    border: 2px solid rgba(231, 191, 143, 0.3);
    border-radius: 0.5rem;
    text-align: center;
    text-decoration: none;
    color: #e7bf8f;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.language-node:hover {
    background: rgba(231, 191, 143, 0.2);
    border-color: #e7bf8f;
    color: #e7bf8f;
    text-decoration: none;
    transform: translateY(-2px);
}

.language-node.current {
    background: rgba(231, 191, 143, 0.2);
    border-color: #e7bf8f;
    border-width: 3px;
}

.language-node.parent {
    border-color: rgba(231, 191, 143, 0.6);
    background: rgba(231, 191, 143, 0.15);
}

.language-node.dialect {
    border-color: rgba(150, 200, 255, 0.5);
    background: rgba(150, 200, 255, 0.1);
}

.language-node.evolution {
    border-color: rgba(255, 150, 200, 0.5);
    background: rgba(255, 150, 200, 0.1);
}

.node-title {
    font-weight: bold;
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}

.node-subtitle {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-bottom: 0.25rem;
}

.node-context {
    font-size: 0.75rem;
    opacity: 0.7;
    font-style: italic;
}

.language-branches {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.language-branch {
    position: relative;
}

.branch-line {
    position: absolute;
    top: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 1rem;
    background: rgba(231, 191, 143, 0.3);
}

.parent-branch-line {
    width: 2px;
    height: 2rem;
    background: rgba(231, 191, 143, 0.3);
    margin: 0 auto;
}

/* Language Tree section headings */
.language-tree-container h5 {
    font-size: 1.8rem;
    color: #e7bf8f;
    margin-bottom: 1rem;
    text-align: center;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .language-node {
        min-width: 150px;
        padding: 0.5rem;
        margin: 0.25rem;
        font-size: 0.75rem;
    }
    
    .node-title {
        font-size: 0.75rem;
        margin-bottom: 0.2rem;
    }
    
    .node-subtitle {
        font-size: 0.7rem;
    }
    
    .node-context {
        font-size: 0.65rem;
    }
    
    .language-tree-container h5 {
        font-size: 1.5rem;
    }
    
    .language-branches {
        gap: 0.25rem;
    }
}

/* Language Lab Form Styling */
#lab-dialect .form-control,
#lab-evolution .form-control,
#lab-contact .form-control,
#lab-contact .form-select {
    color: #e6bf91 !important;
    background-color: transparent !important;
    border: 1px solid rgba(230, 191, 145, 0.3) !important;
    font-family: inherit;
}

#lab-dialect .form-control:focus,
#lab-evolution .form-control:focus,
#lab-contact .form-control:focus,
#lab-contact .form-select:focus {
    background-color: #1e2d34 !important;
    border-color: #e6bf91 !important;
    box-shadow: 0 0 0 0.2rem rgba(230, 191, 145, 0.25) !important;
    color: #e6bf91 !important;
}

#lab-dialect .form-control::placeholder,
#lab-evolution .form-control::placeholder,
#lab-contact .form-control::placeholder {
    color: rgba(230, 191, 145, 0.7) !important;
}

/* Language Lab List Items (Existing Dialects & Evolution History) */
.list-group-item.list-group-item-action {
    background-color: #1e2d34 !important;
    color: #e7bf8e !important;
    border: 1px solid rgba(231, 191, 143, 0.2) !important;
    transition: all 0.3s ease !important;
}

.list-group-item.list-group-item-action:hover {
    background-color: #1e2d34 !important;
    color: #e7bf8e !important;
    transform: scale(1.05) !important;
    border-color: rgba(231, 191, 143, 0.4) !important;
}

.list-group-item.list-group-item-action strong {
    color: #e7bf8e !important;
}

.list-group-item.list-group-item-action .text-muted {
    color: rgba(231, 191, 143, 0.7) !important;
}


.nav-tabs-secondary {
    border-bottom: 1px solid #ddd;
    margin-top: 1rem;
}

.nav-tabs-secondary .nav-link {
    color: #666;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

.nav-tabs-secondary .nav-link:hover {
    border-color: #e9ecef #e9ecef #ddd;
}

.nav-tabs-secondary .nav-link.active {
    color: #495057;
    background-color: #fff;
    border-color: #ddd #ddd #fff;
}

.coming-soon-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(45deg, #f8d7da, #f5c6cb);
    color: #721c24;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 1rem;
    border: 1px solid #f1aeb5;
}

.coming-soon-badge i {
    margin-right: 0.5rem;
}

/* Subscription required styling */
.subscription-required-card {
    border: 2px solid #ffc107;
    background: linear-gradient(135deg, #fff8e1 0%, #fffbf0 100%);
}

.subscription-required-card .card-header {
    background: linear-gradient(135deg, #ffc107 0%, #ffb300 100%);
    color: white;
    border-bottom: none;
}

.premium-features-list {
    margin: 1.5rem 0;
    text-align: left;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.premium-features-list li {
    padding: 0.5rem 0;
    font-size: 0.95rem;
}

/* Language Tree Visualization */
.language-tree-container {
    padding: 1.5rem;
    background-color: #2b2f30;
    border-radius: 10px;
    border: 1px solid #dee2e6;
}

.current-language {
    text-align: center;
    margin-bottom: 1rem;
}

.language-node {
    display: inline-block;
    padding: 1rem;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    position: relative;
    margin: 0.5rem;
    min-width: 200px;
    text-align: center;
}

.language-node i {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.language-node.current {
    background-color: #e7bf8e;
    color: #333;
    box-shadow: 0 4px 15px rgba(231, 191, 142, 0.3);
}

.language-node.parent {
    background-color: #161f26;
    border: 1px solid #e7bf8e;
    color: #e6bf91;
    box-shadow: 0 4px 15px rgba(22, 31, 38, 0.3);
}

.language-node.dialect {
    background-color: #161f26;
    border: 1px solid #e7bf8e;
    color: #e6bf91;
    box-shadow: 0 4px 15px rgba(22, 31, 38, 0.3);
}

.language-node.evolution {
    background-color: #161f26;
    border: 1px solid #e7bf8e;
    color: #e6bf91;
    box-shadow: 0 4px 15px rgba(22, 31, 38, 0.3);
}

.language-node:hover {
    transform: translateY(-2px);
    background-color: #e7bf8e !important;
    color: #2b2f30 !important;
    box-shadow: 0 6px 20px rgba(231, 191, 142, 0.4);
    text-decoration: none;
}

.language-branches {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.language-branch {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.branch-line {
    width: 2px;
    height: 30px;
    background-color: #e7bf8e;
    margin-bottom: 0.5rem;
}

.parent-branch-line {
    width: 2px;
    height: 30px;
    background-color: #e7bf8e;
    margin: 0.5rem auto;
}

.no-derivations {
    padding: 2rem;
    background: rgba(248, 249, 250, 0.5);
    border-radius: 10px;
    border: 1px dashed #dee2e6;
}

/* New Language Tree Tab Styles */
.node-title {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.node-subtitle {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 0.25rem;
}

.node-context {
    font-size: 0.8rem;
    opacity: 0.7;
    font-style: italic;
}


@media (max-width: 768px) {
    .language-branches {
        flex-direction: column;
        align-items: center;
    }

    .language-node {
        min-width: 250px;
    }
}

/* Editable field states - proper class-based approach with higher specificity */
.language-page-container .editable-field .edit-content {
    display: none;
}

.language-page-container .editable-field.editing .edit-content {
    display: block;
}

.language-page-container .editable-field.editing .display-content {
    display: none;
}

/* Hover states for better UX */
.editable-field:hover {
    background-color: rgba(231, 191, 143, 0.1);
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.editable-field.editing {
    background-color: rgba(231, 191, 143, 0.15);
    border-radius: 4px;
    padding: 8px;
}

/* Style for edit inputs */
.editable-field .edit-content input,
.editable-field .edit-content textarea {
    width: 100%;
    border: 2px solid #e7bf8f;
    border-radius: 4px;
    padding: 8px 12px;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    background-color: rgba(255, 255, 255, 0.9);
    resize: vertical;
    min-height: 40px;
}

.editable-field .edit-content input:focus,
.editable-field .edit-content textarea:focus {
    outline: none;
    border-color: #d4a574;
    box-shadow: 0 0 0 2px rgba(231, 191, 143, 0.3);
}

/* Indicate editable fields */
.editable-field::before {
    content: "✏️";
    position: absolute;
    top: -8px;
    right: -8px;
    opacity: 0;
    font-size: 12px;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.editable-field:hover::before {
    opacity: 0.7;
}

.editable-field {
    position: relative;
    padding: 4px;
    margin: -4px;
}

.loading-overlay-hidden {
    display: none !important;
}

.world-culture-icon {
    font-size: 2rem !important;
}

.textarea-large {
    height: 120px !important;
}

/* Loading overlay states */
.loading-overlay-visible {
    display: flex !important;
}

.loading-overlay-hidden {
    display: none !important;
}