/* 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;
}