/* card-settings.css */
/* ========== ОСНОВНЫЕ СТИЛИ ========== */
body {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    min-height: 100vh;
    color: white;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: #4CAF50;
}

.app {
    background: transparent;
}

.settings-content {
    background: transparent;
}

.settings-block {
    background: transparent;
    /*margin: 100px;
    padding: 100;*/
}

/* ========== ВЫПАДАЮЩИЕ МЕНЮ ========== */
.dropdown-menu {
    background: #2d2d2d;
    border: 2px solid #4CAF50;
    border-radius: 16px;
    margin: 10px;
    padding: 10px;
}

/* ========== КОНТЕКСТНЫЕ МЕНЮ ========== */
.deck-context-menu {
    position: fixed;
    background: #2d2d2d;
    border: 2px solid #4CAF50;
    border-radius: 12px;
    padding: 8px 0;
    min-width: 220px;
    z-index: 10000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.word-context-menu {
    position: fixed;
    background: #2d2d2d;
    border: 2px solid #4CAF50;
    border-radius: 12px;
    padding: 8px 0;
    min-width: 220px;
    z-index: 100001;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.context-menu-item {
    padding: 12px 20px;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 14px;
}

.context-menu-item:hover {
    background: rgba(76,175,80,0.3);
}

/* ========== МОДАЛЬНЫЕ ОКНА - КОЛОДЫ ========== */
/* Создание колоды */
.create-deck-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100050;
}

.create-deck-content {
    background: #2d2d2d;
    border: 2px solid #4CAF50;
    border-radius: 20px;
    padding: 25px;
    min-width: 320px;
    max-width: 90%;
}

.create-deck-content h3 {
    color: white;
    margin-bottom: 20px;
    text-align: center;
}

.create-deck-input {
    width: 100%;
    background: #333;
    border: 2px solid #555;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    padding: 12px;
    margin-bottom: 20px;
    outline: none;
    box-sizing: border-box;
}

.create-deck-input:focus {
    border-color: #4CAF50;
}

/*.deck-type-select {
    margin-bottom: 20px;
}

.deck-type-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    cursor: pointer;
    color: white;
}*/

.deck-type-option input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #4CAF50;
}

.create-deck-buttons {
    display: flex;
    gap: 10px;
}

.create-deck-cancel {
    flex: 1;
    background: #888;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.create-deck-confirm {
    flex: 1;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

/* Переименование колоды */
.rename-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
}

.rename-modal-content {
    background: #2d2d2d;
    border: 2px solid #4CAF50;
    border-radius: 20px;
    padding: 25px;
    min-width: 280px;
    max-width: 90%;
}

.rename-modal-content h3 {
    color: white;
    margin-bottom: 20px;
    text-align: center;
}

.rename-input {
    width: 100%;
    background: #333;
    border: 2px solid #4CAF50;
    border-radius: 12px;
    color: white;
    font-size: 18px;
    padding: 12px;
    margin-bottom: 20px;
    outline: none;
    box-sizing: border-box;
}

.rename-input:focus {
    border-color: #FF9800;
}

.rename-buttons {
    display: flex;
    gap: 10px;
}

.rename-buttons button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.rename-save {
    background: #4CAF50;
    color: white;
}

.rename-cancel {
    background: #f44336;
    color: white;
}

/* Создание реверс-колоды */
.reverse-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
}

.reverse-modal-content {
    background: #2d2d2d;
    border: 2px solid #4CAF50;
    border-radius: 20px;
    padding: 25px;
    min-width: 300px;
    max-width: 90%;
}

.reverse-modal-content h3 {
    color: white;
    margin-bottom: 15px;
    text-align: center;
}

.reverse-modal-content p {
    color: #ccc;
    margin-bottom: 15px;
    text-align: center;
}

.reverse-input {
    width: 100%;
    background: #333;
    border: 2px solid #4CAF50;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    padding: 12px;
    margin-bottom: 20px;
    outline: none;
    box-sizing: border-box;
}

.reverse-buttons {
    display: flex;
    gap: 10px;
}

