/* ============================================================
   Lexilet – Dashboard Styles: Games & Interactive Elements
   Part of the refactored 3.4.0.0 CSS module system.
   Requires: lexilet-dashboard-core.css
   ============================================================ */

/* ============================================================
   v1.8.0 – Matching Game
   ============================================================ */

/* -- Game setup ------------------------------------------- */
.lexd-game-setup {
    text-align: center;
    padding: 20px 0;
}

.lexd-game-setup select,
.lexd-game-setup .lexd-game-mode-group {
    display: inline-block;
    margin: 0 8px 12px;
}

.lexd-game-setup select {
    padding: 10px 14px;
    border: 1px solid #dde1e7;
    border-radius: 8px;
    font-size: 0.95rem;
    background: #fff;
    min-width: 200px;
}

.lexd-game-mode-group label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid #dde1e7;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.88rem;
    margin: 0 4px;
    transition: background 0.15s, border-color 0.15s;
}

.lexd-game-mode-group input[type="radio"] {
    display: none;
}

.lexd-game-mode-group input[type="radio"]:checked+span {
    color: #5a52e0;
    font-weight: 700;
}

.lexd-game-mode-group label:has(input:checked) {
    border-color: #5a52e0;
    background: #f4f3ff;
}

.lexd-game-start {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 32px;
    background: linear-gradient(135deg, #6c63ff, #897cff);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.2s, transform 0.1s;
}

html body .lexd .lexd-game-start:hover {
    background: #5a52e0 !important;
    color: #fff !important;
    transform: translateY(-1px);
}

/* -- Game HUD -------------------------------------------- */
.lexd-game-hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 10px 16px;
    background: #f9f9fb;
    border-radius: 10px;
    border: 1px solid #eaedf2;
}

.lexd-game-timer {
    font-size: 1.2rem;
    font-weight: 700;
    color: #5a52e0;
    font-variant-numeric: tabular-nums;
}

.lexd-game-pairs {
    font-size: 0.9rem;
    color: #888;
    font-weight: 600;
}

/* -- Game Board ------------------------------------------ */
.lexd-game-board {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    perspective: 800px;
    width: 100%;
}

/* -- Tile ------------------------------------------------ */
.lexd-game-tile {
    position: relative;
    aspect-ratio: 3 / 2;
    cursor: pointer;
    user-select: none;
    animation: lexd-tile-in 0.35s ease both;
    background: #fff;
    border: 1px solid #dde1e7;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s, border-color 0.2s;
    font-size: 0.95rem;
    font-weight: 500;
    color: #333;
    padding: 8px;
    text-align: center;
    overflow: hidden;
    line-height: 1.3;
}

.lexd-game-tile.is-def {
    background: #fafbfc;
    /* Subtle distinction for definitions */
    color: #555;
    font-style: italic;
}

.lexd-game-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    border-color: #b0b8c6;
    z-index: 10;
}

.lexd-game-tile.is-selected {
    border-color: #5a52e0;
    box-shadow: 0 0 0 2px rgba(90, 82, 224, 0.3);
    transform: scale(0.96);
    background: #f4f3ff;
}

.lexd-game-tile.is-matched {
    animation: lexd-pop-out 0.4s ease forwards;
    pointer-events: none;
}

.lexd-game-tile.is-wrong {
    animation: lexd-shake 0.4s ease;
    border-color: #e74c3c;
    background: #fdeaea;
}

.lexd-game-tile-inner {
    width: 100%;
    max-height: 100%;
    overflow: hidden;
}

/* Animations */
@keyframes lexd-tile-in {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes lexd-pop-out {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }

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

@keyframes lexd-shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20%,
    60% {
        transform: translateX(-5px);
    }

    40%,
    80% {
        transform: translateX(5px);
    }
}

.lexd-game-tile:nth-child(1) {
    animation-delay: 0.00s;
}

.lexd-game-tile:nth-child(2) {
    animation-delay: 0.04s;
}

.lexd-game-tile:nth-child(3) {
    animation-delay: 0.08s;
}

.lexd-game-tile:nth-child(4) {
    animation-delay: 0.12s;
}

.lexd-game-tile:nth-child(5) {
    animation-delay: 0.16s;
}

.lexd-game-tile:nth-child(6) {
    animation-delay: 0.20s;
}

.lexd-game-tile:nth-child(7) {
    animation-delay: 0.24s;
}

.lexd-game-tile:nth-child(8) {
    animation-delay: 0.28s;
}

.lexd-game-tile:nth-child(9) {
    animation-delay: 0.32s;
}

