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

:root {
    /* Light theme variables */
    --bg-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-secondary: white;
    --text-primary: #333;
    --text-secondary: #666;
    --text-muted: #999;
    --border-color: #e1e5e9;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --card-bg: #f8f9fa;
    --settings-icon-bg: rgba(255, 255, 255, 0.9);
    --settings-icon-hover: white;
}

[data-theme="dark"] {
    /* Dark theme variables */
    --bg-primary: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --bg-secondary: #2d3748;
    --text-primary: #f7fafc;
    --text-secondary: #e2e8f0;
    --text-muted: #a0aec0;
    --border-color: #4a5568;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --card-bg: #4a5568;
    --settings-icon-bg: rgba(45, 55, 72, 0.9);
    --settings-icon-hover: #2d3748;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-primary);
    min-height: 100vh;
    color: var(--text-primary);
    transition: background 0.3s ease, color 0.3s ease;
}

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

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

header a {
    color: white;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    font-weight: 500;
}

header a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

header a svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

header a:hover svg {
    transform: scale(1.1);
}

.lists-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.search-filter-container {
    margin-bottom: 25px;
}

.search-box {
    display: flex;
    gap: 15px;
    align-items: center;
    max-width: 600px;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-filter {
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.3s ease;
    min-width: 150px;
}

.search-filter:focus {
    outline: none;
    border-color: #667eea;
}

.search-filter option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.lists-header h2 {
    color: var(--text-primary);
    font-size: 1.8rem;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

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

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
    transform: translateY(-2px);
}

.lists-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.list-card {
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    position: relative;
}

.list-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.list-card .card-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
    z-index: 10;
}

.list-card:hover .card-actions {
    opacity: 1;
    transform: scale(1);
}

.list-card .export-btn,
.list-card .delete-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s ease;
}

.list-card .export-btn {
    background: #28a745;
    color: white;
}

.list-card .export-btn:hover {
    background: #218838;
    transform: scale(1.1);
}

.list-card .delete-btn {
    background: #dc3545;
    color: white;
}

.list-card .delete-btn:hover {
    background: #c82333;
    transform: scale(1.1);
}

.list-card h3 {
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.list-info {
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.list-info p {
    margin-bottom: 5px;
}

.word-count {
    font-weight: bold;
    color: #667eea;
}

.list-actions {
    display: flex;
    gap: 10px;
}

.list-actions .btn {
    flex: 1;
    text-align: center;
}

/* 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);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--bg-secondary);
    margin: 10% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: modalSlideIn 0.3s ease;
    transition: background 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: #333;
}

.modal h3 {
    margin-bottom: 20px;
    color: var(--text-primary);
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

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

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 30px;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-secondary);
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.empty-state h3 {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

/* Settings Icon */
.settings-icon {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--settings-icon-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    z-index: 100;
}

.settings-icon:hover {
    background: var(--settings-icon-hover);
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.settings-icon svg {
    color: #667eea;
}

/* Settings Modal */
.settings-modal .modal-content {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.settings-content {
    margin-top: 20px;
}

.settings-content p {
    color: var(--text-secondary);
    margin-bottom: 30px;
    text-align: center;
}

.settings-placeholder {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: var(--card-bg);
    border-radius: 8px;
    border-left: 4px solid #667eea;
    transition: background 0.3s ease;
}

.setting-label {
    font-weight: 600;
    color: var(--text-primary);
}

.setting-value {
    color: var(--text-muted);
    font-style: italic;
}

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    cursor: pointer;
    z-index: 2;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
    z-index: 1;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #667eea;
}

input:checked+.slider:before {
    transform: translateX(26px);
}

.theme-label {
    font-weight: 500;
    color: var(--text-primary);
    min-width: 40px;
}

/* Swap Languages Toggle */
.swap-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
}

.swap-label {
    font-weight: 500;
    color: var(--text-primary);
    min-width: 60px;
}

/* Edit List Modal */
.edit-modal .modal-content {
    max-width: 95vw;
    width: 1200px;
    max-height: 90vh;
    height: 90vh;
    overflow: hidden;
    margin: 5vh auto;
}

.edit-list-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    height: calc(100% - 80px);
    /* Account for header */
    overflow: hidden;
}

.add-word-section {
    display: flex;
    flex-direction: column;
    height: fit-content;
    max-height: none;
    overflow-y: auto;
}

.words-list-section {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
}

.word-search-container {
    margin-bottom: 15px;
}

.word-search-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: border-color 0.3s ease;
}

.word-search-input:focus {
    outline: none;
    border-color: #667eea;
}