.reverse-cancel {
    flex: 1;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.reverse-create {
    flex: 1;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.reverse-stats {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 15px;
    margin: 15px 0;
    text-align: left;
}

.stat-item {
    color: white;
    padding: 5px 0;
}

.reverse-options {
    margin: 15px 0;
    text-align: left;
}

.reverse-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    cursor: pointer;
    color: white;
}

.reverse-option input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #4CAF50;
}

/* Удаление колоды */
.delete-deck-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100030;
}

.delete-deck-content {
    background: #2d2d2d;
    border: 2px solid #f44336;
    border-radius: 20px;
    padding: 25px;
    max-width: 90%;
    width: 380px;
    text-align: center;
}

.delete-deck-content h3 {
    color: #f44336;
    margin-bottom: 15px;
}

.delete-deck-content p {
    color: white;
    margin-bottom: 10px;
}

/* ========== МОДАЛЬНЫЕ ОКНА - КАРТОЧКИ ========== */
/* Добавление карточки */
.add-word-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
}

.add-word-modal-content {
    background: #2d2d2d;
    border: 2px solid #4CAF50;
    border-radius: 20px;
    padding: 25px;
    min-width: 300px;
    max-width: 90%;
    width: 500px;
}

.add-word-modal-content h3 {
    color: white;
    margin-bottom: 20px;
    text-align: center;
    font-size: 18px;
}

.add-word-modal-content .add-word-input {
    width: 100%;
    background: #333;
    border: 2px solid #555;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    padding: 12px;
    margin-bottom: 15px;
    outline: none;
    box-sizing: border-box;
}

.add-word-modal-content .add-word-input:focus {
    border-color: #4CAF50;
}

.add-word-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.add-word-save {
    flex: 2;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.add-word-cancel {
    flex: 1;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

/* Автодополнение */
.autocomplete-container {
    position: relative;
    width: 100%;
}

.autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #333;
    border: 2px solid #4CAF50;
    border-top: none;
    border-radius: 0 0 12px 12px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
}

.autocomplete-item {
    padding: 10px 15px;
    cursor: pointer;
    color: white;
    border-bottom: 1px solid #444;
}

.autocomplete-item:hover {
    background: #4CAF50;
}

/* Предупреждение о дубликате при добавлении */
.duplicate-warning-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100004;
}

.duplicate-warning-content {
    background: #2d2d2d;
    border: 2px solid #FF9800;
    border-radius: 20px;
    padding: 25px;
    max-width: 90%;
    width: 350px;
    text-align: center;
}

.duplicate-warning-content h3 {
    color: #FF9800;
    margin-bottom: 15px;
}

.duplicate-warning-content p {
    color: white;
    margin-bottom: 10px;
}

.duplicate-warning-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.duplicate-warning-cancel {
    flex: 1;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 10px;
    cursor: pointer;
}

.duplicate-warning-confirm {
    flex: 1;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 10px;
    cursor: pointer;
}

/* Список слов (модальное окно) */
.wordlist-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
}

.wordlist-modal-content {
    background: #2d2d2d;
    border: 2px solid #4CAF50;
    border-radius: 20px;
    width: 90%;
    max-width: 1200px;
    height: 85%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.wordlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #444;
}

.wordlist-header h3 {
    color: white;
    margin: 0;
}

.wordlist-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0 10px;
}

.wordlist-close:hover {
    color: #f44336;
}

.wordlist-filter {
    padding: 15px 25px;
    border-bottom: 1px solid #444;
}

.wordlist-filter .filter-search {
    width: 100%;
    background: #333;
    border: 2px solid #555;
    border-radius: 30px;
    padding: 12px 20px;
    color: white;
    font-size: 16px;
    outline: none;
}

.wordlist-filter .filter-search:focus {
    border-color: #4CAF50;
}

.wordlist-container {
    flex: 1;
    overflow-y: auto;
    padding: 15px 25px;
}

.wordlist-item {
    background: #333;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.wordlist-item:hover {
    background: #3a3a3a;
}

.wordlist-word {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    flex: 1;
}