.lexd-game-tile:nth-child(10) {
    animation-delay: 0.36s;
}

.lexd-game-tile:nth-child(11) {
    animation-delay: 0.40s;
}

.lexd-game-tile:nth-child(12) {
    animation-delay: 0.44s;
}

@keyframes lexd-tile-in {
    0% {
        opacity: 0;
        transform: scale(0.3) rotateY(90deg);
    }

    60% {
        transform: scale(1.05) rotateY(-5deg);
    }

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

.lexd-game-tile-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #6c63ff, #897cff);
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(108, 99, 255, 0.15);
    transition: transform 0.2s, box-shadow 0.2s;
    word-break: break-word;
    line-height: 1.3;
}

.lexd-game-tile:hover .lexd-game-tile-inner {
    transform: translateY(-2px);
    box-shadow: 0 5px 18px rgba(108, 99, 255, 0.25);
}

/* -- Tile revealed --------------------------------------- */
.lexd-game-tile.is-revealed .lexd-game-tile-inner {
    background: #fff;
    color: #333;
    border: 2px solid #6c63ff;
    box-shadow: 0 3px 12px rgba(108, 99, 255, 0.12);
}

.lexd-game-tile.is-revealed.is-def .lexd-game-tile-inner {
    border-color: #48c6ef;
}

/* -- Tile matched ---------------------------------------- */
.lexd-game-tile.is-matched {
    pointer-events: none;
    animation: lexd-pop-out 0.4s ease forwards;
}

@keyframes lexd-pop-out {
    0% {
        opacity: 1;
        transform: scale(1);
    }

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

    100% {
        opacity: 0;
        transform: scale(0.5);
        pointer-events: none;
    }
}

/* -- Tile mismatch --------------------------------------- */
.lexd-game-tile.is-wrong .lexd-game-tile-inner {
    animation: lexd-shake 0.4s ease;
    border-color: #c0392b !important;
}

@keyframes lexd-shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-6px);
    }

    40% {
        transform: translateX(6px);
    }

    60% {
        transform: translateX(-4px);
    }

    80% {
        transform: translateX(4px);
    }
}

/* -- Game complete --------------------------------------- */
.lexd-game-complete {
    text-align: center;
    padding: 40px 20px;
    animation: lexilet-pop 0.4s ease;
}

.lexd-game-complete-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.lexd-game-complete h2 {
    margin: 0 0 6px;
    font-size: 1.6rem;
    color: #222;
}

.lexd-game-complete-time {
    font-size: 1.1rem;
    color: #5a52e0;
    font-weight: 700;
    margin-bottom: 20px;
}

