/**
 * Frontend Player Stylesheet for NerdTrivia Quiz Manager
 */

.ntqm-player-outer {
    /* Custom Theme variables - configurable from admin options */
    --ntqm-primary: #1e3a8a;
    --ntqm-accent: #3b82f6;
    --ntqm-text: #1f2937;
    --ntqm-bg: #ffffff;
    --ntqm-border: #e5e7eb;
    --ntqm-radius: 8px;
    --ntqm-max-width: 800px;
    --ntqm-font-size: 16px;
    --ntqm-success: #10b981;
    --ntqm-danger: #ef4444;
    --ntqm-gray: #6b7280;

    box-sizing: border-box;
    max-width: var(--ntqm-max-width);
    margin: 1rem auto 2rem;
    background-color: var(--ntqm-bg);
    color: var(--ntqm-text);
    border: 1px solid var(--ntqm-border);
    border-radius: var(--ntqm-radius);
    overflow: hidden;
    font-family: inherit;
    font-size: var(--ntqm-font-size);
    line-height: 1.5;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.ntqm-player-outer * {
    box-sizing: border-box;
}

/* Screen Layouts */
.ntqm-screen {
    padding: 2rem;
}

/* Header & Typography */
.ntqm-player-image img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 350px;
    object-fit: cover;
}

.ntqm-player-header {
    margin-bottom: 1.5rem;
}

.ntqm-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

.ntqm-subtitle {
    font-size: 1.1rem;
    color: var(--ntqm-gray);
    font-weight: 400;
    margin: 0;
}

.ntqm-intro-text {
    margin-bottom: 2rem;
}

/* Collapsible Introduction Text (Default: Desktop is fully expanded) */
.ntqm-intro-text.collapsible {
    max-height: none;
    overflow: visible;
    position: relative;
}

.ntqm-intro-text.collapsible::after {
    display: none;
}

.ntqm-intro-toggle-btn {
    display: none !important;
}

/* Collapsible Introduction and Explanation on Mobile Devices */
@media (max-width: 768px) {
    .ntqm-intro-text.collapsible {
        max-height: 90px;
        overflow: hidden;
        position: relative;
        transition: max-height 0.3s ease-in-out;
    }

    .ntqm-intro-text.collapsible::after {
        display: block;
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 40px;
        background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
        transition: opacity 0.3s ease-in-out;
        pointer-events: none;
    }

    .ntqm-intro-text.collapsible.expanded {
        max-height: 2000px !important;
    }

    .ntqm-intro-text.collapsible.expanded::after {
        opacity: 0;
        display: none !important;
    }

    .ntqm-intro-toggle-btn {
        display: block !important;
    }
}

.ntqm-meta-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.02);
    border: 1px dashed var(--ntqm-border);
    border-radius: calc(var(--ntqm-radius) / 2);
    margin-bottom: 2rem;
}

.ntqm-meta-summary span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Button UI */
.ntqm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--ntqm-radius);
    border: 1px solid var(--ntqm-border);
    background-color: var(--ntqm-bg);
    color: var(--ntqm-text);
    cursor: pointer;
    transition: all 0.2s ease-in-out, transform 0.1s ease-in-out;
    text-decoration: none;
    min-height: 44px;
}

.ntqm-btn:active,
.ntqm-answer-card:active,
.ntqm-tag-filter-btn:active,
.ntqm-cat-filter-btn:active {
    transform: scale(0.96) !important;
}

.ntqm-btn:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

.ntqm-btn-primary {
    background-color: var(--ntqm-primary);
    color: #ffffff;
    border-color: var(--ntqm-primary);
}

.ntqm-btn-primary:hover {
    filter: brightness(1.1);
    background-color: var(--ntqm-primary);
}

.ntqm-btn:focus-visible {
    outline: 3px solid var(--ntqm-accent);
    outline-offset: 2px;
}

/* Game Interface */
.ntqm-game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-weight: 500;
}

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

.ntqm-timer-container {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--ntqm-danger);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.9rem;
}

/* Progress bar */
.ntqm-progress-bar-bg {
    width: 100%;
    height: 10px;
    background-color: var(--ntqm-border);
    border-radius: 9999px;
    margin-bottom: 2rem;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.06);
}

.ntqm-progress-bar-fill {
    height: 100%;
    background-color: var(--ntqm-primary);
    border-radius: 9999px;
    transition: width 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    box-shadow: 0 0 10px rgba(79, 70, 229, 0.35);
}

/* Add a sleek diagonal shine effect that flows across the bar */
.ntqm-progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.25) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 200% 100%;
    animation: ntqm-progress-shimmer 2.5s infinite linear;
}

@keyframes ntqm-progress-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.ntqm-question-text {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0 0 1.5rem 0;
}

/* Multiple choice answer options */
.ntqm-answers-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.ntqm-answer-card {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    border: 1px solid var(--ntqm-border);
    border-radius: var(--ntqm-radius);
    background-color: var(--ntqm-bg);
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-align: left;
    width: 100%;
    font-size: 1rem;
    font-weight: 500;
}

.ntqm-answer-card:hover:not(.disabled) {
    border-color: var(--ntqm-primary);
    background-color: rgba(30, 58, 138, 0.02);
}

.ntqm-answer-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background-color: rgba(0,0,0,0.05);
    border-radius: 50%;
    margin-right: 1rem;
    font-weight: bold;
    color: var(--ntqm-gray);
    flex-shrink: 0;
}

/* State highlights */
.ntqm-answer-card.correct {
    border-color: var(--ntqm-success);
    background-color: rgba(16, 185, 129, 0.05);
}

.ntqm-answer-card.correct .ntqm-answer-letter {
    background-color: var(--ntqm-success);
    color: #ffffff;
}

.ntqm-answer-card.incorrect {
    border-color: var(--ntqm-danger);
    background-color: rgba(239, 68, 68, 0.05);
}

.ntqm-answer-card.incorrect .ntqm-answer-letter {
    background-color: var(--ntqm-danger);
    color: #ffffff;
}

.ntqm-answer-card.disabled {
    cursor: default;
    opacity: 0.6;
}

/* Feedback banners */
.ntqm-feedback-banner {
    padding: 1.25rem;
    border-radius: var(--ntqm-radius);
    margin-bottom: 2rem;
    border-left: 4px solid var(--ntqm-gray);
    background-color: rgba(0,0,0,0.02);
}

.ntqm-feedback-banner.correct {
    border-left-color: var(--ntqm-success);
    background-color: rgba(16, 185, 129, 0.02);
}

.ntqm-feedback-banner.incorrect {
    border-left-color: var(--ntqm-danger);
    background-color: rgba(239, 68, 68, 0.02);
}

.ntqm-feedback-explanation {
    max-height: none !important;
    overflow-y: visible !important;
    font-size: 0.875rem;
    line-height: 1.5;
    padding-right: 0.5rem;
}

.ntqm-feedback-explanation::-webkit-scrollbar {
    width: 6px;
}

.ntqm-feedback-explanation::-webkit-scrollbar-track {
    background: transparent;
}

.ntqm-feedback-explanation::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
}

.ntqm-feedback-explanation::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

.ntqm-feedback-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.ntqm-feedback-banner.correct .ntqm-feedback-title {
    color: var(--ntqm-success);
}

.ntqm-feedback-banner.incorrect .ntqm-feedback-title {
    color: var(--ntqm-danger);
}

/* Results layout */
.ntqm-results-header {
    text-align: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--ntqm-border);
    margin-bottom: 2rem;
}

.ntqm-results-score {
    font-size: 2rem;
    margin: 0;
}

.ntqm-results-percentage {
    font-size: 3rem;
    font-weight: 800;
    color: var(--ntqm-primary);
    margin: 0.5rem 0;
}

