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

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 15px;
}

/* Navigation styles */
.page-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.nav-left {
    display: flex;
    gap: 10px;
}

.nav-right {
    display: flex;
    gap: 10px;
}

.nav-btn {
    background-color: #ecf0f1;
    color: #2c3e50;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background-color: #d5dbdb;
}

.nav-btn.active {
    background-color: #3498db;
    color: white;
}

.nav-btn.active:hover {
    background-color: #2980b9;
}

.add-section, .translations-section {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.add-section h2, .translations-section h2 {
    margin-bottom: 15px;
    color: #34495e;
    font-size: 1.2rem;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
}

button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
}

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

.cancel-btn {
    background-color: #95a5a6;
    margin-left: 10px;
}

.cancel-btn:hover {
    background-color: #7f8c8d;
}

/* Table styles for translations */
.table-container {
    overflow-x: auto;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.translations-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    min-width: 700px;
}

.translations-table th {
    background-color: #34495e;
    color: white;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    border-bottom: 2px solid #2c3e50;
    position: sticky;
    top: 0;
    z-index: 10;
}

.translations-table th:first-child {
    border-top-left-radius: 5px;
}

.translations-table th:last-child {
    border-top-right-radius: 5px;
}

.translation-row {
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
}

.translation-row:hover {
    background-color: #f8f9fa;
}

.translation-row:last-child {
    border-bottom: none;
}

.translations-table td {
    padding: 12px 15px;
    vertical-align: top;
    border-right: 1px solid #f0f0f0;
}

.translations-table td:last-child {
    border-right: none;
}

.en-cell {
    font-weight: 600;
    color: #2c3e50;
    max-width: 200px;
    word-wrap: break-word;
}

.de-cell {
    color: #27ae60;
    font-weight: 500;
    max-width: 200px;
    word-wrap: break-word;
}

.tags-cell {
    max-width: 150px;
}

.tag-chip {
    display: inline-block;
    background-color: #e3f2fd;
    color: #1976d2;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    margin: 1px 2px;
    border: 1px solid #bbdefb;
}

.tip-cell {
    font-style: italic;
    color: #8e44ad;
    max-width: 200px;
    word-wrap: break-word;
    font-size: 13px;
}

.no-content {
    color: #bdc3c7;
    font-style: italic;
}

.actions-cell {
    white-space: nowrap;
    width: 120px;
}

.table-btn {
    font-size: 11px;
    padding: 4px 8px;
    margin: 0 2px;
    border-radius: 3px;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 20px;
    border-radius: 5px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.close:hover {
    color: #333;
}

.form-buttons {
    margin-top: 20px;
}

.empty-state {
    text-align: center;
    color: #7f8c8d;
    padding: 40px;
    font-style: italic;
}

/* Toast notification styles */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    max-width: 300px;
}

.toast {
    background-color: #2ecc71;
    color: white;
    padding: 12px 36px 12px 16px;
    margin-bottom: 10px;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease-in-out;
    position: relative;
    word-wrap: break-word;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.success {
    background-color: #2ecc71;
}

.toast.error {
    background-color: #e74c3c;
}

.toast.info {
    background-color: #3498db;
}

.toast .close-toast {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
}

.toast .close-toast:hover {
    opacity: 1;
    background: none;
}

/* Autocomplete styles */
.autocomplete-container {
    position: relative;
    display: inline-block;
    width: 100%;
}

.autocomplete-input {
    width: 100%;
    box-sizing: border-box;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: none;
}

.autocomplete-dropdown.show {
    display: block;
}

.autocomplete-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background-color: #f5f5f5;
}

.autocomplete-item.selected {
    background-color: #e3f2fd;
}

.tag-name {
    font-weight: 500;
}

.tag-count {
    font-size: 0.8em;
    color: #666;
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 12px;
}

.autocomplete-item .tag-count {
    margin-left: 8px;
}

/* Common tags bubbles */
.common-tags {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.common-tags-label {
    font-size: 0.85em;
    color: #666;
    margin-right: 4px;
    font-weight: 500;
}

.common-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-bubble {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    cursor: pointer;
    border: 1px solid #bbdefb;
    transition: all 0.2s ease;
    user-select: none;
}

.tag-bubble:hover {
    background: #bbdefb;
    border-color: #90caf9;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tag-bubble:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.tag-bubble-count {
    background: #1976d2;
    color: white;
    padding: 1px 5px;
    border-radius: 8px;
    font-size: 0.75em;
    font-weight: 500;
    min-width: 16px;
    text-align: center;
}

/* Hide common tags on mobile to save space */
@media (max-width: 600px) {
    .common-tags {
        display: none;
    }
}

/* Filter section styles for review page */
.filter-section {
    width: 100%;
    margin-top: 15px;
    margin-bottom: 20px;
}

.filter-tag.selected {
    background: #e3f2fd;
    color: #1976d2;
    border-color: #bbdefb;
}

.filter-tag.deselected {
    background: #f5f5f5;
    color: #757575;
    border-color: #e0e0e0;
    opacity: 0.6;
}

.filter-tag.deselected:hover {
    background: #eeeeee;
    border-color: #d0d0d0;
    opacity: 0.8;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.filter-tag.deselected .tag-bubble-count {
    background: #757575;
    color: white;
}

/* Show filter tags on mobile for review page */
@media (max-width: 600px) {
    .filter-section .common-tags {
        display: flex;
    }
}

@media (max-width: 480px) {
    #toast-container {
        right: 10px;
        left: 10px;
        max-width: none;
    }
} 

/* Responsive table design */
@media (max-width: 768px) {
    .table-container {
        border-radius: 0;
        margin: -20px;
        margin-top: 0;
    }
    
    .translations-table {
        min-width: 600px;
        font-size: 13px;
    }
    
    .translations-table th,
    .translations-table td {
        padding: 8px 10px;
    }
    
    .en-cell,
    .de-cell,
    .tip-cell {
        max-width: 150px;
    }
    
    .tags-cell {
        max-width: 120px;
    }
    
    .table-btn {
        font-size: 10px;
        padding: 3px 6px;
    }
}

@media (max-width: 480px) {
    .translations-table {
        min-width: 500px;
        font-size: 12px;
    }
    
    .translations-table th,
    .translations-table td {
        padding: 6px 8px;
    }
    
    .en-cell,
    .de-cell {
        max-width: 120px;
    }
    
    .tip-cell {
        max-width: 100px;
    }
    
    .tags-cell {
        max-width: 80px;
    }
} 

/* Update edit/delete button styles for table */
.edit-btn {
    background-color: #f39c12;
}

.edit-btn:hover {
    background-color: #d68910;
}

.delete-btn {
    background-color: #e74c3c;
}

.delete-btn:hover {
    background-color: #c0392b;
}

/* Review page styles */
.page-content {
    transition: opacity 0.3s ease;
}

.review-section {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 0 auto;
}

.review-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 25px;
    gap: 15px;
}