.wordlist-word .word-english {
    font-weight: bold;
    font-size: 16px;
    color: #4CAF50;
}

.wordlist-word .word-transcription {
    color: #888;
    font-size: 14px;
}

.wordlist-word .word-translation {
    color: white;
}

.wordlist-word .word-status {
    color: #FF9800;
    font-size: 12px;
}

/* Переименование карточки */
.rename-word-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100002;
}

.rename-word-modal-content {
    background: #2d2d2d;
    border: 2px solid #4CAF50;
    border-radius: 20px;
    padding: 25px;
    width: 400px;
    max-width: 90%;
}

.rename-word-modal-content h3 {
    color: white;
    margin-bottom: 20px;
    text-align: center;
}

.rename-word-modal-content .rename-input {
    width: 100%;
    background: #333;
    border: 2px solid #555;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    padding: 12px;
    margin-bottom: 15px;
    outline: none;
    box-sizing: border-box;
}

.rename-word-modal-content .rename-input:focus {
    border-color: #4CAF50;
}

/* Удаление карточки */
.delete-word-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100030;
}

.delete-word-content {
    background: #2d2d2d;
    border: 2px solid #f44336;
    border-radius: 20px;
    padding: 25px;
    max-width: 90%;
    width: 350px;
    text-align: center;
}

.delete-word-content h3 {
    color: #f44336;
    margin-bottom: 15px;
}

.delete-options {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 15px;
    margin: 15px 0;
    text-align: left;
}

.delete-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    cursor: pointer;
    color: white;
}

.delete-option input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #4CAF50;
}

.word-preview {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 15px;
    margin: 15px 0;
}

.word-eng {
    font-size: 18px;
    font-weight: bold;
    color: #4CAF50;
    display: block;
}

.word-trans {
    color: #ccc;
    font-size: 14px;
}

.delete-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.delete-cancel {
    flex: 1;
    background: #888;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.delete-confirm {
    flex: 1;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

/* Создание обратной карточки - выбор колоды */
.reverse-choice-modal,
.reverse-deck-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100010;
}

.reverse-choice-content,
.reverse-deck-content {
    background: #2d2d2d;
    border: 2px solid #4CAF50;
    border-radius: 20px;
    padding: 25px;
    min-width: 300px;
    max-width: 90%;
    text-align: center;
}

.reverse-choice-content h3,
.reverse-deck-content h3 {
    color: white;
    margin-bottom: 15px;
}

.reverse-choice-content p {
    color: #ccc;
    margin-bottom: 20px;
}

.reverse-choice-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.reverse-choice-buttons button,
.reverse-deck-cancel {
    padding: 12px;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.reverse-current {
    background: #4CAF50;
    color: white;
}

.reverse-other {
    background: #2196F3;
    color: white;
}

.reverse-cancel {
    background: #f44336;
    color: white;
}

.decks-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.deck-option {
    background: #333;
    padding: 12px;
    margin: 8px 0;
    border-radius: 12px;
    cursor: pointer;
    color: white;
    transition: background 0.2s;
}

.deck-option:hover {
    background: #4CAF50;
}

.confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100060;
}

.confirm-modal-content {
    background: #2d2d2d;
    border: 2px solid #FF9800;
    border-radius: 20px;
    padding: 25px;
    min-width: 300px;
    max-width: 90%;
    text-align: center;
}

.confirm-modal-content h3 {
    color: #FF9800;
    margin-bottom: 15px;
}

.confirm-modal-content p {
    color: white;
    margin-bottom: 20px;
}

.confirm-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.confirm-cancel {
    background: #888;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.confirm-ok {
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

/* Перенос карточки */
.move-word-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100040;
}

.move-word-content {
    background: #2d2d2d;
    border: 2px solid #4CAF50;
    border-radius: 20px;
    padding: 25px;
    min-width: 300px;
    max-width: 90%;
}

.move-word-content h3 {
    color: white;
    margin-bottom: 15px;
    text-align: center;
}