.lexd-game-replay {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #6c63ff, #897cff);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

html body .lexd .lexd-game-replay:hover {
    background: #5a52e0 !important;
    color: #fff !important;
}

/* -- Responsive ------------------------------------------ */
@media (max-width: 600px) {
    .lexd-game-board {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .lexd-game-tile-inner {
        font-size: 0.75rem;
        padding: 6px;
    }

    .lexd-quiz-max-options {
        gap: 8px;
    }

    .lexd-quiz-max-btn {
        padding: 8px 10px !important;
        font-size: 0.85rem !important;
        margin-bottom: 0 !important;
    }

    /* Gratulációs képernyő mobilra igazítva */
    .lexd-game-complete {
        padding: 20px 14px;
    }

    .lexd-game-complete-icon {
        font-size: 2rem;
        margin-bottom: 6px;
    }

    .lexd-game-complete h2 {
        font-size: 1.2rem;
        margin-bottom: 4px;
    }

    .lexd-game-complete-time {
        font-size: 0.95rem;
        margin-bottom: 12px;
    }

    .lexd-game-replay {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* ============================================================
   v2.0.0 – UI Refinements
   ============================================================ */

/* Deck Edit Button - Round like others */
html body .lexd .lexd-deck-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid #dde1e7;
    background: #fff;
    color: #5a52e0;
    font-size: 14px;
    transition: all 0.2s;
    margin-right: 4px;
}

html body .lexd .lexd-deck-edit:hover {
    background: #5a52e0 !important;
    color: #fff !important;
    border-color: #5a52e0 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(90, 82, 224, 0.2);
}

/* Folder Delete Button - Gray default, Red hover */
html body .lexd .lexd-folder-del {
    background: transparent !important;
    color: #ccc !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
    transition: all 0.2s;
}

html body .lexd .lexd-folder-del:hover {
    background: #fff !important;
    color: #c0392b !important;
    border-color: #e74c3c !important;
    box-shadow: 0 2px 8px rgba(192, 57, 43, 0.15) !important;
}

/* ============================================================
   v1.8.0 – Forced Contrast Hover States (extreme specificity)
   ============================================================ */
html body .lexd .lexd-btn-confirm:hover,
html body .lexd .lexd-btn-study:hover,
html body .lexd .lexd-btn-add-folder:hover,
html body .lexd .lexd-btn-add-deck:hover,
html body .lexd .lexd-btn-add-card-quick:hover,
html body .lexd .lexd-library-copy:hover,
html body .lexd .lexd-import-mode-btn:hover,
html body .lexd .lexd-panel-study:hover,
html body .lexd .lexd-qa-save:hover {
    background: #5a52e0 !important;
    color: #fff !important;
    border-color: #5a52e0 !important;
}

html body .lexd .lexd-btn-cancel:hover {
    background: #c0392b !important;
    color: #fff !important;
    border-color: #c0392b !important;
}

html body .lexd .lexd-char-btn:hover {
    background: #5a52e0 !important;
    color: #fff !important;
    border-color: #5a52e0 !important;
}

html body .lexd .lexd-deck-del:hover .dashicons,
html body .lexd .lexd-folder-del:hover .dashicons,
html body .lexd .lexd-ct-del:hover .dashicons,
html body .lexd .lexd-dict-del:hover .dashicons,
html body .lexd .lexd-ct-cancel:hover .dashicons {
    color: #c0392b !important;
}

html body .lexd .lexd-ct-edit:hover .dashicons,
html body .lexd .lexd-dict-edit:hover .dashicons {
    color: #5a52e0 !important;
}

html body .lexd .lexd-ct-save:hover .dashicons {
    color: #27ae60 !important;
}

html body .lexd .lexd-nav-link:hover {
    background: #f4f3ff !important;
    color: #5a52e0 !important;
}

/* v1.9.0 - Specific Deck Actions Contrast */
html body .lexd .lexd-deck-cards:hover {
    background: #5a52e0 !important;
    color: #fff !important;
    border-color: #5a52e0 !important;
}

html body .lexd .lexd-deck-cards:hover .dashicons {
    color: #fff !important;
}

html body .lexd .lexd-deck-del:hover {
    background: #c0392b !important;
    color: #fff !important;
    border-color: #c0392b !important;
}

html body .lexd .lexd-deck-del:hover .dashicons {
    color: #fff !important;
}

/* v1.9.0 - Admin Features */
.lexd-deck-id {
    display: inline-block;
    padding: 2px 6px;
    background: #eee;
    color: #666;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-right: 6px;
    vertical-align: middle;
}

.lexd-master-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: #ccc;
    padding: 2px;
    margin-right: 6px;
    vertical-align: middle;
    font-size: 1.1rem;
    transition: color 0.2s;
}

.lexd-master-toggle:hover {
    color: #f1c40f;
}

.lexd-master-toggle.is-active {
    color: #f1c40f;
}

/* ============================================================
   v2.1.0 – UI Refinements
   ============================================================ */

/* Manage Cards Button - Round style */
html body .lexd .lexd-deck-cards {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid #dde1e7;
    background: #fff;
    color: #5a52e0;
    font-size: 14px;
    transition: all 0.2s;
    margin-right: 4px;
}

html body .lexd .lexd-deck-cards:hover {
    background: #5a52e0 !important;
    color: #fff !important;
    border-color: #5a52e0 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(90, 82, 224, 0.2);
}

/* Compact Game Tiles */
.lexd-game-tile-inner {
    padding: 12px 8px !important;
    min-height: 0 !important;
}

.lexd-game-tile-text {
    font-size: 0.95em;
    line-height: 1.3;
}

/* Pagination */
.lexd-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    gap: 15px;
}

.lexd-pg-btn {
    padding: 6px 12px;
    font-size: 14px;
}

.lexd-pg-btn:disabled {
    opacity: 0.5;
    cursor: default;
    background: #eee !important;
    color: #999 !important;
    border-color: #ddd !important;
}

.lexd-pg-info {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* ============================================================
   v2.2.0 – Quiz Game & UI Tuning
   ============================================================ */

/* Unified 'New Card' Button */
html body .lexd .lexd-qa-save {
    background: #6c63ff !important;
    color: #fff !important;
    border-color: #6c63ff !important;
}

html body .lexd .lexd-qa-save:hover {
    background: #5a52e0 !important;
    border-color: #5a52e0 !important;
}

/* Compact Matching Tiles (Mobile optimized) */
.lexd-game-tile {
    min-height: 80px !important;
    /* Reduced from default */
}

.lexd-game-tile-inner {
    padding: 8px 4px !important;
}

/* Game Exit Button */
.lexd-game-exit {
    position: sticky;
    top: 10px;
    float: right;
    margin-bottom: -40px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    color: #555;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    font-size: 20px;
    z-index: 100;
    transition: all 0.2s;
}

.lexd-game-exit:hover {
    background: #c0392b;
    color: #fff;
}

/* Quiz Game UI */
.lexd-quiz-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 20px;
}

.lexd-quiz-question {
    background: #fff;
    padding: 40px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 30px;
    color: #2c3e50;
    border: 2px solid #eef2f7;
}

.lexd-quiz-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.lexd-quiz-btn {
    background: #fff;
    border: 2px solid #eef2f7;
    border-radius: 8px;
    padding: 20px;
    font-size: 1.1rem;
    color: #444;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lexd-quiz-btn:hover {
    border-color: #6c63ff;
    color: #6c63ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(108, 99, 255, 0.15);
}

.lexd-quiz-btn.is-correct {
    background: #27ae60 !important;
    border-color: #27ae60 !important;
    color: #fff !important;
}

.lexd-quiz-btn.is-wrong {
    background: #c0392b !important;
    border-color: #c0392b !important;
    color: #fff !important;
}

@media (max-width: 600px) {
    .lexd-quiz-options {
        grid-template-columns: 1fr;
    }
}

/* v2.2.1 UI Fixes */
html body .lexd .lexilet-button-primary:hover,
html body .lexd .lexd-qa-save:hover,
html body .lexd .lexd-btn-add-card:hover {
    background-color: #6c63ff;
    color: #fff;
    cursor: pointer;
}

/* v2.3.0 Mobile Responsive & UX Improvements */
@media (max-width: 768px) {

    /* -- Sidebar fix: Horizontal scroll removal + minimal margins -- */
    .lexd {
        flex-direction: column;
        border-radius: 0;
        margin: 0;
        width: 100%;
        box-sizing: border-box;
    }

    .lexd-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #eaedf2;
        padding: 15px;
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        gap: 10px;
    }

    .lexd-logo {
        width: 100%;
        margin-bottom: 10px;
        border-bottom: none;
        padding: 0 0 10px 0;
        justify-content: center;
    }

    .lexd-nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        gap: 6px;
    }

    .lexd-nav li {
        flex: 1;
        min-width: 70px;
        /* Ensure 3-4 items per row */
        text-align: center;
    }

    .lexd-nav-link {
        flex-direction: column;
        justify-content: center;
        padding: 8px 4px;
        font-size: 0.7rem;
        border-left: none;
        border-bottom: 3px solid transparent;
        border-radius: 8px;
        background: #fdfdfd;
        border: 1px solid #eee;
        height: 100%;
    }

    .lexd-nav-link .dashicons {
        margin-bottom: 4px;
        font-size: 20px;
        width: 20px;
        height: 20px;
    }

    .lexd-nav-link.is-active {
        border-left-color: transparent;
        border-bottom-color: #6c63ff;
        background: #f4f3ff;
        color: #6c63ff;
        border-color: #6c63ff;
    }

    .lexd-main {
        padding: 12px 10px;
        height: auto;
        overflow: visible;
        background: #f4f5f7;
        /* Árnyék/háttér kontraszt */
    }

    /* -- Card Management Layout (Refactored) -- */
    .lexd-cards-table-wrap {
        background: transparent;
        box-shadow: none;
        padding: 0;
    }

    .lexd-cards-table thead,
    .lexilet-cards-table thead {
        display: none;
    }

    .lexd-cards-table,
    .lexilet-cards-table,
    .lexd-cards-table tbody,
    .lexilet-cards-table tbody,
    .lexd-cards-table tr,
    .lexilet-cards-table tr,
    .lexd-cards-table td,
    .lexilet-cards-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .lexd-cards-table tr,
    .lexilet-cards-table tr {
        background: #ffffff;
        border: 1px solid #e0e0e0;
        border-radius: 12px;
        margin-bottom: 16px;
        padding: 16px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
        position: relative;
    }

    .lexd-cards-table td,
    .lexilet-cards-table td {
        padding: 4px 0;
        border: none;
        text-align: left;
    }

    /* Mobilon bal igazítás – felülírja a 700px-es blokk text-align:right + display:flex
       szabályát (azonos specificitás 0,1,2, de ez jön később a fájlban) */
    .lexd-cards-table tbody td,
    .lexilet-cards-table tbody td {
        display: block;
        text-align: left;
        justify-content: initial;
    }

    .lexd-cards-table td::before,
    .lexilet-cards-table td::before {
        content: attr(data-label);
        display: block;
        font-size: 0.7rem;
        text-transform: uppercase;
        color: #999;
        font-weight: 700;
        margin-bottom: 2px;
    }

    /* Term column prominence */
    .lexd-cards-table td[data-label="Kifejezés"],
    .lexilet-cards-table td[data-label="Kifejezés"] {
        font-size: 1.1rem;
        font-weight: 700;
        color: #333;
        margin-bottom: 8px;
        border-bottom: 1px solid #f0f0f0;
        padding-bottom: 8px;
    }

    /* Action buttons row */
    .lexd-ct-actions {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid #f0f0f0;
    }

    /* Kártyanézet: Példamondat cella kényszerített blokkosítása, függetlenül a cachelt JS tartalmi sorrendtől */
    .lexd-cards-table td[data-label="Példa"],
    .lexilet-cards-table td[data-label="Példa"] {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .lexd-cards-table td[data-label="Példa"]::before,
    .lexilet-cards-table td[data-label="Példa"]::before {
        order: 1;
        /* A "PÉLDA" címke legfelülre */
        width: 100%;
        margin-bottom: 4px;
    }

    .lexd-cards-table td[data-label="Példa"] .lexd-ex-sentence,
    .lexilet-cards-table td[data-label="Példa"] .lexd-ex-sentence {
        order: 2;
        width: 100%;
        display: block;
    }

    .lexd-cards-table td[data-label="Példa"] .lexd-ex-meaning,
    .lexilet-cards-table td[data-label="Példa"] .lexd-ex-meaning {
        order: 3;
        width: 100%;
        display: block;
        margin-top: 4px;
        margin-bottom: 8px;
        /* Hely a gombnak */
    }

    .lexd-cards-table td[data-label="Példa"] .lexd-ct-play-ex-wrap,
    .lexilet-cards-table td[data-label="Példa"] .lexd-ct-play-ex-wrap,
    .lexd-cards-table td[data-label="Példa"] .lexd-ct-play-ex,
    .lexilet-cards-table td[data-label="Példa"] .lexd-ct-play-ex {
        order: 4;
        /* Gomb a legvégére */
        align-self: flex-start;
        margin-top: 4px;
    }

    /* Műveletek cella speciális rásimítása */
    .lexd-cards-table td[data-label="Műveletek"],
    .lexilet-cards-table td[data-label="Műveletek"] {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid #f0f0f0;
    }

    .lexd-cards-table td[data-label="Műveletek"]::before,
    .lexilet-cards-table td[data-label="Műveletek"]::before {
        margin-bottom: 0;
        margin-right: 10px;
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }

    /* Ne legyen dupla vonal a flex container miatt */
    .lexd-cards-table td[data-label="Műveletek"] .lexd-ct-actions,
    .lexilet-cards-table td[data-label="Műveletek"] .lexd-ct-actions {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
        flex: 1 1 auto;
    }

    /* v3.8.6.5: Saját Pakli – egyszerűsített gombsor (⋮ + Tanulás + ⇄) */
    .lexd-deck-actions {
        justify-content: flex-start;
        gap: 8px;
    }

    /* Game Actions Stack */
    .lexd-game-actions,
    .lexilet-game-modes {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* ============================================================
   v2.3.5.1 – Reset Progress Button Styles
   ============================================================ */

/* Pakli listán – kerek ikon gomb, mint lexd-deck-edit és lexd-deck-cards */
html body .lexd .lexd-deck-reset-progress {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid #dde1e7;
    background: #fff;
    color: #888;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 4px;
}

html body .lexd .lexd-deck-reset-progress:hover {
    background: #e67e22 !important;
    color: #fff !important;
    border-color: #e67e22 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(230, 126, 34, 0.25);
}

html body .lexd .lexd-deck-reset-progress .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

html body .lexd .lexd-deck-audio-delete,
html body .lexd .lexd-deck-audio-regen {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid #dde1e7;
    background: #fff;
    color: #888;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 4px;
}

html body .lexd .lexd-deck-audio-delete .dashicons,
html body .lexd .lexd-deck-audio-regen .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* v3.2.5.0: Törlés gomb – piros, áthúzott megjelenés */
html body .lexd .lexd-deck-audio-delete {
    color: #c0392b !important;
    border-color: #f0b8b4 !important;
    background: #fdf3f2 !important;
    position: relative;
    overflow: visible;
}

html body .lexd .lexd-deck-audio-delete::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 12%;
    width: 76%;
    height: 2px;
    background: #c0392b;
    transform: translateY(-50%) rotate(-45deg);
    border-radius: 1px;
    pointer-events: none;
    opacity: 0.85;
}

html body .lexd .lexd-deck-audio-delete:hover {
    background: #c0392b !important;
    color: #fff !important;
    border-color: #c0392b !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(192, 57, 43, 0.35);
}

html body .lexd .lexd-deck-audio-delete:hover::after {
    background: #fff;
    opacity: 1;
}

html body .lexd .lexd-deck-audio-regen:hover {
    background: #2980b9 !important;
    color: #fff !important;
    border-color: #2980b9 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(41, 128, 185, 0.2);
}

/* Kártyák táblában – ugyanolyan mini gomb mint lexd-ct-edit és lexd-ct-del */
html body .lexd .lexd-ct-reset {
    background: none;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 4px 6px;
    cursor: pointer;
    color: #888;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
    line-height: 1;
}

html body .lexd .lexd-ct-reset:hover {
    color: #e67e22 !important;
    border-color: #e67e22 !important;
    background: #fdf3e7 !important;
}

html body .lexd .lexd-ct-reset .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Szótárban – ugyanolyan mini gomb mint lexd-dict-edit és lexd-dict-del */
html body .lexd .lexd-dict-reset {
    background: none;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 6px 8px;
    cursor: pointer;
    color: #888;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
    line-height: 1;
}

html body .lexd .lexd-dict-reset:hover {
    color: #e67e22 !important;
    border-color: #e67e22 !important;
    background: #fdf3e7 !important;
}

html body .lexd .lexd-dict-reset .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* ================================================================
 *  MISSING WORDS (Hiányzó szavak) – v3.8.0.1
 * ================================================================ */

/* Konténer */
.lexd-mw-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 30px 20px;
    text-align: center;
}