.review-section h2 {
    text-align: center;
    color: #2c3e50;
    margin: 0;
    font-size: 1.4rem;
}

.language-toggle {
    display: flex;
    justify-content: center;
}

.toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.toggle-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.toggle-text {
    font-size: 13px;
}

.toggle-icon {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.toggle-btn:hover .toggle-icon {
    transform: rotate(180deg);
}

.review-content {
    text-align: center;
}

.progress-info {
    margin-bottom: 20px;
    color: #7f8c8d;
    font-size: 14px;
    font-weight: 500;
}

.question-sentence {
    margin-bottom: 30px;
    padding: 25px;
    background: transparent;
    border-radius: 8px;
}

.question-sentence h3 {
    color: black;
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
}

.answer-section {
    margin-bottom: 20px;
}

.answer-section label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #2c3e50;
}

#answer-input {
    width: 100%;
    max-width: 400px;
    padding: 12px 16px;
    font-size: 28px;
    border: 2px solid #ddd;
    border-radius: 6px;
    transition: border-color 0.3s ease;
}

#answer-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Additional textarea-specific styling */
textarea#answer-input {
    resize: vertical;
    min-height: 80px;
    line-height: 1.4;
    font-family: Arial, sans-serif;
}

.help-icon-container {
    display: flex;
    justify-content: center;
    margin-top: 8px;
    margin-bottom: 8px;
}

.help-btn {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(243, 156, 18, 0.3);
    opacity: 0.8;
}

.help-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(243, 156, 18, 0.4);
    background: linear-gradient(135deg, #e67e22 0%, #d68910 100%);
    opacity: 1;
}

.help-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(243, 156, 18, 0.3);
}

.help-icon {
    font-size: 14px;
    line-height: 1;
}

.help-text {
    font-size: 11px;
    font-weight: 600;
}

.action-buttons-container {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 15px;
}

#submit-answer {
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

#submit-answer:hover {
    background-color: #219a52;
}

#submit-answer:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

#skip-question.skip-btn {
    background-color: #e8e8e8;
    color: #333;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

#skip-question.skip-btn:hover {
    background-color: #d5d5d5;
}

#skip-question.skip-btn:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

.review-status {
    min-height: 20px;
    margin-top: 15px;
}

/* Mobile responsive for review page */
@media (max-width: 600px) {
    .review-section {
        padding: 20px;
        margin: 0 10px;
    }
    
    .review-header {
        gap: 10px;
    }
    
    .toggle-btn {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .toggle-text {
        font-size: 12px;
    }
    
    .question-sentence {
        padding: 20px;
    }
    
    .question-sentence h3 {
        font-size: 1.1rem;
    }
    
    #answer-input {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .action-buttons-container {
        gap: 10px;
        flex-wrap: nowrap;
        justify-content: space-between;
    }
    
    #submit-answer,
    #skip-question.skip-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .help-btn {
        padding: 5px 10px;
        font-size: 11px;
    }
    
    .help-icon {
        font-size: 12px;
    }
    
    .help-text {
        font-size: 10px;
    }
    
    .page-nav {
        gap: 5px;
    }
    
    .nav-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
} 

/* Question tags display in review page */
.question-tags {
    margin-top: 8px;
    text-align: center;
}

.question-tag {
    display: inline-block;
    color: #999;
    font-size: 11px;
    font-weight: 400;
    margin: 0 3px;
    opacity: 0.8;
}

.question-tag:not(:last-child)::after {
    content: "•";
    margin-left: 6px;
    color: #ccc;
}

/* Authentication styles */
.login-btn {
    background-color: #3498db !important;
    color: white !important;
}

.login-btn:hover {
    background-color: #2980b9 !important;
}

.login-btn.authenticated {
    background-color: #e74c3c !important;
    color: white !important;
}

.login-btn.authenticated:hover {
    background-color: #c0392b !important;
}

.auth-status {
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
}

.auth-status.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.auth-status.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Hide write functionality when not authenticated */
.write-protected {
    display: none;
}

.write-protected.authenticated {
    display: block;
}

.write-protected.authenticated.form-group {
    display: flex;
}

.write-protected.authenticated.table-btn {
    display: inline-block;
} 