.move-word-cancel {
    width: 100%;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 12px;
    margin-top: 15px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

/* Сброс прогресса карточки */
.reset-word-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100045;
}

.reset-word-content {
    background: #2d2d2d;
    border: 2px solid #FF9800;
    border-radius: 20px;
    padding: 25px;
    max-width: 90%;
    width: 350px;
    text-align: center;
}

.reset-word-content h3 {
    color: #FF9800;
    margin-bottom: 15px;
}

.reset-word-content p {
    color: white;
    margin-bottom: 10px;
}

.reset-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.reset-cancel {
    flex: 1;
    background: #888;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.reset-confirm {
    flex: 1;
    background: #FF9800;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

/* ========== ОБЩИЕ МОДАЛЬНЫЕ ОКНА ========== */
/* Успех */
.success-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100005;
}

.success-modal-content {
    background: #2d2d2d;
    border: 2px solid #4CAF50;
    border-radius: 20px;
    padding: 25px;
    min-width: 280px;
    max-width: 90%;
    text-align: center;
}

.success-modal-content h3 {
    color: #4CAF50;
    margin-bottom: 15px;
}

.success-modal-content p {
    color: white;
    margin-bottom: 20px;
}

.success-ok {
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 10px 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

/* Ошибка */
.error-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100200;
    /*z-index: 100003;*/
}

.error-modal-content {
    background: #2d2d2d;
    border: 2px solid #f44336;
    border-radius: 20px;
    padding: 25px;
    min-width: 280px;
    max-width: 90%;
    text-align: center;
}

.error-modal-content h3 {
    color: #f44336;
    margin-bottom: 15px;
}

.error-modal-content p {
    color: white;
    margin-bottom: 20px;
}

.error-ok {
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 10px 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

/* Загрузка */
.loading-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100020;
}

.loading-content {
    background: #2d2d2d;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #444;
    border-top-color: #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Предупреждение о дубликате (общее) */
.duplicate-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100001;
}

.duplicate-modal-content {
    background: #2d2d2d;
    border: 2px solid #FF9800;
    border-radius: 20px;
    padding: 25px;
    max-width: 90%;
    width: 400px;
}

.duplicate-modal-content h3 {
    color: #FF9800;
    margin-bottom: 15px;
    text-align: center;
}

.duplicate-list {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    max-height: 200px;
    overflow-y: auto;
}

.duplicate-item {
    color: #ccc;
    padding: 5px 0;
    font-size: 14px;
}

.duplicate-modal-content p {
    color: white;
    margin-bottom: 20px;
    text-align: center;
}

.duplicate-buttons {
    display: flex;
    gap: 10px;
}