/* Haladás számláló */
.lexd-mw-progress {
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 16px;
}

/* Fordítás / definition */
.lexd-mw-definition {
    font-size: 1.05rem;
    color: #555;
    margin-bottom: 20px;
    font-style: italic;
    padding: 10px 16px;
    background: #f8f8f8;
    border-radius: 8px;
    display: inline-block;
}

/* Mondat megjelenítés */
/* v3.8.1.7: Mondat sor wrapper – mondat + hang ikon egymás mellett */
.lexd-mw-sentence-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 28px;
}

/* v3.8.1.7: TTS hang lejátszás gomb */
.lexd-mw-audio-btn {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border: 2px solid #ddd;
    border-radius: 50%;
    background: #fff;
    color: #6c63ff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
    margin-top: 16px;
}

.lexd-mw-audio-btn:hover {
    border-color: #6c63ff;
    background: rgba(108, 99, 255, 0.08);
    transform: scale(1.08);
}

.lexd-mw-audio-btn:active {
    transform: scale(0.95);
}

.lexd-mw-audio-btn .dashicons {
    font-size: 22px;
    width: 22px;
    height: 22px;
}

.lexd-mw-sentence {
    flex: 1;
    font-size: 1.25rem;
    line-height: 2.2;
    word-wrap: break-word;
    text-align: center;
    padding: 16px 20px;
    background: #fafafa;
    border-radius: 10px;
    border: 1px solid #eee;
}

