/* Quick Check trigger button - matches sidebar button styling */
.quick-check-trigger {
    height: 100%;
    border-radius: 0px;
    width: 25%;
    color: var(--theme-palette-color-3);
    background-color: rgba(0, 0, 0, 0);
    border: 1px solid rgba(0, 0, 0, 0);
    font-size: 11px;
    display: flex;
    align-items: end;
    justify-content: center;
    text-align: center;
    padding: 10px 5px;
    flex-flow: column;
    align-items: center;
    justify-content: space-between;
    fill: var(--theme-palette-color-3);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
}

.quick-check-trigger svg {
    opacity: 0.8;
    fill: inherit;
    padding: 3px;
    height: 25px;
    width: 24px;
}

.quick-check-trigger:active {
    background-color: var(--theme-palette-color-2);
}

/* Full-screen modal */
.quick-check-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000000;
    overflow-y: hidden;
}

.quick-check-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--theme-palette-color-8);
}

.quick-check-modal-content {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0px 20px;
    overflow: hidden;
    justify-content: center;
}

/* @media (max-height: 800px) {
    .quick-check-modal-content {
        justify-content: end;
    }
} */

.quick-check-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--theme-palette-color-7);
    border: 1px solid var(--theme-palette-color-6);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000002;
}

.quick-check-close svg {
    width: 28px;
    height: 28px;
    fill: var(--theme-palette-color-4);
}

.quick-check-close:hover {
    /* background: var(--theme-palette-color-4); */
    transform: rotate(90deg);
}

/* Progress rings */
.quick-check-progress {
    display: flex;
    gap: 20px;
    z-index: 1000002;
    justify-content: center;
    align-items: center;
}
.quick-check-progress .circular-progress-bar {
    width: 70px;
    height: 70px;
}

.quick-check-progress span.progress, 
.quick-check-progress span.total {
    font-size: 14px;
}

.quick-check-progress .circular-progress-bar:after {
    inset: 5px;
}

.progress-ring-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 8;
}

.progress-ring-fill {
    fill: none;
    stroke: #34c759;
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 251.2;
    stroke-dashoffset: 251.2;
    transition: stroke-dashoffset 0.5s ease;
}

.progress-ring-fill[data-progress="categories"] {
    stroke: #667eea;
}

.progress-ring-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--theme-palette-color-4);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.progress-value {
    font-size: 1.8em;
    font-weight: bold;
    line-height: 1;
}

.progress-label {
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
    margin-top: 4px;
}

.quick-check-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    min-height: 500px;
    min-width: 350px;
}

.cards-wrapper {
    position: relative;
    width: 100%;
    height: 500px;
    perspective: 1000px;
}

@media (min-width: 1000px) {
    .cards-wrapper {
        height: 300px;
    }
}

.quick-check-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    /* margin-top: 20px; */
}

.quick-check-counter-display {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--theme-palette-color-4);
    min-width: 80px;
    text-align: center;
    z-index: 1000001;
}

.quick-check-instructions {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 10px;
}

.quick-check-instructions p {
    color: var(--theme-palette-color-4);
    font-size: 0.9em;
    margin: 0;
    opacity: 0.8;
}

.quick-check-action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
    z-index: 1000001;
    position: relative;
}

.action-button {
    height: 40px;
    padding: 0 20px;
    border-radius: 25px;
    border: 1px solid var(--theme-palette-color-6);
    background: var(--theme-palette-color-7);
    cursor: pointer;
    color: var(--theme-palette-color-4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    font-size: 0.9em;
    font-weight: 500;
    white-space: nowrap;
}

.action-button:active {
    transform: translateY(0);
}

.action-button .button-text {
    line-height: 1;
    margin-top: 3px;
}

.cross-button:hover {
    color: #ff4444;
    border-color: #ff4444;
}

.cross-button:active {
    background-color: #ff4444;
    color: var(--theme-palette-color-8);
}

.tick-button:hover {
    color: #00c853;
    border-color: #00c853;
}

.tick-button:active {
    background-color: #00a843;
    color: var(--theme-palette-color-8);
}

.undo-button {
    position: relative;
    background: none;
    color: var(--theme-palette-color-4);
    padding: 5px 15px;
    cursor: pointer;
    z-index: 1000001;
    pointer-events: none;
}

.undo-button[style*="opacity: 1"] {
    pointer-events: auto;
}

.card {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 350px;
    height: 100%;
    background: var(--theme-palette-color-7);
    border: 1px solid var(--theme-palette-color-6);
    border-radius: 20px;
    padding: 10px;
    /* box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); */
    cursor: grab;
    user-select: none;
    touch-action: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--theme-palette-color-4);
    overflow: hidden;
}