.duplicate-cancel {
    flex: 1;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.duplicate-confirm {
    flex: 1;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

/* ========== ЭЛЕМЕНТЫ СПИСКА КОЛОД ========== */
.deck-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #444;
    gap: 10px;
}

.deck-item.locked {
    opacity: 0.8;
    background: rgba(255,255,255,0.05);
}

.deck-name {
    flex: 1;
    font-size: 16px;
}

.deck-badge {
    background: #4CAF50;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.deck-lock {
    color: #888;
    font-size: 14px;
}

.deck-count {
    color: #4CAF50;
    font-size: 14px;
    margin-right: 10px;
}

.deck-divider {
    height: 1px;
    background: #444;
    margin: 10px 0;
}

.add-deck-btn {
    width: 100%;
    background: rgba(76,175,80,0.2);
    border: 2px dashed #4CAF50;
    border-radius: 8px;
    padding: 15px;
    color: #4CAF50;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.2s;
}

.add-deck-btn:hover {
    background: rgba(76,175,80,0.3);
}

/* Кнопка "Карточки" - как кнопка входа в настройки */
.cards-btn {
    display: block;
    width: 100%;
    box-sizing: border-box;  /* ← важно! */
    background: linear-gradient(45deg, #2196F3, #1976D2);
    border: 1px;
    border-radius: 60px;
    padding: 15px /*25px*/;
    color: white;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    box-shadow: 0 5px 15px rgba(33,150,243,0.3);
}

.cards-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(33,150,243,0.4);
    background: linear-gradient(45deg, #1e88e5, #1565c0);
}

.cards-btn:active {
    transform: translateY(0);
}

/* Кнопка "Создать новую колоду" - зелёная */
.add-deck-btn {
    width: 100%;
    background: linear-gradient(45deg, #4CAF50, #45a049);
    border: none;
    border-radius: 60px;
    padding: 15px 25px;
    color: white;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    box-shadow: 0 5px 15px rgba(76,175,80,0.3);
}

.add-deck-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(76,175,80,0.4);
    background: linear-gradient(45deg, #43a047, #2e7d32);
}


/* ========== КНОПКА "СИСТЕМНЫЕ" ========== */
.system-decks-toggle {
    width: auto;
    background: linear-gradient(45deg, #FF9800, #F57C00);
    border: none;
    border-radius: 30px;
    padding: 10px 20px;
    color: white;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 10px;
    box-shadow: 0 4px 10px rgba(255,152,0,0.3);
    vertical-align: middle;
}

.system-decks-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255,152,0,0.4);
}

.system-decks-toggle:active {
    transform: translateY(0);
}

/* ========== ВЫПАДАЮЩИЙ СПИСОК СИСТЕМНЫХ КОЛОД ========== */
.system-decks-dropdown {
    background: #2d2d2d;
    border: 2px solid #FF9800;
    border-radius: 16px;
    margin: 10px 0;
    padding: 5px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.system-deck-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid #444;
    color: white;
    font-size: 16px;
    transition: background 0.2s;
    cursor: default;
}

.system-deck-item:last-child {
    border-bottom: none;
}

.system-deck-item:hover {
    background: rgba(255,255,255,0.05);
}

.system-deck-item span:first-child {
    flex: 1;
}

.toggle-visibility {
    cursor: pointer;
    font-size: 22px;
    padding: 5px 10px;
    border-radius: 8px;
    transition: all 0.2s;
    user-select: none;
}

.toggle-visibility:hover {
    background: rgba(255,255,255,0.1);
    transform: scale(1.2);
}


/* ========== АДАПТИВНЫЕ СТИЛИ ========== */
/* Планшеты */
@media (min-width: 768px) and (max-width: 1023px) {
    .add-word-modal-content {
        width: 90%;
    }
}

/* Смартфоны */
@media (max-width: 768px) {
    .deck-context-menu {
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
        max-width: calc(100% - 20px);
    }
    
    .word-context-menu {
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
        max-width: calc(100% - 20px);
    }

    .rename-input {
        font-size: 18px;
        padding: 8px 12px;
    }

    .add-word-modal-content {
        width: 95%;
        max-width: 95%;
        padding: 20px;
    }
    
    .add-word-modal-content .add-word-input {
        font-size: 18px;
        padding: 14px;
    }
    
    .add-word-save, .add-word-cancel {
        padding: 14px;
        font-size: 18px;
    }

    .duplicate-modal-content,
    .duplicate-warning-content,
    .delete-word-content,
    .delete-deck-content,
    .reset-word-content {
        width: 90%;
        padding: 20px;
    }
    
    .duplicate-cancel, .duplicate-confirm,
    .duplicate-warning-cancel, .duplicate-warning-confirm,
    .delete-cancel, .delete-confirm,
    .reset-cancel, .reset-confirm {
        padding: 14px;
        font-size: 18px;
    }

    .rename-modal-content,
    .rename-word-modal-content {
        width: 90%;
        padding: 20px;
    }
    
    .rename-input {
        font-size: 20px;
        padding: 15px;
    }
    
    .rename-buttons button {
        padding: 15px;
        font-size: 18px;
    }

    .wordlist-modal-content {
        width: 95%;
        height: 90%;
    }
    
    .wordlist-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .wordlist-word {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .create-deck-content {
        width: 90%;
        min-width: auto;
    }
    
    .reverse-choice-content,
    .reverse-deck-content,
    .move-word-content {
        width: 90%;
        min-width: auto;
    }
}