.lexd-mw-text {
    /* A mondat normál szövege */
}

/* Üres hely (blank) */
.lexd-mw-blank {
    display: inline-block;
    border-bottom: 3px solid #ccc;
    min-width: 60px;
    min-height: 32px;
    text-align: center;
    padding: 2px 8px;
    margin: 0 2px;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    vertical-align: baseline;
    position: relative;
}

.lexd-mw-blank.is-active {
    border-color: #6c63ff;
    background: rgba(108, 99, 255, 0.06);
    box-shadow: 0 2px 8px rgba(108, 99, 255, 0.15);
}

.lexd-mw-blank.is-filled {
    cursor: default;
    border-bottom-style: solid;
}

.lexd-mw-blank.is-correct {
    border-color: #27ae60;
    background: rgba(39, 174, 96, 0.08);
}

.lexd-mw-blank.is-wrong-shake {
    animation: lexd-mw-shake 0.35s ease;
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.06);
}

.lexd-mw-blank-line {
    color: #ccc;
    letter-spacing: 2px;
}

.lexd-mw-blank.is-filled .lexd-mw-blank-line {
    display: none;
}

/* Kitöltött szó a blank-ban */
.lexd-mw-filled-word {
    font-weight: 600;
    color: #27ae60;
}

/* Válaszlehetőségek */
.lexd-mw-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 8px;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.lexd-mw-option {
    background: #fff;
    color: #2c3e50;
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 8px 16px;
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, color 0.2s, transform 0.15s, opacity 0.3s;
    min-width: 70px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.lexd-mw-option:hover {
    border-color: #6c63ff;
    background: rgba(108, 99, 255, 0.08);
    color: #2c3e50;
    transform: translateY(-1px);
}

.lexd-mw-option:active {
    transform: scale(0.97);
    color: #2c3e50;
}

.lexd-mw-option.is-wrong {
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.08);
    color: #e74c3c;
    animation: lexd-mw-shake 0.35s ease;
}