/* Animated Progress Bar */
.ntqm-results-progress-container {
    width: 100%;
    max-width: 320px;
    height: 16px;
    background-color: var(--ntqm-border, #e5e7eb);
    border-radius: var(--ntqm-radius, 8px);
    margin: 1.5rem auto;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.ntqm-results-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--ntqm-primary, #1e3a8a) 0%, var(--ntqm-accent, #3b82f6) 100%);
    border-radius: var(--ntqm-radius, 8px);
    width: 0%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(30, 58, 138, 0.3);
}

/* Animation triggered by active class */
.ntqm-results-progress-container.animated .ntqm-results-progress-bar {
    animation: ntqmProgressFill 1.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

/* Shiny moving gloss overlay effect */
.ntqm-results-progress-bar::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: ntqmProgressShine 2.5s infinite linear;
    background-size: 200% 100%;
}

@keyframes ntqmProgressFill {
    from { width: 0%; }
    to { width: var(--ntqm-progress-width, 0%); }
}

@keyframes ntqmProgressShine {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

.ntqm-results-duration {
    font-size: 0.95rem;
    color: var(--ntqm-gray);
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.ntqm-outcome-card {
    background-color: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--ntqm-border);
    border-radius: var(--ntqm-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.ntqm-outcome-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: var(--ntqm-primary);
}

/* Highscores Card & Consent form */
.ntqm-highscore-form-card {
    border: 1px solid var(--ntqm-border);
    background-color: rgba(59, 130, 246, 0.02);
    border-radius: var(--ntqm-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.ntqm-highscore-form-card h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.ntqm-form-group {
    margin-bottom: 1rem;
}

.ntqm-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.ntqm-form-group input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--ntqm-border);
    border-radius: var(--ntqm-radius);
    font-size: 1rem;
}

.ntqm-form-consent {
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    color: var(--ntqm-gray);
}

.ntqm-form-consent label {
    display: flex;
    gap: 0.5rem;
    cursor: pointer;
}

.ntqm-form-consent input[type="checkbox"] {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.ntqm-form-error {
    color: var(--ntqm-danger);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

/* Highscore Board Listing */
.ntqm-highscore-board {
    border: 1px solid var(--ntqm-border);
    border-radius: var(--ntqm-radius);
    overflow: hidden;
    margin-bottom: 2rem;
}

.ntqm-board-header {
    background-color: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid var(--ntqm-border);
    padding: 1rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.ntqm-board-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.ntqm-board-tabs {
    display: flex;
    gap: 0.25rem;
    background-color: rgba(0,0,0,0.05);
    padding: 2px;
    border-radius: 6px;
}

.ntqm-board-tab {
    border: none;
    background: none;
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    color: var(--ntqm-gray);
    transition: all 0.15s ease-in-out;
}

.ntqm-board-tab.active {
    background-color: var(--ntqm-bg);
    color: var(--ntqm-text);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.ntqm-board-table-wrapper {
    max-height: 400px;
    overflow-y: auto;
}

.ntqm-board-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
}

.ntqm-board-table th,
.ntqm-board-table td {
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid var(--ntqm-border);
}

.ntqm-board-table th {
    font-weight: 600;
    color: var(--ntqm-gray);
    background-color: rgba(0,0,0,0.01);
}

.ntqm-board-table tbody tr:last-child td {
    border-bottom: none;
}

.ntqm-board-table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.01);
}

.ntqm-rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-weight: bold;
    font-size: 0.85rem;
}

.ntqm-rank-1 { background-color: #fef08a; color: #854d0e; }
.ntqm-rank-2 { background-color: #e2e8f0; color: #475569; }
.ntqm-rank-3 { background-color: #ffedd5; color: #9a3412; }

/* Social Share Row */
.ntqm-results-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    border-top: 1px solid var(--ntqm-border);
    padding-top: 1.5rem;
}

.ntqm-share-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ntqm-share-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
    border-radius: 4px;
    text-decoration: none;
    transition: filter 0.2s;
}

.ntqm-share-btn:hover {
    filter: brightness(0.9);
}

.ntqm-share-twitter { background-color: #1da1f2; }
.ntqm-share-facebook { background-color: #1877f2; }
.ntqm-share-whatsapp { background-color: #25d366; }
.ntqm-share-telegram { background-color: #0088cc; }
.ntqm-share-linkedin { background-color: #0a66c2; }
.ntqm-share-email { background-color: #475569; }
.ntqm-share-native { background-color: #8b5cf6; }
.ntqm-share-copy {
    background-color: #ffffff !important;
    color: #374151 !important;
    border: 1px solid #d1d5db !important;
    transition: all 0.2s ease-in-out !important;
}
.ntqm-share-copy:hover {
    background-color: #f9fafb !important;
    border-color: #9ca3af !important;
}

/* Accessible Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .ntqm-progress-bar-fill,
    .ntqm-answer-card,
    .ntqm-btn {
        transition: none !important;
    }
}

/* Responsive Scaling */
@media (max-width: 600px) {
    .ntqm-screen {
        padding: 0.75rem !important;
    }
    .ntqm-title {
        font-size: 1.25rem !important;
        margin-bottom: 0.5rem !important;
    }
    .ntqm-player-persistent-image {
        padding: 1rem 1rem 0 1rem !important;
        max-height: 150px !important;
        margin-bottom: 1rem !important;
        box-sizing: border-box !important;
    }
    .ntqm-player-persistent-image img {
        max-height: 130px !important;
        object-fit: cover !important;
        width: 100% !important;
        border-radius: 8px !important;
    }
    
    /* Collapsible Introduction Text - Inherited from base styles on mobile */
    #ntqm-question-text {
        font-size: 0.95rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.75rem !important;
    }
    .ntqm-answer-grid {
        gap: 0.5rem !important;
    }
    .ntqm-answer-card {
        padding: 0.6rem 0.75rem !important;
        border-radius: 8px !important;
        gap: 0.5rem !important;
    }
    .ntqm-answer-card .ntqm-card-letter {
        width: 1.5rem !important;
        height: 1.5rem !important;
        min-width: 1.5rem !important;
        font-size: 0.75rem !important;
    }
    .ntqm-answer-card .ntqm-card-text {
        font-size: 0.8rem !important;
    }
    #ntqm-jokers-panel {
        padding: 0.5rem !important;
        border-radius: 8px !important;
        margin-top: 0.5rem !important;
    }
    #ntqm-jokers-panel .ntqm-jokers-title {
        font-size: 0.7rem !important;
        margin-bottom: 0.25rem !important;
    }
    #ntqm-jokers-panel .ntqm-joker-btn {
        padding: 0.35rem 0.6rem !important;
        font-size: 0.7rem !important;
        border-radius: 6px !important;
    }
    #ntqm-feedback-banner {
        padding: 0.75rem !important;
        border-radius: 8px !important;
        margin-top: 0.75rem !important;
    }
    #ntqm-feedback-banner .ntqm-feedback-header {
        margin-bottom: 0.4rem !important;
    }
    #ntqm-feedback-banner .ntqm-feedback-title {
        font-size: 0.85rem !important;
    }
    #ntqm-feedback-banner #ntqm-feedback-explanation {
        display: block !important;
        max-height: none !important;
        overflow: visible !important;
    }
    #ntqm-feedback-banner .ntqm-feedback-toggle-btn {
        display: none !important;
    }
    .ntqm-timer-paused-badge {
        font-size: 9px !important;
        padding: 2px 6px !important;
    }
    .ntqm-next-question-container {
        display: flex !important;
        position: sticky !important;
        bottom: 12px !important;
        z-index: 9999 !important;
        margin-top: 10px !important;
        margin-bottom: 10px !important;
        justify-content: center !important;
        padding: 0 !important;
        background: transparent !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        border: none !important;
    }
    .ntqm-next-question-btn {
        width: 100% !important;
        max-width: 100% !important;
        justify-content: center !important;
        font-size: 0.95rem !important;
        font-weight: 800 !important;
        padding: 0.75rem 1.25rem !important;
        border-radius: 10px !important;
        min-height: 46px !important;
        box-shadow: 0 4px 14px rgba(30, 58, 138, 0.35) !important;
    }
    .ntqm-meta-summary {
        gap: 0.75rem;
        flex-direction: column;
    }
    .ntqm-board-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .ntqm-results-footer {
        flex-direction: column;
        align-items: stretch;
    }
    .ntqm-share-buttons {
        justify-content: space-between;
    }
}

/* Next Question Container */
.ntqm-next-question-container {
    display: flex !important;
}

/* Timer Paused Badge and Animations */
.ntqm-timer-paused-badge {
    margin-left: auto;
    font-size: 11px;
    font-weight: 800;
    background: #fef3c7 !important;
    color: #b45309 !important;
    border: 1px solid #fde68a !important;
    padding: 4px 10px !important;
    border-radius: 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    animation: ntqm-pulse-amber 1.5s infinite ease-in-out !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
}

@keyframes ntqm-pulse-amber {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.85;
        transform: scale(0.96);
    }
}

/* Joker animations */
.ntqm-answer-card.joker-removed {
    opacity: 0 !important;
    transform: scale(0.85) translateY(-10px) !important;
    pointer-events: none !important;
    transition: opacity 0.4s ease, transform 0.4s ease, margin 0.4s ease, padding 0.4s ease, height 0.4s ease, border-color 0.4s ease !important;
    height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    border-color: transparent !important;
    overflow: hidden !important;
}

@keyframes ntqm-pulse-survivor {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4); }
    50% { transform: scale(1.03); box-shadow: 0 0 0 10px rgba(79, 70, 229, 0); border-color: var(--ntqm-primary, #4f46e5); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(79, 70, 229, 0); }
}

.ntqm-answer-card.joker-survivor {
    animation: ntqm-pulse-survivor 0.8s ease-out !important;
}

.ntqm-floating-time-bonus {
    position: absolute !important;
    background-color: var(--ntqm-success, #10b981) !important;
    color: #ffffff !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    padding: 2px 8px !important;
    border-radius: 9999px !important;
    z-index: 99 !important;
    pointer-events: none !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15) !important;
    animation: ntqm-float-up-fade 1s ease-out forwards !important;
}

@keyframes ntqm-float-up-fade {
    0% { transform: translate(-50%, 0) scale(0.8); opacity: 0; left: 50%; top: -5px; }
    20% { transform: translate(-50%, -10px) scale(1.1); opacity: 1; left: 50%; top: -5px; }
    100% { transform: translate(-50%, -35px) scale(0.9); opacity: 0; left: 50%; top: -5px; }
}

/* Customizations: Button Shapes */
.ntqm-btn-shape-pill .ntqm-btn,
.ntqm-btn-shape-pill .ntqm-answer-card,
.ntqm-btn-shape-pill .ntqm-board-tab,
.ntqm-btn-shape-pill .ntqm-length-label {
    border-radius: 9999px !important;
}

.ntqm-btn-shape-square .ntqm-btn,
.ntqm-btn-shape-square .ntqm-answer-card,
.ntqm-btn-shape-square .ntqm-board-tab,
.ntqm-btn-shape-square .ntqm-length-label,
.ntqm-btn-shape-square .ntqm-player-outer {
    border-radius: 0px !important;
}

/* Customizations: Transition Animations */
@keyframes ntqmSlideIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ntqmFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.ntqm-transition-slide .ntqm-screen {
    animation: ntqmSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.ntqm-transition-fade .ntqm-screen {
    animation: ntqmFadeIn 0.3s ease-out both;
}

.ntqm-transition-none .ntqm-screen {
    animation: none !important;
}

/* =========================================================================
   NERDTRIVIA WIDGET STYLES
   ========================================================================= */

.ntqm-widget-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ntqm-widget-item {
    background: #ffffff;
    border: 1px solid var(--ntqm-border, #e5e7eb);
    border-radius: 8px;
    padding: 12px 14px;
    position: relative;
    transition: all 0.2s ease-in-out;
}

.ntqm-widget-item-grayed {
    opacity: 0.72;
    background: #fafbfe !important;
    border-color: #e5e7eb;
}

.ntqm-widget-item-grayed:hover {
    opacity: 1;
    border-color: var(--ntqm-accent, #3b82f6);
    background: #ffffff !important;
}

.ntqm-widget-item-grayed .ntqm-widget-item-title a {
    color: #4b5563;
}

.ntqm-widget-item-grayed .ntqm-widget-play-btn {
    color: var(--ntqm-gray, #6b7280);
}

.ntqm-widget-cat-quiz-link-grayed {
    background: #fbfbfc !important;
    color: #6b7280 !important;
}

.ntqm-widget-cat-quiz-link-grayed:hover {
    background: #f3f4f6 !important;
    color: var(--ntqm-primary, #4f46e5) !important;
}

.ntqm-widget-item:hover {
    border-color: var(--ntqm-accent, #3b82f6);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.ntqm-widget-item-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--ntqm-gray, #6b7280);
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.ntqm-widget-cat {
    font-weight: 700;
    text-transform: uppercase;
    color: var(--ntqm-primary, #4f46e5);
    background: rgba(79, 70, 229, 0.06);
    padding: 2px 6px;
    border-radius: 4px;
}

.ntqm-widget-badge-goat {
    background: linear-gradient(135deg, #eab308, #ca8a04);
    color: #ffffff;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    text-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

.ntqm-widget-qcount {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
}

.ntqm-widget-item-title {
    margin: 0 0 10px 0 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
}

.ntqm-widget-item-title a {
    color: var(--ntqm-text, #1f2937);
    text-decoration: none;
    transition: color 0.15s ease;
}

.ntqm-widget-item-title a:hover {
    color: var(--ntqm-primary, #4f46e5);
}

.ntqm-widget-play-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ntqm-primary, #4f46e5);
    text-decoration: none;
    transition: transform 0.2s ease;
}

.ntqm-widget-play-btn:hover {
    transform: translateX(2px);
}

.ntqm-widget-empty {
    font-size: 13px;
    color: var(--ntqm-gray, #6b7280);
    font-style: italic;
    text-align: center;
    padding: 20px 10px;
    background: #f9fafb;
    border: 1px dashed var(--ntqm-border, #e5e7eb);
    border-radius: 8px;
    margin: 0;
}

/* Weekly Quiz Card */
.ntqm-widget-weekly-card {
    background: #ffffff;
    border: 2px solid #ca8a04;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 6px 16px rgba(202, 138, 4, 0.08);
}

.ntqm-widget-weekly-ribbon {
    background: linear-gradient(135deg, #ca8a04, #eab308);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    text-align: center;
    padding: 6px;
    letter-spacing: 0.05em;
}

.ntqm-widget-weekly-image {
    height: 140px;
    background-size: cover;
    background-position: center;
}

.ntqm-widget-weekly-content {
    padding: 16px;
}

.ntqm-widget-weekly-title {
    margin: 0 0 8px 0 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    color: #1f2937;
}

.ntqm-widget-weekly-excerpt {
    font-size: 13px;
    color: #4b5563;
    font-style: italic;
    margin: 0 0 14px 0;
    line-height: 1.4;
}

.ntqm-widget-weekly-btn {
    display: flex !important;
    width: 100%;
    justify-content: center;
    align-items: center;
    gap: 6px;
    background: var(--ntqm-primary, #4f46e5) !important;
    border-color: var(--ntqm-primary, #4f46e5) !important;
    color: #ffffff !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    padding: 10px 16px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
}

/* Category Accordion */
.ntqm-widget-categories {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ntqm-widget-cat-group {
    border: 1px solid var(--ntqm-border, #e5e7eb);
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
}

.ntqm-widget-cat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    cursor: pointer;
    background: #f9fafb;
    user-select: none;
    transition: background 0.15s ease;
}

.ntqm-widget-cat-header:hover {
    background: #f3f4f6;
}

.ntqm-widget-cat-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--ntqm-text, #1f2937);
}

.ntqm-widget-cat-count-badge {
    background: var(--ntqm-border, #e5e7eb);
    color: var(--ntqm-gray, #6b7280);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: auto;
    margin-right: 8px;
}

.ntqm-widget-cat-toggle-icon {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: var(--ntqm-gray, #6b7280);
    transition: transform 0.2s ease;
}

.ntqm-widget-cat-toggle-icon.rotated {
    transform: rotate(180deg);
}

.ntqm-widget-cat-quizzes {
    border-top: 1px solid var(--ntqm-border, #e5e7eb);
    padding: 4px 0;
}

.ntqm-widget-cat-quiz-item {
    border-bottom: 1px solid #f3f4f6;
}

.ntqm-widget-cat-quiz-item:last-child {
    border-bottom: none;
}

.ntqm-widget-cat-quiz-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    font-size: 12px;
    color: #4b5563;
    text-decoration: none;
    transition: background 0.15s ease;
}

.ntqm-widget-cat-quiz-link:hover {
    background: rgba(79, 70, 229, 0.03);
    color: var(--ntqm-primary, #4f46e5);
}

.ntqm-widget-cat-quiz-title {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 10px;
}

.ntqm-widget-cat-quiz-q {
    font-size: 10px;
    color: #9ca3af;
    background: #f3f4f6;
    padding: 1px 4px;
    border-radius: 4px;
    white-space: nowrap;
}

/* Last Played Card */
.ntqm-widget-last-played-card {
    background: #ffffff;
    border: 1px solid var(--ntqm-border, #e5e7eb);
    border-radius: 10px;
    padding: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

/* Bookmark Star animation & style */
.ntqm-bookmark-btn:hover {
    transform: scale(1.2);
}

.ntqm-bookmark-btn.is-bookmarked {
    animation: ntqm-bookmark-pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes ntqm-bookmark-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

/* Dynamic Highscore Widget Styles */
.ntqm-widget-highscores {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ntqm-widget-score-item {
    background: #ffffff;
    border: 1px solid var(--ntqm-border, #e5e7eb);
    border-radius: 8px;
    padding: 10px 12px;
}

.ntqm-widget-score-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.ntqm-widget-score-name {
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
}

.ntqm-widget-score-value {
    font-size: 12px;
    font-weight: 700;
    color: var(--ntqm-success, #10b981);
    background: rgba(16, 185, 129, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
}

.ntqm-widget-score-quiz {
    font-size: 11px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ntqm-widget-score-quiz a {
    color: inherit;
    text-decoration: none;
}

.ntqm-widget-score-quiz a:hover {
    color: var(--ntqm-primary, #4f46e5);
}

.ntqm-widget-score-time {
    font-size: 10px;
    color: #9ca3af;
    text-align: right;
    margin-top: 2px;
}

.ntqm-mock-score {
    border-color: #f3f4f6;
    background: #fafafa;
}

@keyframes ntqm-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Optimized layout for Iframe Embed context */
.ntqm-embed-body {
    padding: 10px !important;
}

.ntqm-embed-body .ntqm-player-outer {
    margin: 0 auto !important;
    max-height: calc(100vh - 20px) !important;
    overflow-y: auto !important;
    box-shadow: none !important;
    border-radius: var(--ntqm-radius, 8px) !important;
}

/* Elegant and clean custom scrollbar for the scrollable embed player card */
.ntqm-embed-body .ntqm-player-outer::-webkit-scrollbar {
    width: 6px;
}
.ntqm-embed-body .ntqm-player-outer::-webkit-scrollbar-track {
    background: transparent;
}
.ntqm-embed-body .ntqm-player-outer::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
}
.ntqm-embed-body .ntqm-player-outer::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

.ntqm-embed-body .ntqm-screen {
    padding: 1rem 1.25rem !important;
}

.ntqm-embed-body .ntqm-question-text {
    font-size: 1.2rem !important;
    margin-bottom: 1rem !important;
}

.ntqm-embed-body .ntqm-answers-grid {
    gap: 0.75rem !important;
    margin-bottom: 1.25rem !important;
}

.ntqm-embed-body .ntqm-answer-card {
    padding: 0.75rem 1rem !important;
}

.ntqm-embed-body .ntqm-feedback-banner {
    padding: 1rem !important;
    margin-bottom: 1.25rem !important;
}

.ntqm-embed-body .ntqm-feedback-explanation {
    max-height: none !important;
    overflow-y: visible !important;
}

/* Elegant call-to-action cards for iframe plays */
.ntqm-embed-teaser-card {
    margin-top: 24px;
    padding: 24px;
    border: 2px dashed var(--ntqm-primary);
    border-radius: var(--ntqm-radius, 8px);
    text-align: center;
    background-color: rgba(30, 58, 138, 0.03);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease-in-out;
}

.ntqm-embed-teaser-card:hover {
    background-color: rgba(30, 58, 138, 0.05);
    border-color: var(--ntqm-accent);
}

.ntqm-embed-teaser-icon {
    font-size: 28px;
    display: block;
    margin-bottom: 10px;
    animation: ntqm-teaser-pulse 2s infinite ease-in-out;
}

.ntqm-embed-teaser-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--ntqm-primary);
    margin: 0 0 8px 0;
}

.ntqm-embed-teaser-text {
    font-size: 0.85rem;
    color: var(--ntqm-text);
    line-height: 1.5;
    margin: 0 0 16px 0;
    font-weight: 500;
}

.ntqm-embed-teaser-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    font-weight: 700;
    width: auto !important;
    margin: 0 auto !important;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.2);
}

@keyframes ntqm-teaser-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Responsive Desktop/Mobile Helpers for Answers detail table */
@media (max-width: 639px) {
    .ntqm-desktop-only {
        display: none !important;
    }
    .ntqm-mobile-only {
        display: block !important;
    }
}
@media (min-width: 640px) {
    .ntqm-desktop-only {
        display: block !important;
    }
    .ntqm-mobile-only {
        display: none !important;
    }
}

/* =========================================================================
   NEWEST QUIZZES GRID LAYOUT
   ========================================================================= */

.ntqm-widget-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.ntqm-widget-grid-card {
    background: #ffffff;
    border: 1px solid var(--ntqm-border, #e5e7eb);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 200px;
    transition: all 0.2s ease-in-out;
}

.ntqm-widget-grid-card:hover {
    border-color: var(--ntqm-accent, #3b82f6);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.ntqm-widget-grid-card-grayed {
    opacity: 0.85;
    background: #fafbfe !important;
}

.ntqm-widget-grid-card-grayed:hover {
    opacity: 1;
    background: #ffffff !important;
}

.ntqm-widget-grid-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.ntqm-widget-grid-card-title {
    margin: 0 0 8px 0 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
}

.ntqm-widget-grid-card-title a {
    color: var(--ntqm-text, #1f2937);
    text-decoration: none;
    transition: color 0.15s ease;
}

.ntqm-widget-grid-card-title a:hover {
    color: var(--ntqm-primary, #4f46e5);
}

.ntqm-widget-grid-preview {
    font-size: 12px;
    color: var(--ntqm-gray, #6b7280);
    line-height: 1.45;
    margin: 0 0 14px 0 !important;
}

.ntqm-widget-grid-difficulty-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.ntqm-widget-diff-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

/* Difficulty colors */
.ntqm-diff-sauschwer { background-color: #fee2e2; color: #991b1b; }
.ntqm-diff-schwer { background-color: #ffedd5; color: #9a3412; }
.ntqm-diff-kann_man_wissen { background-color: #fef9c3; color: #854d0e; }
.ntqm-diff-leicht { background-color: #ecfdf5; color: #065f46; }
.ntqm-diff-weiss_jeder { background-color: #f0fdf4; color: #166534; }

.ntqm-widget-pct-badge {
    font-size: 11px;
    font-weight: 600;
    color: #4b5563;
    display: flex;
    align-items: center;
    gap: 3px;
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
}

.ntqm-widget-grid-footer {
    border-top: 1px solid #f3f4f6;
    padding-top: 10px;
}

.ntqm-widget-grid-play-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 700;
    color: var(--ntqm-primary, #4f46e5);
    text-decoration: none;
    transition: transform 0.2s ease;
}

.ntqm-widget-grid-play-btn:hover {
    transform: translateX(3px);
}

/* =========================================================================
   CATEGORY IMAGES INTEGRATION STYLES
   ========================================================================= */

.ntqm-widget-cat {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.ntqm-cat-icon {
    width: 14px !important;
    height: 14px !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    display: inline-block !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
}

.ntqm-cat-header-icon {
    width: 18px !important;
    height: 18px !important;
    object-fit: cover !important;
    border-radius: 4px !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    vertical-align: middle !important;
    display: inline-block !important;
    flex-shrink: 0 !important;
    margin-right: 6px !important;
}

.ntqm-widget-grid-card-image {
    width: calc(100% + 32px) !important;
    height: 120px !important;
    background-size: cover !important;
    background-position: center !important;
    margin-top: -16px !important;
    margin-left: -16px !important;
    margin-right: -16px !important;
    margin-bottom: 12px !important;
    border-top-left-radius: 7px !important;
    border-top-right-radius: 7px !important;
    border-bottom: 1px solid var(--ntqm-border, #e5e7eb) !important;
}

/* =========================================================================
   NEWEST QUIZZES SCREENSHOT GRID INTEGRATION
   ========================================================================= */

.ntqm-neueste-quizzes-wrapper,
.ntqm-category-landing-wrapper,
.ntqm-dashboard-wrapper {
    background-color: #ffffff !important;
    border-radius: 20px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    padding: 24px !important;
    margin-bottom: 35px !important;
    box-sizing: border-box !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
    container-type: inline-size !important;
}

.ntqm-homepage-master-wrapper {
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
}

.ntqm-player-outer {
    border-radius: 20px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
}

.ntqm-neueste-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 24px !important;
    border-bottom: 2px solid #f1f5f9 !important;
    padding-bottom: 12px !important;
}

.ntqm-neueste-title-wrapper {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.ntqm-neueste-icon-circle {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    background-color: #f3e8ff !important;
    border-radius: 50% !important;
    color: #7c3aed !important;
}

.ntqm-neueste-icon-circle .dashicons {
    font-size: 18px !important;
    width: 18px !important;
    height: 18px !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.ntqm-neueste-title {
    margin: 0 !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    letter-spacing: 0.5px !important;
    color: #1e293b !important;
    text-transform: uppercase !important;
}

.ntqm-neueste-archive-link {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    text-decoration: none !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    transition: color 0.15s ease !important;
}

.ntqm-neueste-archive-link:hover {
    color: #7c3aed !important;
}

.ntqm-neueste-archive-link .ntqm-arrow {
    font-size: 14px !important;
    transition: transform 0.15s ease !important;
}

.ntqm-neueste-archive-link:hover .ntqm-arrow {
    transform: translateX(3px) !important;
}

/* THE GRID */
.ntqm-neueste-quizzes-grid {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 20px !important;
}

.ntqm-neueste-quizzes-grid.ntqm-grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
}
.ntqm-neueste-quizzes-grid.ntqm-grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
.ntqm-neueste-quizzes-grid.ntqm-grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}
.ntqm-neueste-quizzes-grid.ntqm-grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}
.ntqm-neueste-quizzes-grid.ntqm-grid-cols-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}

/* Dynamically adjust card design based on columns to utilize extra space */
/* By default, 1-column layout acts as normal vertical cards (safe for narrow sidebars / spaces) */
.ntqm-grid-cols-1 .ntqm-neueste-card {
    flex-direction: column !important;
}
.ntqm-grid-cols-1 .ntqm-neueste-card-media-wrapper {
    width: 100% !important;
    height: 80px !important;
    min-height: unset !important;
}
.ntqm-grid-cols-1 .ntqm-neueste-card-content {
    padding: 16px !important;
}
.ntqm-grid-cols-1 .ntqm-neueste-card-title {
    font-size: 16px !important;
    margin-bottom: 6px !important;
}

/* If the container has enough horizontal space (>= 580px), render as an elegant horizontal card */
@container (min-width: 580px) {
    .ntqm-grid-cols-1 .ntqm-neueste-card {
        flex-direction: row !important;
        align-items: stretch !important;
    }
    .ntqm-grid-cols-1 .ntqm-neueste-card-media-wrapper {
        width: 180px !important;
        height: auto !important;
        min-height: 100px !important;
        flex-shrink: 0 !important;
    }
    .ntqm-grid-cols-1 .ntqm-neueste-card-content {
        padding: 24px !important;
        justify-content: center !important;
    }
    .ntqm-grid-cols-1 .ntqm-neueste-card-title {
        font-size: 20px !important;
        margin-bottom: 8px !important;
    }
    .ntqm-grid-cols-1 .ntqm-neueste-card-preview {
        font-size: 14px !important;
        line-height: 1.6 !important;
        color: #475569 !important;
    }
}

.ntqm-grid-cols-2 .ntqm-neueste-card-media-wrapper {
    height: 170px !important;
}
.ntqm-grid-cols-2 .ntqm-neueste-card-title {
    font-size: 18px !important;
    margin-bottom: 8px !important;
}

.ntqm-grid-cols-3 .ntqm-neueste-card-media-wrapper {
    height: 150px !important;
}
.ntqm-grid-cols-3 .ntqm-neueste-card-title {
    font-size: 17px !important;
}

.ntqm-grid-cols-4 .ntqm-neueste-card-media-wrapper,
.ntqm-grid-cols-5 .ntqm-neueste-card-media-wrapper {
    height: 135px !important;
}

/* Responsive Grid Breakpoints according to odd/even rules:
   - 4 cols (even) -> 2 cols -> 1 col
   - 2 cols (even) -> 1 col
   - 6 cols (even) -> 4 cols -> 2 cols -> 1 col
   - 5 cols (odd)  -> 3 cols -> 1 col
   - 3 cols (odd)  -> 1 col (jumps directly from 3 to 1)
   - 1 col (odd)   -> 1 col
*/

@container (max-width: 1024px) {
    .ntqm-neueste-quizzes-grid.ntqm-grid-cols-6 {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
    .ntqm-neueste-quizzes-grid.ntqm-grid-cols-5 {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
    .ntqm-neueste-quizzes-grid.ntqm-grid-cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    .ntqm-neueste-quizzes-grid.ntqm-grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
    .ntqm-neueste-quizzes-grid.ntqm-grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    .ntqm-neueste-quizzes-grid.ntqm-grid-cols-1 {
        grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 1024px) {
    .ntqm-neueste-quizzes-grid.ntqm-grid-cols-6 {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
    .ntqm-neueste-quizzes-grid.ntqm-grid-cols-5 {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
    .ntqm-neueste-quizzes-grid.ntqm-grid-cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    .ntqm-neueste-quizzes-grid.ntqm-grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
    .ntqm-neueste-quizzes-grid.ntqm-grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    .ntqm-neueste-quizzes-grid.ntqm-grid-cols-1 {
        grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    }

    /* Reset 1-column layout features slightly on mid screens if container is wide enough */
    @container (min-width: 580px) {
        .ntqm-grid-cols-1 .ntqm-neueste-card-media-wrapper {
            width: 180px !important;
            min-height: 130px !important;
        }
    }
}

@container (max-width: 850px) {
    #ntqm-feedback-banner #ntqm-feedback-explanation {
        display: block !important;
    }
    .ntqm-neueste-quizzes-grid {
        gap: 14px !important;
    }
    .ntqm-neueste-quizzes-grid.ntqm-grid-cols-6 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    .ntqm-neueste-quizzes-grid.ntqm-grid-cols-5 {
        grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    }
    .ntqm-neueste-quizzes-grid.ntqm-grid-cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    .ntqm-neueste-quizzes-grid.ntqm-grid-cols-3 {
        grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    }
    .ntqm-neueste-quizzes-grid.ntqm-grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    .ntqm-neueste-quizzes-grid.ntqm-grid-cols-1 {
        grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 850px) {
    #ntqm-feedback-banner #ntqm-feedback-explanation {
        display: block !important;
    }
    .ntqm-neueste-quizzes-grid {
        gap: 14px !important;
    }
    .ntqm-neueste-quizzes-grid.ntqm-grid-cols-6 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    .ntqm-neueste-quizzes-grid.ntqm-grid-cols-5 {
        grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    }
    .ntqm-neueste-quizzes-grid.ntqm-grid-cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    .ntqm-neueste-quizzes-grid.ntqm-grid-cols-3 {
        grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    }
    .ntqm-neueste-quizzes-grid.ntqm-grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    .ntqm-neueste-quizzes-grid.ntqm-grid-cols-1 {
        grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    }

    /* Reset row style on mobile/tablet to vertical cards */
    .ntqm-grid-cols-1 .ntqm-neueste-card {
        flex-direction: column !important;
    }
    .ntqm-grid-cols-1 .ntqm-neueste-card-media-wrapper {
        width: 100% !important;
        height: 120px !important;
        min-height: unset !important;
    }
    .ntqm-grid-cols-1 .ntqm-neueste-card-content {
        padding: 16px !important;
    }
    .ntqm-grid-cols-1 .ntqm-neueste-card-title {
        font-size: 16px !important;
    }
    .ntqm-neueste-card-preview {
        -webkit-line-clamp: 4 !important;
        line-clamp: 4 !important;
        max-height: 85px !important;
    }
}

@container (max-width: 580px) {
    .ntqm-neueste-quizzes-grid,
    .ntqm-neueste-quizzes-grid.ntqm-grid-cols-1,
    .ntqm-neueste-quizzes-grid.ntqm-grid-cols-2,
    .ntqm-neueste-quizzes-grid.ntqm-grid-cols-3,
    .ntqm-neueste-quizzes-grid.ntqm-grid-cols-4,
    .ntqm-neueste-quizzes-grid.ntqm-grid-cols-5,
    .ntqm-neueste-quizzes-grid.ntqm-grid-cols-6 {
        grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    }

    .ntqm-grid-cols-2 .ntqm-neueste-card-media-wrapper,
    .ntqm-grid-cols-3 .ntqm-neueste-card-media-wrapper,
    .ntqm-grid-cols-4 .ntqm-neueste-card-media-wrapper,
    .ntqm-grid-cols-5 .ntqm-neueste-card-media-wrapper,
    .ntqm-grid-cols-6 .ntqm-neueste-card-media-wrapper {
        height: 140px !important;
    }
}

@media (max-width: 580px) {
    .ntqm-neueste-quizzes-grid,
    .ntqm-neueste-quizzes-grid.ntqm-grid-cols-1,
    .ntqm-neueste-quizzes-grid.ntqm-grid-cols-2,
    .ntqm-neueste-quizzes-grid.ntqm-grid-cols-3,
    .ntqm-neueste-quizzes-grid.ntqm-grid-cols-4,
    .ntqm-neueste-quizzes-grid.ntqm-grid-cols-5,
    .ntqm-neueste-quizzes-grid.ntqm-grid-cols-6 {
        grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    }

    .ntqm-grid-cols-2 .ntqm-neueste-card-media-wrapper,
    .ntqm-grid-cols-3 .ntqm-neueste-card-media-wrapper,
    .ntqm-grid-cols-4 .ntqm-neueste-card-media-wrapper,
    .ntqm-grid-cols-5 .ntqm-neueste-card-media-wrapper,
    .ntqm-grid-cols-6 .ntqm-neueste-card-media-wrapper {
        height: 140px !important;
    }
}

/* CARD LINK */
.ntqm-neueste-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    text-decoration: none !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03) !important;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    height: 100% !important;
    min-height: 380px !important;
    position: relative !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
}

.ntqm-neueste-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.16) !important;
    border-color: #a855f7 !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    height: auto !important;
    z-index: 50 !important;
}

/* TOP MEDIA */
.ntqm-neueste-card-media-wrapper {
    position: relative !important;
    height: 140px !important;
    min-height: 110px !important;
    background: #f1f5f9 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    border-top-left-radius: 13px !important;
    border-top-right-radius: 13px !important;
}

.ntqm-neueste-card-bg-image {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-size: cover !important;
    background-position: center !important;
    filter: brightness(0.95) !important;
}

.ntqm-neueste-card-overlay {
    position: relative !important;
    z-index: 1 !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.ntqm-neueste-card-overlay-text {
    font-size: 26px !important;
    font-weight: 800 !important;
    color: #475569 !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5) !important;
}

.ntqm-neueste-goat-badge {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    z-index: 2 !important;
    background: #1e1b4b !important;
    color: #fbbf24 !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
}

/* CONTENT */
.ntqm-neueste-card-content {
    padding: 18px 20px !important;
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
    justify-content: flex-start !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
}

.ntqm-neueste-card-title {
    margin: 0 0 8px 0 !important;
    font-size: 16.5px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    color: #0f172a !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    height: 1.35em !important;
    display: block !important;
    transition: all 0.2s ease !important;
}

/* BADGE ROW */
.ntqm-neueste-card-badge-row {
    margin-top: 0 !important;
    margin-bottom: 8px !important;
    display: flex !important;
    align-items: center !important;
    min-height: 22px !important;
}

.ntqm-screenshot-diff-badge {
    display: inline-block !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    letter-spacing: 0.5px !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
    text-transform: uppercase !important;
}

.ntqm-screenshot-diff-leicht {
    background-color: rgba(139, 92, 246, 0.08) !important;
    border: 1px solid rgba(139, 92, 246, 0.2) !important;
    color: #7c3aed !important;
}

.ntqm-screenshot-diff-mittel {
    background-color: rgba(139, 92, 246, 0.08) !important;
    border: 1px solid rgba(139, 92, 246, 0.2) !important;
    color: #7c3aed !important;
}

.ntqm-screenshot-diff-schwer {
    background-color: rgba(239, 68, 68, 0.08) !important;
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
    color: #dc2626 !important;
}

/* PREVIEW TEXT AND FOOTER */
.ntqm-neueste-card-preview {
    margin: 0 !important;
    font-size: 13.5px !important;
    line-height: 1.55 !important;
    color: #475569 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 7 !important;
    line-clamp: 7 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-height: 148px !important;
    margin-top: 4px !important;
    padding-top: 0 !important;
    border-top: none !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Mouseover expansion: reveal complete text when hovering over card or text element */
.ntqm-neueste-card:hover .ntqm-neueste-card-title,
.ntqm-neueste-card-title:hover {
    color: #7c3aed !important;
}

.ntqm-neueste-card:hover .ntqm-neueste-card-preview,
.ntqm-neueste-card-preview:hover {
    display: block !important;
    -webkit-line-clamp: unset !important;
    line-clamp: unset !important;
    max-height: none !important;
    overflow: visible !important;
    white-space: normal !important;
}

.ntqm-neueste-card-grayed {
    opacity: 0.85 !important;
}

/* =========================================================================
   COMMUNITY & USER DASHBOARD STYLES
   ========================================================================= */

.ntqm-community-card {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.ntqm-community-logo-container {
    text-align: center;
    margin-bottom: 20px;
}

.ntqm-community-logo {
    max-width: 150px;
    height: auto;
    display: inline-block;
}

.ntqm-tab-btn {
    transition: all 0.2s ease;
}

.ntqm-tab-btn:hover {
    color: #4f46e5 !important;
    border-bottom-color: #c7d2fe !important;
}

.ntqm-tab-btn.active {
    color: #4f46e5 !important;
    border-bottom-color: #4f46e5 !important;
}

.ntqm-tab-pane {
    animation: ntqmFadeIn 0.3s ease;
}

@keyframes ntqmFadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.ntqm-btn-primary {
    background-color: #4f46e5;
    color: #ffffff;
    border: none;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.ntqm-btn-primary:hover {
    background-color: #4338ca;
}

/* Hover effects for expandable results detail elements */
.ntqm-result-card-item {
    transition: background-color 0.15s ease !important;
    cursor: pointer !important;
}
.ntqm-result-card-item:hover {
    background-color: #faf5ff !important; /* Subtle purple hue on hover to indicate clickability */
}
@media (max-width: 639px) {
    .ntqm-answers-subblock, .ntqm-explanation-box {
        padding-left: 0 !important;
        margin-left: 0 !important;
    }
}

/* Sound icon enhancements for clear visual state */
.ntqm-sound-icon {
    position: relative !important;
}
.ntqm-sound-toggle-btn.muted .ntqm-sound-icon::after {
    content: "" !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 18px !important;
    height: 2px !important;
    background-color: #ef4444 !important; /* Visual red slash */
    transform: translate(-50%, -50%) rotate(-45deg) !important;
    border-radius: 1px !important;
    box-shadow: 0 0 2px rgba(255, 255, 255, 0.9) !important;
}

/* Visibility Helper for newest quizzes navigation */
.ntqm-hidden {
    display: none !important;
}

/* Responsive Quiz Preview Thumbnail Styles */
.ntqm-quiz-preview-image {
    width: 186px;
    height: 186px;
}
.ntqm-quiz-preview-placeholder {
    width: 186px;
    height: 186px;
}
.ntqm-quiz-preview-placeholder .dashicons {
    font-size: 74px !important;
    width: 74px !important;
    height: 74px !important;
}

@media (max-width: 768px) {
    .ntqm-quiz-preview-image {
        width: 93px !important;
        height: 93px !important;
    }
    .ntqm-quiz-preview-placeholder {
        width: 93px !important;
        height: 93px !important;
    }
    .ntqm-quiz-preview-placeholder .dashicons {
        font-size: 37px !important;
        width: 37px !important;
        height: 37px !important;
    }

    /* Compact Bestenliste (Highscores) on mobile */
    .ntqm-highscore-board {
        padding: 8px !important;
        margin-top: 12px !important;
    }
    .ntqm-board-header {
        flex-direction: column !important;
        gap: 8px !important;
        align-items: center !important;
        text-align: center !important;
        padding: 8px !important;
    }
    .ntqm-board-header h3 {
        font-size: 14px !important;
        margin-bottom: 4px !important;
    }
    .ntqm-board-tabs {
        width: 100% !important;
        display: flex !important;
        justify-content: space-between !important;
        background-color: rgba(0,0,0,0.03) !important;
        border-radius: 6px !important;
        padding: 2px !important;
    }
    .ntqm-board-tab {
        flex: 1 !important;
        padding: 5px 2px !important;
        font-size: 10.5px !important;
        text-align: center !important;
    }
    .ntqm-board-table-wrapper {
        overflow-x: hidden !important; /* Prevent any horizontal scroll */
        width: 100% !important;
        max-height: 350px !important;
    }
    .ntqm-board-table {
        font-size: 11px !important; /* Much smaller font size for mobile compatibility */
        table-layout: fixed !important; /* Force fixed column layout */
        width: 100% !important;
    }
    .ntqm-board-table th,
    .ntqm-board-table td {
        padding: 6px 4px !important; /* Extremely compact padding */
        text-overflow: ellipsis !important;
        overflow: hidden !important;
        white-space: nowrap !important;
    }
    /* Specific column width alignments for perfect fitting */
    .ntqm-board-table th:nth-child(1),
    .ntqm-board-table td:nth-child(1) {
        width: 12% !important; /* Platz */
        text-align: center !important;
    }
    .ntqm-board-table th:nth-child(2),
    .ntqm-board-table td:nth-child(2) {
        width: 40% !important; /* Name */
        text-align: left !important;
    }
    .ntqm-board-table td:nth-child(2) strong {
        display: inline-block !important;
        max-width: 100% !important;
        text-overflow: ellipsis !important;
        overflow: hidden !important;
        white-space: nowrap !important;
        vertical-align: bottom !important;
    }
    .ntqm-board-table th:nth-child(3),
    .ntqm-board-table td:nth-child(3) {
        width: 33% !important; /* Richtig / Punkte */
        text-align: left !important;
    }
    .ntqm-board-table th:nth-child(4),
    .ntqm-board-table td:nth-child(4) {
        width: 15% !important; /* Zeit */
        text-align: right !important;
    }
    .ntqm-rank-badge {
        width: 18px !important;
        height: 18px !important;
        font-size: 9px !important;
        line-height: 18px !important;
    }
}

/* Newest Quizzes Tag Filtering */
.ntqm-neueste-tags-filter {
    margin-top: 30px !important;
    padding-top: 20px !important;
    border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
    text-align: center !important;
}

.ntqm-neueste-tags-filter h4 {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #475569 !important;
    margin-top: 0 !important;
    margin-bottom: 12px !important;
}

.ntqm-neueste-tags-list {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 8px !important;
}

.ntqm-tag-filter-btn, .ntqm-cat-filter-btn {
    display: inline-block !important;
    padding: 6px 14px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 20px !important;
    color: #64748b !important;
    background: #ffffff !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02) !important;
}

.ntqm-tag-filter-btn:hover, .ntqm-cat-filter-btn:hover {
    color: #4f46e5 !important;
    border-color: #c7d2fe !important;
    background: #faf5ff !important;
}

.ntqm-tag-filter-btn.active, .ntqm-cat-filter-btn.active {
    color: #ffffff !important;
    background: #4f46e5 !important;
    border-color: #4f46e5 !important;
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2) !important;
}

/* Shortcode image size option "large" styles */
.ntqm-neueste-quizzes-grid.ntqm-image-size-large .ntqm-neueste-card-media-wrapper {
    height: 150px !important;
}
.ntqm-neueste-quizzes-grid.ntqm-image-size-large.ntqm-grid-cols-1 .ntqm-neueste-card-media-wrapper {
    height: 180px !important;
}
.ntqm-neueste-quizzes-grid.ntqm-image-size-large.ntqm-grid-cols-2 .ntqm-neueste-card-media-wrapper {
    height: 180px !important;
}
.ntqm-neueste-quizzes-grid.ntqm-image-size-large.ntqm-grid-cols-3 .ntqm-neueste-card-media-wrapper {
    height: 150px !important;
}
.ntqm-neueste-quizzes-grid.ntqm-image-size-large.ntqm-grid-cols-4 .ntqm-neueste-card-media-wrapper,
.ntqm-neueste-quizzes-grid.ntqm-image-size-large.ntqm-grid-cols-5 .ntqm-neueste-card-media-wrapper {
    height: 130px !important;
}

/* Mobile responsive resets for large image size */
@media (max-width: 1100px) {
    .ntqm-neueste-quizzes-grid.ntqm-image-size-large.ntqm-grid-cols-3 .ntqm-neueste-card-media-wrapper,
    .ntqm-neueste-quizzes-grid.ntqm-image-size-large.ntqm-grid-cols-4 .ntqm-neueste-card-media-wrapper,
    .ntqm-neueste-quizzes-grid.ntqm-image-size-large.ntqm-grid-cols-5 .ntqm-neueste-card-media-wrapper {
        height: 140px !important;
    }
}
@media (max-width: 768px) {
    .ntqm-neueste-quizzes-grid.ntqm-image-size-large.ntqm-grid-cols-2 .ntqm-neueste-card-media-wrapper,
    .ntqm-neueste-quizzes-grid.ntqm-image-size-large.ntqm-grid-cols-3 .ntqm-neueste-card-media-wrapper,
    .ntqm-neueste-quizzes-grid.ntqm-image-size-large.ntqm-grid-cols-4 .ntqm-neueste-card-media-wrapper,
    .ntqm-neueste-quizzes-grid.ntqm-image-size-large.ntqm-grid-cols-5 .ntqm-neueste-card-media-wrapper {
        height: 130px !important;
    }
}
@container (max-width: 580px) {
    .ntqm-neueste-quizzes-grid.ntqm-image-size-large.ntqm-grid-cols-1 .ntqm-neueste-card-media-wrapper,
    .ntqm-neueste-quizzes-grid.ntqm-image-size-large.ntqm-grid-cols-2 .ntqm-neueste-card-media-wrapper,
    .ntqm-neueste-quizzes-grid.ntqm-image-size-large.ntqm-grid-cols-3 .ntqm-neueste-card-media-wrapper,
    .ntqm-neueste-quizzes-grid.ntqm-image-size-large.ntqm-grid-cols-4 .ntqm-neueste-card-media-wrapper,
    .ntqm-neueste-quizzes-grid.ntqm-image-size-large.ntqm-grid-cols-5 .ntqm-neueste-card-media-wrapper {
        height: 150px !important;
    }
}
@media (max-width: 580px) {
    .ntqm-neueste-quizzes-grid.ntqm-image-size-large.ntqm-grid-cols-1 .ntqm-neueste-card-media-wrapper,
    .ntqm-neueste-quizzes-grid.ntqm-image-size-large.ntqm-grid-cols-2 .ntqm-neueste-card-media-wrapper,
    .ntqm-neueste-quizzes-grid.ntqm-image-size-large.ntqm-grid-cols-3 .ntqm-neueste-card-media-wrapper,
    .ntqm-neueste-quizzes-grid.ntqm-image-size-large.ntqm-grid-cols-4 .ntqm-neueste-card-media-wrapper,
    .ntqm-neueste-quizzes-grid.ntqm-image-size-large.ntqm-grid-cols-5 .ntqm-neueste-card-media-wrapper {
        height: 150px !important;
    }
}

/* Custom Row Layout and Compact Difficulty Styles for [ntqm_newest_quizzes] */
.ntqm-neueste-layout-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
}

.ntqm-neueste-layout-row .ntqm-neueste-card {
    flex-direction: row !important;
    align-items: stretch !important;
    min-height: 100px !important;
    height: auto !important;
}

.ntqm-neueste-layout-row .ntqm-neueste-card-media-wrapper {
    width: 140px !important;
    height: auto !important;
    min-height: 100px !important;
    flex-shrink: 0 !important;
}

.ntqm-neueste-layout-row .ntqm-neueste-card-content {
    padding: 12px 16px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    flex-grow: 1 !important;
}

.ntqm-neueste-layout-row .ntqm-neueste-card-title {
    margin: 0 0 4px 0 !important;
    font-size: 15px !important;
}

@media (max-width: 580px) {
    .ntqm-neueste-layout-row .ntqm-neueste-card {
        flex-direction: column !important;
    }
    .ntqm-neueste-layout-row .ntqm-neueste-card-media-wrapper {
        width: 100% !important;
        height: 110px !important;
        min-height: auto !important;
    }
}

/* Mobile responsive duel share link copy button stacking */
@media (max-width: 640px) {
    .ntqm-duel-link-box {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    .ntqm-duel-link-box #ntqm-duel-link-input {
        width: 100% !important;
        margin-bottom: 6px !important;
        text-overflow: ellipsis;
    }
    .ntqm-duel-link-box .ntqm-copy-duel-btn,
    .ntqm-duel-link-box #ntqm-copy-duel-btn {
        width: 100% !important;
        text-align: center !important;
    }
}

/* Stage / Round Transition Category Cards & Popovers */
.ntqm-stage-cat-card {
    position: relative !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}
.ntqm-stage-cat-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}
.ntqm-cat-popover {
    position: absolute !important;
    bottom: calc(100% + 8px) !important;
    left: 50% !important;
    transform: translateX(-50%) translateY(4px) !important;
    background: rgba(15, 23, 42, 0.95) !important;
    color: #ffffff !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
    padding: 6px 10px !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    white-space: nowrap !important;
    pointer-events: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease !important;
    z-index: 9999 !important;
    text-align: center !important;
}
.ntqm-cat-popover-arrow {
    position: absolute !important;
    top: 100% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    border-width: 5px !important;
    border-style: solid !important;
    border-color: rgba(15, 23, 42, 0.95) transparent transparent transparent !important;
}
/* Desktop Hover & Mobile Click Active */
.ntqm-stage-cat-card:hover .ntqm-cat-popover,
.ntqm-stage-cat-card.ntqm-popover-open .ntqm-cat-popover,
.ntqm-eval-cat-card:hover .ntqm-cat-popover,
.ntqm-eval-cat-card.ntqm-popover-open .ntqm-cat-popover {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) translateY(0) !important;
}
.ntqm-cat-badge-check {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 18px !important;
    height: 18px !important;
    background: #10b981 !important;
    color: #ffffff !important;
    border-radius: 50% !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.3) !important;
}
.ntqm-cat-badge-cross {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 18px !important;
    height: 18px !important;
    background: #f87171 !important;
    color: #ffffff !important;
    border-radius: 50% !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    box-shadow: 0 1px 3px rgba(248, 113, 113, 0.3) !important;
}
.ntqm-cat-badge-num {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 18px !important;
    height: 18px !important;
    background: #f1f5f9 !important;
    color: #64748b !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 50% !important;
    font-size: 10px !important;
    font-weight: 900 !important;
}

/* Question Screen Top Area & Super Quiz Optimization */
#ntqm-screen-game {
    padding-top: 1rem;
    padding-bottom: 1.25rem;
}

.ntqm-quiz-container-superquiz #ntqm-screen-game {
    padding-top: 0.6rem;
}

.ntqm-timer-bar-container {
    margin-bottom: 10px !important;
}

.ntqm-progress-bar-container {
    margin-bottom: 10px !important;
}

.ntqm-game-title {
    margin-bottom: 6px !important;
    padding-bottom: 4px !important;
}

@media (max-width: 600px) {
    #ntqm-screen-game {
        padding-top: 0.4rem !important;
        padding-bottom: 0.75rem !important;
    }
    .ntqm-quiz-container-superquiz #ntqm-screen-game {
        padding-top: 0.25rem !important;
    }
    .ntqm-timer-bar-container, .ntqm-progress-bar-container {
        margin-bottom: 8px !important;
    }
}