/* Styling for cloned film card content */
.card .quick-check-film-card {
    width: 100%;
    max-width: 280px;
    display: flex;
    flex-flow: column wrap;
    align-items: center;
    gap: 10px;
    height: 100%;
}

.card .quick-check-film-card .film-poster {
    display: block;
    width: 100%;
    max-width: 200px;
    height: auto;
    margin-top: auto;
}



.card .quick-check-film-card .film-poster img {
    width: 100%;
    height: auto;
    /* border-radius: 10px; */
    /* box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); */
    max-height: 250px;
    object-fit: contain;
}

.card .quick-check-film-card .film-name {
    text-align: center;
    margin: 5px 0;
    font-size: 1.5em;
    line-height: 1;
}

/* No films message card */
.no-films-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(240, 240, 250, 0.95));
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.no-films-message {
    text-align: center;
    padding: 40px;
    color: #333;
}

.no-films-message p {
    font-size: 1.2em;
    margin: 0;
    font-weight: 500;
}

/* Indicator cards */
.indicator-card {
    position: absolute;
    width: 90%;
    max-width: 400px;
    height: 500px;
    background: transparent;
    border: 4px dashed var(--theme-palette-color-6);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
}

.indicator-card span {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--theme-palette-color-6);
    text-align: center;
    line-height: 1.2;
    /* writing-mode: vertical-rl; */
    text-orientation: mixed;
}

.indicator-card-left {
    left: -100%;
    justify-content: flex-end;
    padding-right: 10px;
}
.indicator-card-left span {
    writing-mode: sideways-lr;
}

.indicator-card-right {
    right: -100%;
    justify-content: flex-start;
    padding-left: 8px;
}
.indicator-card-right span {
    writing-mode: sideways-rl;
}

.card .quick-check-film-card .film-name h3 {
    font-size: 1.3em;
    margin: 0;
    color: var(--theme-palette-color-4);
    font-weight: bold;
}

.card .quick-check-film-card .nominations-wins-text {
    font-size: 0.9em;
    opacity: 0.9;
    text-align: center;
}

.card .quick-check-film-card .buttons-cntr {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
}