.lexd-mw-option.is-disabled {
    opacity: 0.3;
    pointer-events: none;
    cursor: default;
}

/* Repülő klón – átmenetileg a body-n van */
.lexd-mw-flying {
    border-radius: 10px;
    background: #6c63ff;
    color: #fff;
    border: 2px solid #6c63ff;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Rázás animáció */
@keyframes lexd-mw-shake {
    0%, 100% { transform: translateX(0); }
    20%      { transform: translateX(-6px); }
    40%      { transform: translateX(6px); }
    60%      { transform: translateX(-4px); }
    80%      { transform: translateX(4px); }
}

/* Befejező képernyő */
.lexd-mw-finish {
    text-align: center;
    padding: 40px 20px;
    max-width: 500px;
    margin: 0 auto;
}

.lexd-mw-finish-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.lexd-mw-finish h2 {
    margin: 0 0 24px;
    font-size: 1.6rem;
    color: #333;
}

.lexd-mw-finish-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.lexd-mw-stat {
    background: #f8f8f8;
    border-radius: 10px;
    padding: 14px 10px;
    border: 1px solid #eee;
}

.lexd-mw-stat-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 4px;
}

.lexd-mw-stat-label {
    display: block;
    font-size: 0.85rem;
    color: #999;
}

/* Lexi pontok badge */
.lexd-mw-points {
    font-size: 1.1rem;
    font-weight: 700;
    color: #6c63ff;
    margin-bottom: 20px;
    padding: 8px 16px;
    background: rgba(108, 99, 255, 0.1);
    border-radius: 20px;
    display: inline-block;
}