.word-search-input::placeholder {
    color: var(--text-muted);
}

.edit-word-modal .modal-content {
    max-width: 600px;
    width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    margin: 10vh auto;
}

.edit-word-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.edit-word-header h3 {
    margin-bottom: 8px;
    color: var(--text-primary);
}

.edit-word-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.edit-word-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

.edit-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.edit-title-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.edit-header h3 {
    margin: 0;
    color: var(--text-primary);
}

.list-info-display {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.list-name-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.list-name-container span {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    padding: 4px 8px;
    background: var(--card-bg);
    border-radius: 6px;
    border: 1px solid var(--border-color);
    min-width: 120px;
}

.edit-name-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.edit-name-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    opacity: 1;
    transform: scale(1.1);
}

.edit-name-btn svg {
    width: 16px;
    height: 16px;
}

.list-name-input {
    background: var(--bg-secondary);
    border: 2px solid #667eea;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: inherit;
    min-width: 150px;
}

.list-name-input:focus {
    outline: none;
    border-color: #5a67d8;
}

.new-list-badge {
    background: #28a745;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 8px;
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.add-word-section {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--card-bg);
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.add-word-section h4 {
    margin-bottom: 15px;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.add-word-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.word-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.synonyms-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 15px;
}

.help-text {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 4px;
    display: block;
}

.words-list-section h4 {
    margin-bottom: 15px;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.words-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
}

.word-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: var(--card-bg);
    border-radius: 6px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.word-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.1);
}

.word-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.word-source {
    font-weight: 600;
    color: var(--text-primary);
}