.card .quick-check-film-card .buttons-cntr button {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card .quick-check-film-card .buttons-cntr button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.card .quick-check-film-card .buttons-cntr button svg {
    width: 20px;
    height: 20px;
    fill: var(--theme-palette-color-4);
}

.swipe-indicator {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 30px;
    opacity: 0;
    transition: opacity 0.1s ease;
    pointer-events: none;
    z-index: 10;
    border-radius: 20px;
}

.swipe-indicator-icon {
    width: 80px;
    height: 80px;
    background: var(--theme-palette-color-4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.swipe-indicator-icon svg {
    width: 50px;
    height: 50px;
}

.swipe-indicator span {
    font-size: 1.8em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--theme-palette-color-4);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.swipe-indicator-left {
    background: rgba(255, 59, 48, 1);
    align-items: flex-end;
    text-align: right;
}

.swipe-indicator-left .swipe-indicator-icon svg {
    fill: #ff3b30;
}

.swipe-indicator-right {
    background: rgba(52, 199, 89, 1);
    align-items: flex-start;
}

.swipe-indicator-right .swipe-indicator-icon svg {
    fill: #34c759;
}

.card:nth-child(1) {
    transform: translateX(-50%) scale(0.9) translateY(10px);
    opacity: 0.8;
}

.card:nth-child(2) {
    transform: translateX(-50%) scale(0.95) translateY(5px);
    opacity: 0.9;
}

.card:nth-child(3) {
    transform: translateX(-50%) scale(0.97) translateY(3px);
    opacity: 0.95;
}

.card:nth-child(4) {
    transform: translateX(-50%) scale(0.99) translateY(1px);
    opacity: 0.98;
}

.card.active {
    transform: translateX(-50%) scale(1);
    opacity: 1;
}

.card:active {
    cursor: grabbing;
}

.card.swiping {
    transition: none;
}

.card.swipe-left {
    animation: swipeLeft 0.5s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
}

.card.swipe-right {
    animation: swipeRight 0.5s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
}

@keyframes swipeLeft {
    to {
        transform: translateX(-150%);
        opacity: 0;
    }
}

@keyframes swipeRight {
    to {
        transform: translateX(50%);
        opacity: 0;
    }
}

.card-content {
    text-align: center;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0;
    overflow: hidden;
}

.card-content h2 {
    font-size: 1.5em;
    margin: 0;
    font-weight: bold;
    padding: 0 10px;
    word-wrap: break-word;
    max-width: 100%;
}

.card-content p {
    font-size: 1em;
    opacity: 0.9;
    margin: 0;
}

.card-poster {
    max-width: 90%;
    max-height: 220px;
    width: auto;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    object-fit: contain;
    flex-shrink: 0;
}

.card-counter {
    font-size: 1em;
    opacity: 0.8;
    margin: 0;
}

.card-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
}

.card-buttons button {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-buttons button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.card-buttons button svg {
    width: 20px;
    height: 20px;
    fill: var(--theme-palette-color-4);
}

.results {
    text-align: center;
    background: var(--theme-palette-color-4);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.results.hidden {
    display: none;
}

.results h2 {
    color: #667eea;
    margin-bottom: 30px;
    font-size: 2em;
}

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

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin: 10px 0;
    background: #f5f5f5;
    border-radius: 10px;
    font-size: 1.1em;
}

.result-item .card-number {
    font-weight: bold;
    color: #667eea;
}

.result-item .direction {
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
}

.result-item .direction.left {
    background: #ff6b6b;
    color: var(--theme-palette-color-4);
}

.result-item .direction.right {
    background: #51cf66;
    color: var(--theme-palette-color-4);
}

.reset-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--theme-palette-color-4);
    border: none;
    padding: 15px 40px;
    border-radius: 25px;
    font-size: 1.1em;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.reset-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.reset-button:active {
    transform: translateY(0);
}


@media (max-width: 500px) {
    .card .quick-check-film-card .categories-list {
        display: none;
    }
    .card .quick-check-film-card .film-stats {
        margin-bottom: 0rem;
        margin-top: auto;
    }
    .card .quick-check-film-card .film-poster {
        margin-top: 0;
    }
    .card, .cards-wrapper, .indicator-card {
        height: 400px;
    }
    .quick-check-container {
        min-width: 280px;
    }
    .indicator-card {
        width: 95%;
    }
}
/* Mobile optimizations */
/* @media (max-width: 600px) {
    .quick-check-trigger {
        bottom: 20px;
        right: 20px;
        padding: 14px 24px;
        font-size: 1em;
    }
    
    .quick-check-trigger svg {
        width: 20px;
        height: 20px;
    }
    
    .quick-check-modal-content {
        padding: 20px 10px;
    }
    
    .quick-check-close {
        top: 10px;
        right: 10px;
        width: 44px;
        height: 44px;
    }
    
    .quick-check-close svg {
        width: 24px;
        height: 24px;
    }
    
    .quick-check-progress {
        gap: 20px;
        margin-bottom: 20px;
    }
    
    .progress-ring {
        width: 80px;
        height: 80px;
    }
    
    .progress-ring-bg,
    .progress-ring-fill {
        cx: 40;
        cy: 40;
        r: 32;
        stroke-dasharray: 201;
    }
    
    .progress-ring-fill {
        stroke-dashoffset: 201;
    }
    
    .progress-value {
        font-size: 1.4em;
    }
    
    .progress-label {
        font-size: 0.65em;
    }
    
    .quick-check-container {
        padding: 10px;
        margin: 0;
    }
    
    .card {
        width: 95%;
        height: 300px;
    }
    
    .card-content h2 {
        font-size: 2em;
    }
    
    .card-content p {
        font-size: 1em;
    }
    
    .swipe-indicator-icon {
        width: 60px;
        height: 60px;
    }
    
    .swipe-indicator-icon svg {
        width: 36px;
        height: 36px;
    }
    
    .swipe-indicator span {
        font-size: 1.3em;
    }
} */


.card .quick-check-film-card ul.categories-list {
    list-style: none;
    font-size: 7px;
    columns: 3;
    padding: 1em;
}

.card .quick-check-film-card ul.categories-list li {
    line-height: 1;
    margin-bottom: 1em;
    text-wrap: balance;
}
.card .quick-check-film-card ul.categories-list li.category-winner {
    color: var(--theme-palette-color-1);
}
.quick-check-film-card .film-stats {
    margin-bottom: -1rem;
    margin-top: auto;
}

@media (min-width: 1000px) {
    .quick-check-container {
        min-width: 620px;
    }
    .card .quick-check-film-card ul.categories-list {
        font-size: 9px;
        columns: 2;
        padding: 0;
        margin: auto 0 0;
        max-width: 290px;
    }
    
    .card {
        max-width: 520px;
    }
    
    .card .quick-check-film-card {
        align-items: flex-start;
        gap: 0 20px;
        min-width: 500px;
    }
    
    .card .quick-check-film-card .film-poster {
        flex-shrink: 0;
        width: auto;
        max-width: 250px;
        height: 100%;
        margin-top: 0;
    }
    
    .card .quick-check-film-card .film-poster img {
        max-height: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .card .quick-check-film-card > *:not(.film-poster) {
        text-align: left;
    }
    
    .card .quick-check-film-card .film-name {
        text-align: left;
        max-width: 300px;
    }
    
    .card .quick-check-film-card .nominations-wins-text {
        text-align: left;
    }

    .card .quick-check-film-card ul.categories-list li {
        margin-bottom: 0.7em;
    }
}

/* New user tooltip */
@keyframes tooltipFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.quick-check-tooltip {
    position: absolute;
    background-color: var(--theme-palette-color-1, #fff);
    color: #000;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s ease;
    font-size: 14px;
    font-weight: bold;
    width: 200px;
    pointer-events: none;
    animation: tooltipFloat 2s ease-in-out infinite;
}

.quick-check-tooltip-text {
    line-height: 1.4;
}

/* Position tooltip below trigger on desktop */
@media (min-width: 1000px) {
    .quick-check-tooltip {
        top: calc(100% + 8px);
        left: 0%;
        /* transform: translateX(-50%); */
    }
    
    /* Add a small arrow pointing down */
    .quick-check-tooltip::after {
        content: '';
        position: absolute;
        bottom: 100%;
        left: 8px;
        transform: translateX(-50%);
        border: 6px solid transparent;
        border-top-color: var(--theme-palette-color-1, #fff);
        rotate: 180deg;
    }
}

/* Position tooltip above trigger on tablet and mobile */
@media (max-width: 999px) {
    .quick-check-tooltip {
        bottom: calc(100% + 8px);
        left: 0%;
        /* transform: translateX(-50%); */
    }
    
    /* Add a small arrow pointing down */
    .quick-check-tooltip::after {
        content: '';
        position: absolute;
        top: 100%;
        left: 20px;
        transform: translateX(-50%);
        border: 6px solid transparent;
        border-top-color: var(--theme-palette-color-1, #fff);
    }
}

/* Filter Button */
.quick-check-filter-button {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--theme-palette-color-7);
    border: 1px solid var(--theme-palette-color-6);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000002;
}

.quick-check-filter-button svg {
    width: 20px;
    height: 20px;
    fill: var(--theme-palette-color-4);
}

.quick-check-filter-button:hover {
    /* Same hover as close button but without rotate */
}

/* Filter Modal */
.quick-check-filter-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000003;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.quick-check-filter-modal-content {
    background: var(--theme-palette-color-7);
    border: 1px solid var(--theme-palette-color-6);
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.quick-check-filter-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--theme-palette-color-6);
}

.quick-check-filter-modal-header h3 {
    margin: 0;
    font-size: 1.4em;
    color: var(--theme-palette-color-4);
}

.quick-check-filter-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 50%;
}

.quick-check-filter-close:hover {
    background: #f0f0f0;
}

.quick-check-filter-close svg {
    width: 24px;
    height: 24px;
    fill: #666;
}

.quick-check-filter-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.quick-check-filter-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.quick-check-filter-actions button {
    padding: 4px 16px 2px;
    background: var(--theme-palette-color-6);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--theme-palette-color-4);
}

.quick-check-filter-actions button:hover {
    background: var(--theme-palette-color-1);
    color: black;
}

.quick-check-filter-categories {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.quick-check-filter-category-item {
    display: flex;
    align-items: center;
    padding: 4px 12px;
    background: var(--theme-palette-color-6);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.quick-check-filter-category-item:hover {
    background: var(--theme-palette-color-1);
}

.quick-check-filter-category-item input[type="checkbox"] {
    width: 30px;
    height: 30px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: var(--theme-palette-color-1);
}

.quick-check-filter-category-item label {
    cursor: pointer;
    flex: 1;
    font-size: 1em;
    color: var(--theme-palette-color-4);
}

.quick-check-filter-category-item:hover label {
    color: black;
}