/* Akció gombok */
.lexd-mw-finish-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.lexd-mw-restart,
.lexd-mw-back {
    min-width: 140px;
}

/* Mobilbarát */
@media (max-width: 600px) {
    .lexd-mw-sentence-row {
        gap: 6px;
        margin-bottom: 20px;
    }

    .lexd-mw-audio-btn {
        width: 36px;
        height: 36px;
        margin-top: 12px;
    }

    .lexd-mw-audio-btn .dashicons {
        font-size: 18px;
        width: 18px;
        height: 18px;
    }

    .lexd-mw-sentence {
        font-size: 1.1rem;
        line-height: 2;
        padding: 12px 14px;
    }

    .lexd-mw-options {
        gap: 6px;
    }

    .lexd-mw-option {
        min-width: 0;
        min-height: 40px;
        padding: 6px 12px;
        font-size: 0.95rem;
    }

    .lexd-mw-finish-stats {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .lexd-mw-finish-actions {
        flex-direction: column;
    }

    .lexd-mw-restart,
    .lexd-mw-back {
        width: 100%;
    }
}

/* ================================================================
 *  DECK MORE MENU (⋮ lenyíló menü) – v3.8.6.5
 * ================================================================ */

/* Wrapper – relative pozíció a menü pozicionálásához */
.lexd-deck-more-wrap {
    position: relative;
    flex-shrink: 0;
}

/* ⋮ gomb – kerek, visszafogott */
html body .lexd .lexd-deck-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid #dde1e7;
    background: #fff;
    color: #6c63ff;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.lexd-deck-more-dots {
    font-weight: 700;
    line-height: 1;
    letter-spacing: 1px;
}

html body .lexd .lexd-deck-more-btn:hover {
    background: #f4f3ff;
    border-color: #6c63ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(108, 99, 255, 0.15);
}

/* Lenyíló menü panel */
.lexd-deck-more-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 100;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.14), 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #eaedf2;
    overflow: hidden;
    min-width: 220px;
    padding: 6px 0;
}

/* Menüelemek */
html body .lexd .lexd-deck-more-item {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    border: none;
    background: none;
    color: #374151;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    text-align: left !important;
    white-space: nowrap;
    border-radius: 0;
    box-shadow: none;
}

html body .lexd .lexd-deck-more-item .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #6b7280;
    transition: color 0.15s;
    flex-shrink: 0;
}