.word-target {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.word-actions {
    display: flex;
    gap: 8px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 4px;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

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

.empty-words {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-style: italic;
}

/* Responsive adjustments for edit modal */
@media (max-width: 768px) {
    .word-inputs {
        grid-template-columns: 1fr;
    }

    .word-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .word-actions {
        align-self: flex-end;
    }
}

/* Test Modal */
.test-modal .modal-content {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.test-setup,
.test-question,
.test-results {
    text-align: center;
}

.test-info {
    margin-bottom: 25px;
    padding: 15px;
    background: var(--card-bg);
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.test-info p {
    margin-bottom: 8px;
    color: var(--text-primary);
}

.test-stats {
    font-weight: 600;
    color: #667eea !important;
}

.test-options {
    margin-bottom: 30px;
}

.test-options .toggle-switch {
    display: inline-block;
    margin-left: 10px;
    position: relative;
    cursor: pointer;
}

.test-options .help-text {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 5px;
    display: block;
}

.test-select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: border-color 0.3s ease;
}

.test-select:focus {
    outline: none;
    border-color: #667eea;
}

.test-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Test Progress */
.test-progress {
    margin-bottom: 30px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Question Container */
.question-container {
    margin-bottom: 30px;
}

.word-to-translate {
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-primary);
    margin: 20px 0;
    padding: 20px;
    background: var(--card-bg);
    border-radius: 8px;
    border: 2px solid var(--border-color);
    transition: border-color 0.3s ease;
}

.word-to-translate:hover {
    border-color: #667eea;
}

.answer-form {
    max-width: 400px;
    margin: 0 auto;
}

/* Answer Feedback */
.answer-feedback {
    margin-top: 30px;
    padding: 20px;
    background: var(--card-bg);
    border-radius: 8px;
    border: 2px solid #dc3545;
    animation: feedbackSlideIn 0.3s ease;
}

@keyframes feedbackSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feedback-header {
    margin-bottom: 15px;
    text-align: center;
}

.feedback-header h4 {
    color: #dc3545;
    margin: 0;
    font-size: 1.2rem;
}

.feedback-content {
    margin-bottom: 20px;
}

.answer-comparison {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.answer-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: var(--bg-secondary);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.answer-label {
    font-weight: 600;
    color: var(--text-primary);
    min-width: 120px;
}

.answer-text {
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.95rem;
}

.wrong-answer {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.correct-answer {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.feedback-actions {
    text-align: center;
}

.feedback-hint {
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-style: italic;
}

/* Results */
.results-summary {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--card-bg);
    border-radius: 8px;
}

.result-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.results-details {
    margin-bottom: 30px;
}

.results-details h4 {
    margin-bottom: 15px;
    color: var(--text-primary);
}

.results-list {
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: var(--card-bg);
    border-radius: 6px;
    border-left: 4px solid;
}

.result-item.correct {
    border-left-color: #28a745;
}

.result-item.incorrect {
    border-left-color: #dc3545;
}

.result-word {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.result-question {
    font-weight: 600;
    color: var(--text-primary);
}

.result-answer {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.result-status {
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.result-status.correct {
    background: #d4edda;
    color: #155724;
}

.result-status.incorrect {
    background: #f8d7da;
    color: #721c24;
}

/* Responsive adjustments for test modal */
@media (max-width: 768px) {
    .results-summary {
        flex-direction: column;
        gap: 20px;
    }

    .test-actions {
        flex-direction: column;
    }

    .word-to-translate {
        font-size: 1.5rem;
        padding: 15px;
    }
}

/* Custom Popup Modal */
.popup-modal .modal-content {
    max-width: 400px;
    text-align: center;
    z-index: 1002;
}

.popup-modal {
    z-index: 1001;
}

.popup-header {
    margin-bottom: 20px;
}

.popup-header h3 {
    color: var(--text-primary);
    margin: 0;
    font-size: 1.3rem;
}

.popup-body {
    margin-bottom: 25px;
}

.popup-body p {
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.popup-actions {
    display: flex;
    justify-content: center;
}

.popup-actions .btn {
    min-width: 80px;
}

.export-import-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.export-import-buttons .btn {
    flex: 1;
    min-width: 100px;
}

/* Confirmation Modal */
.confirm-modal .modal-content {
    max-width: 450px;
    text-align: center;
}

.confirm-header {
    margin-bottom: 20px;
}

.confirm-header h3 {
    color: var(--text-primary);
    margin: 0;
    font-size: 1.3rem;
}

.confirm-body {
    margin-bottom: 25px;
}

.confirm-body p {
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.confirm-instruction {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 10px !important;
}

.confirm-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: border-color 0.3s ease;
    margin-top: 10px;
}

.confirm-input:focus {
    outline: none;
    border-color: #667eea;
}

.confirm-input::placeholder {
    color: var(--text-muted);
}

.confirm-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.confirm-actions .btn {
    min-width: 100px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    header h1 {
        font-size: 2.5rem;
    }

    .lists-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .search-box {
        flex-direction: column;
        gap: 10px;
        max-width: 100%;
    }

    .search-input,
    .search-filter {
        width: 100%;
        min-width: auto;
    }

    .lists-container {
        grid-template-columns: 1fr;
    }

    .list-actions {
        flex-direction: column;
    }

    .modal-content {
        margin: 5% auto;
        width: 95%;
        padding: 20px;
    }

    .form-actions {
        flex-direction: column;
    }

    .settings-icon {
        top: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
    }

    .json-structure-modal .modal-content {
        width: 95vw;
        max-width: none;
        margin: 2vh auto;
        padding: 15px;
    }

    .json-example {
        font-size: 0.75rem;
        padding: 10px;
    }

    .json-actions {
        flex-direction: column;
        gap: 8px;
    }

    .json-actions .btn {
        min-width: auto;
        width: 100%;
    }

    .edit-modal .modal-content {
        width: 95vw;
        max-width: none;
        height: 95vh;
        max-height: 95vh;
        margin: 2.5vh auto;
        padding: 15px;
    }

    .edit-list-content {
        grid-template-columns: 1fr;
        gap: 20px;
        height: calc(100% - 80px);
    }

    .add-word-section {
        height: fit-content;
        max-height: none;
    }

    .words-list-section {
        height: auto;
        max-height: 60vh;
    }

    .words-list {
        max-height: none;
    }

    .synonyms-inputs {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* JSON Structure Modal */
.json-structure-modal .modal-content {
    max-width: 90vw;
    width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    margin: 5vh auto;
    z-index: 1001;
}

.json-structure-modal {
    z-index: 1000;
}

.json-structure-header {
    margin-bottom: 20px;
}

.json-structure-header h3 {
    color: var(--text-primary);
    margin-bottom: 10px;
}

.json-structure-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.json-example {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    overflow-x: auto;
}

.json-example pre {
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-wrap: break-word;
}

.json-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.json-actions .btn {
    min-width: 120px;
}

/* Info button styling */
.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
    transform: translateY(-2px);
}

.json-structure-buttons {
    display: flex;
    gap: 10px;
}

.data-management-buttons {
    display: flex;
    gap: 10px;
}

.settings-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
    text-align: center;
}

.settings-footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.settings-footer a {
    color: var(--text-primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 6px;
    transition: all 0.3s ease;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
}

.settings-footer a:hover {
    background: var(--bg-secondary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.settings-footer svg {
    transition: transform 0.3s ease;
}

.settings-footer a:hover svg {
    transform: scale(1.1);
}