html body .lexd .lexd-deck-more-item:hover {
    background: #f4f3ff;
    color: #5a52e0;
}

html body .lexd .lexd-deck-more-item:hover .dashicons {
    color: #5a52e0;
}

/* Törlés gomb – piros hover */
html body .lexd .lexd-deck-more-item--danger:hover {
    background: #fef2f2;
    color: #c0392b;
}

html body .lexd .lexd-deck-more-item--danger:hover .dashicons {
    color: #c0392b;
}

/* ================================================================
 *  TANULÁS GOMB – kiemelt, nagyobb (v3.8.6.5)
 * ================================================================ */
html body .lexd .lexd-deck-actions .lexd-btn-study {
    padding: 14px 32px !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
    letter-spacing: 0.4px;
    box-shadow: 0 3px 12px rgba(108, 99, 255, 0.25);
    background: linear-gradient(135deg, #6c63ff 0%, #5a52e0 100%) !important;
}

html body .lexd .lexd-deck-actions .lexd-btn-study .dashicons {
    font-size: 18px !important;
    width: 18px !important;
    height: 18px !important;
}

html body .lexd .lexd-deck-actions .lexd-btn-study:hover {
    box-shadow: 0 6px 20px rgba(108, 99, 255, 0.4) !important;
    transform: translateY(-2px) !important;
    background: linear-gradient(135deg, #5a52e0 0%, #4a42d0 100%) !important;
}

/* ================================================================
 *  IRÁNYVÁLASZTÓ (⇄) – kiemelt, nagyobb (v3.8.6.5)
 * ================================================================ */
html body .lexd .lexd-deck-actions .lexd-dir-choose {
    width: 44px !important;
    height: 44px !important;
    font-size: 22px !important;
    font-weight: 800 !important;
    border: 2px solid #c4bfff !important;
    background: linear-gradient(135deg, #f0eeff 0%, #e8e5ff 100%) !important;
    color: #6c63ff !important;
    border-radius: 12px !important;
}

html body .lexd .lexd-deck-actions .lexd-dir-choose:hover {
    background: linear-gradient(135deg, #6c63ff 0%, #5a52e0 100%) !important;
    color: #fff !important;
    border-color: #6c63ff !important;
    box-shadow: 0 4px 14px rgba(108, 99, 255, 0.35) !important;
    transform: translateY(-2px) !important;
}

/* ================================================================
 *  MENÜELEMEK RESET – régi kerek gomb stílusok felülírása (v3.8.6.5)
 *  A gombok a menüben teljesen más megjelenést kapnak.
 * ================================================================ */
html body .lexd .lexd-deck-more-menu .lexd-deck-edit,
html body .lexd .lexd-deck-more-menu .lexd-deck-cards,
html body .lexd .lexd-deck-more-menu .lexd-deck-reset-progress,
html body .lexd .lexd-deck-more-menu .lexd-deck-audio-delete,
html body .lexd .lexd-deck-more-menu .lexd-deck-audio-regen,
html body .lexd .lexd-deck-more-menu .lexd-deck-del {
    width: 100% !important;
    height: auto !important;
    border-radius: 0 !important;
    border: none !important;
    background: none !important;
    color: #374151 !important;
    box-shadow: none !important;
    margin-right: 0 !important;
    position: static !important;
    overflow: visible !important;
    transform: none !important;
}

/* Áthúzó vonal eltávolítása a menüben */
html body .lexd .lexd-deck-more-menu .lexd-deck-audio-delete::after {
    display: none !important;
}

/* Menüben a hover a lexd-deck-more-item szabályokat kövesse */
html body .lexd .lexd-deck-more-menu .lexd-deck-edit:hover,
html body .lexd .lexd-deck-more-menu .lexd-deck-cards:hover,
html body .lexd .lexd-deck-more-menu .lexd-deck-reset-progress:hover,
html body .lexd .lexd-deck-more-menu .lexd-deck-audio-regen:hover {
    background: #f4f3ff !important;
    color: #5a52e0 !important;
    transform: none !important;
    box-shadow: none !important;
}

html body .lexd .lexd-deck-more-menu .lexd-deck-audio-delete:hover,
html body .lexd .lexd-deck-more-menu .lexd-deck-del:hover {
    background: #fef2f2 !important;
    color: #c0392b !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Ikonok szín reset a menüben */
html body .lexd .lexd-deck-more-menu .lexd-deck-more-item .dashicons {
    color: #6b7280 !important;
}

html body .lexd .lexd-deck-more-menu .lexd-deck-more-item:hover .dashicons {
    color: inherit !important;
}

