body {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
}


@font-face {
    font-family: 'CardNameFont';
    src: url('/static/font/cardname.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'CardTextFont';
    src: url('/static/font/cardtext.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'TypelineFont';
    src: url('/static/font/typeline.ttf') format('truetype');
    font-display: swap;
}

.card-name {
    font-family: 'CardNameFont', Arial, sans-serif;
    margin-top: 0px;
    margin-bottom: 0px;
    white-space: nowrap;
    overflow: hidden;
    display: block;
    width: 100%;
    max-width: 300px;
    font-size: 24px;
}

.card-type {
    font-family: 'CardNameFont', Arial, sans-serif;
    margin-top: 0px;
    margin-bottom: 0px;
    font-size: 20px;
}

.card-text {
    font-family: 'CardTextFont', Arial, sans-serif;
    font-size: 14px;
    margin-top: 4px;
    margin-bottom: 4px;
}

.card-text-section {
    font-family: 'TypelineFont', Arial, sans-serif;
    font-size: 16px;
    margin-top: 12px;
    margin-bottom: 4px;
}

.typeline {
    font-family: 'TypelineFont', Arial, sans-serif;
    font-size: 16px;
}

.container {
    max-width: 1200px;
    width: 100%;
}

.deck-info {
    text-align: left;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0f23 100%);
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
    color: white;
    height: 200px;
    overflow: visible;
    position: relative;
    margin-bottom: 8px;
    border-bottom: 2px solid rgba(74, 144, 226, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.deck-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1) 0%, rgba(138, 43, 226, 0.05) 100%);
    pointer-events: none;
    z-index: 1;
}

.deck-info-content {
    max-width: 1200px;
    height: 180px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    line-height: 1.2;
    z-index: 2;
    backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 8px 16px;
    box-sizing: border-box;
    overflow: visible;
}

.deck-info-content h2 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 700;
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: -0.02em;
}

.deck-info-content h2 span {
    font-weight: 400;
    font-size: 0.6em;
    opacity: 0.9;
    display: block;
    margin-top: 4px;
}

.deck-info-content p {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 500;
    margin: 4px 0;
    font-size: 0.95rem;
    opacity: 0.95;
}

.deck-info-image {
    max-width: 1200px;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 0;
    pointer-events: none;
    overflow: visible;
}

.deck-info-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.deck-content {
    display: flex;
    gap: 10px;
    overflow: visible;
}

.card-info-column {
    width: 325px;
    flex-shrink: 0;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 10px;
    border-radius: 8px;
    overflow-y: auto;
    position: sticky;
    top: 72px;
    align-self: flex-start;
    z-index: 10;
    line-height: 1.2;
}

.card-info-column h4 {
    margin-top: 0.5em;
    margin-bottom: 0.2em;
    font-size: 1em;
    font-weight: bold;
}

.card-type-icon {
    margin-left: 4px;
    margin-right: 4px;
}

.card-info-column strong {
    font-weight: bold;
}

.card-info-column .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

.icon-container {
    display: flex;
    align-items: center;
    gap: 1px;
    margin-bottom: 5px;
}

.icon-container.right {
    justify-content: flex-end;
}

.icon-container img {
    width: 18px;
    max-height: 18px;
    display: inline-block;
}

.card-info-column .link-arrows-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 4px;
}

.card-info-column .link-arrows-row {
    display: flex;
    justify-content: flex-start;
}

.card-info-column .link-arrows-row div {
    font-size: 16px;
    line-height: 1;
    text-align: center;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#grid-view {
    flex-grow: 0;
    height: fit-content;
    min-height: 0;
    margin-bottom: 400px;
}

.deck-grid {
    display: grid;
    gap: 2px;
    margin-bottom: 4px;
    max-width: 1000px;
}


#main-deck {
    grid-template-columns: repeat(10, 1fr);
}

#extra-deck,
#side-deck {
    grid-template-columns: repeat(15, 1fr);
}

.deck-grid .card-container {
    position: relative;
    transition: transform 0.3s ease;
}

.deck-grid img {
    width: 100%;
    height: auto;
}

.card-container:hover {
    transform: scale(1.05);
}

.card-container .banlist-status {
    pointer-events: none;
    border-radius: 3px;
}

#text-view {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 20px;
    color: white;
    justify-items: center;
    flex-grow: 1;
}

.text-view-section {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
}

.text-view-section h3 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #666;
}

.text-view-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.text-view-section li {
    padding: 3px 0;
}

.text-card-item {
    display: flex;
    align-items: center;
    position: relative;
    gap: 8px;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 4px;
    padding: 2px 8px;
    min-height: 32px;
    margin-bottom: 2px;
    width: 100%;
    box-sizing: border-box;
    word-break: break-word;
    cursor: pointer;
    overflow: hidden;
}

.text-card-item:hover {
    background: #0080cc;
}

.text-card-label {
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
    flex: 1 1 0;
    min-width: 0;
    font-size: 22px;
    line-height: 1.2;
    font-family: 'CardNameFont', Arial, sans-serif;
}

.text-card-thumb {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 3px;
    flex-shrink: 0;
    background: #222;
    user-select: none;
    pointer-events: none;
}

.banlist-status {
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0;
    margin-left: 8px;
    max-width: 16px;
    max-height: 16px;
    object-fit: contain;
    margin-right: 0;
    margin-left: auto;
}

.banlist-status-extra-side {
    width: 12px !important;
    height: 12px !important;
    flex-shrink: 0;
    margin-left: 8px;
    max-width: 16px;
    max-height: 16px;
    object-fit: contain;
    margin-right: 0;
    margin-left: auto;
}

button:hover {
    background-color: #005f99;
}

.export-button {
    padding: 8px 8px;
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.2);
    margin-top: 10px;
    font-family: 'Arial', sans-serif;
    text-decoration: none;
}

.export-button:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.3);
}

.export-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(108, 117, 125, 0.2);
}

.edit-deck-button,
.clone-deck-button,
.hand-sim-btn {
    padding: 8px 10px;
    background: linear-gradient(135deg, #28a745 0%, #20923a 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2);
    margin-top: 10px;
}

.edit-deck-button:hover,
.clone-deck-button:hover,
.hand-sim-btn:hover {
    background: linear-gradient(135deg, #20923a 0%, #1e7e34 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
}

.delete-button {
    padding: 8px 10px;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.2);
    margin-top: 10px;
}

.delete-button:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.3);
}

.popup-buttons .delete-button,
.popup-buttons .cancel-button {
    color: white;
    width: 40%;
    padding: 10px;
    border: none;
    margin-top: 0px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-family: Arial, sans-serif;
    margin-left: 10px;
    transition: background 0.2s;
    box-sizing: border-box;
    line-height: 1.2;
    height: 42px;
}

.popup-buttons .delete-button {
    background: #f44336;
}

.popup-buttons .delete-button:hover {
    background: #d32f2f;
}

.popup-buttons .cancel-button {
    background: #666;
}

.popup-buttons .cancel-button:hover {
    background: #555;
}

.modal-message b {
    font-weight: bold;
    color: #ffb300;
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-popup {
    background: #444;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    padding: 32px 32px 24px 32px;
    color: #fff;
    min-width: 320px;
    max-width: 90vw;
    text-align: center;
}

.deck-info-content a {
    color: white;
    text-decoration: underline;
}

.deck-info-content a:visited {
    color: white;
}

.deck-info-content a:hover {
    color: #ddd;
}

.view-switcher {
    background: linear-gradient(135deg, #495057 0%, #343a40 100%);
    color: white;
    height: 41px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    margin-left: auto;

    line-height: 25px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;

    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="white" class="bi bi-chevron-down" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"/></svg>');
    background-repeat: no-repeat;
    background-size: 12px;
    padding: 8px 30px 8px 16px;
    background-position: right 10px center;
}

.view-switcher option {
    background: #2a2a3e;
    color: white;
}

.view-switcher:focus,
.view-switcher:active {
    border-color: #4a90e2;
    box-shadow: 0 0 10px rgba(74, 144, 226, 0.2);
    background:
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="white" class="bi bi-chevron-down" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"/></svg>') no-repeat right 10px center / 12px,
        #2a2a3e;
}

.view-switcher::-ms-expand {
    display: none;
}

.prices-row {
    margin-top: 8px;
}

.format-info,
.price-info,
.legal-from,
.cc-visible {
    display: inline-block;
    background: rgba(74, 144, 226, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(74, 144, 226, 0.3);
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    margin-right: 12px;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease-out;
}

.cc {
    display:none;
}

.selector{
    cursor: pointer;
}

.selector:hover {
    background: rgba(74, 144, 226, 0.4);
    box-shadow: 0 0 20px rgba(74, 144, 226, 0.3), inset 0 0 20px rgba(74, 144, 226, 0.2);
}

.deck-actions-bar {
    position: absolute;
    right: 24px;
    bottom: 16px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(15px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px 18px 14px 18px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 220px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: visible;
}

.deck-actions-inner {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.actions-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    gap: 20px;
    margin-bottom: 10px;
}

.button-row {
    display: flex;
    align-items: center;
    justify-content: space-between; 
    width: 100%;
}

.checkbox-row {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    width: auto;
    gap: 40px;
    flex: 0 0 auto;
}

.card-art {
    object-fit: cover;
    object-position: top;
}


.deck-options-menu-item {
    cursor: pointer;
    font-family: "Inter", sans-serif;
    font-weight: 500;
    border-radius: 12px;
    padding-right: 8px;
    padding-left: 8px;
    padding-bottom: 2px;
    padding-top: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.deck-options-menu-item:hover {
    transform: translateY(-2px);
    background-color: rgba(79, 70, 229, 0.1);
    box-shadow: 0 0 20px rgba(79, 70, 229, 0.3), inset 0 0 20px rgba(79, 70, 229, 0.2);
}

#deck-options-menu {
    position: relative;
    z-index: 21;
}

#deck-options-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 180px;
    background: #23233a;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    padding: 6px 0;
    display: none;
    z-index: 100;
    border: 1px solid rgba(74, 144, 226, 0.18);
    font-family: 'Inter', Arial, sans-serif;
}

#deck-options-dropdown-menu .dropdown-item {
    padding: 10px 18px;
    cursor: pointer;
    color: #fff;
    font-size: 1rem;
    border: none;
    background: none;
    text-align: left;
    transition: background 0.15s;
}

#deck-options-dropdown-menu .dropdown-item:hover {
    background: #0080cc;
    color: #fff;
}

.deck-actions-bar label {
    margin-left: 4px;
    font-size: 1em;
    font-weight: normal;
}

.banlist-status {
    width: 16px;
    height: 16px;
}

.card-art-container {
    margin-top: 16px;
    margin-bottom: 12px;
    margin-left: auto;
    margin-right: auto;
}

.link-marker {
    position: absolute;
    z-index: 3;
    text-decoration: none;
    border: none;
    outline: none;
}

.link-marker.top-left {
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    transform: translate(-35%, -35%);
    background-image: url('/static/icon/lm/top-left-off.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.link-marker.top-left.activated {
    background-image: url('/static/icon/lm/top-left-on.png');
}

.link-marker.top-center {
    top: 0;
    left: 50%;
    width: 50px;
    height: 20px;
    transform: translate(-50%, -80%);
    background-image: url('/static/icon/lm/top-center-off.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.link-marker.top-center.activated {
    background-image: url('/static/icon/lm/top-center-on.png');
}

.link-marker.top-right {
    top: 0;
    right: 0;
    width: 40px;
    height: 40px;
    transform: translate(35%, -35%);
    background-image: url('/static/icon/lm/top-right-off.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.link-marker.top-right.activated {
    background-image: url('/static/icon/lm/top-right-on.png');
}

.link-marker.center-left {
    top: 50%;
    left: 0;
    width: 20px;
    height: 50px;
    transform: translate(-80%, -50%);
    background-image: url('/static/icon/lm/center-left-off.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.link-marker.center-left.activated {
    background-image: url('/static/icon/lm/center-left-on.png');
}

.link-marker.center-right {
    top: 50%;
    right: 0;
    width: 20px;
    height: 50px;
    transform: translate(80%, -50%);
    background-image: url('/static/icon/lm/center-right-off.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.link-marker.center-right.activated {
    background-image: url('/static/icon/lm/center-right-on.png');
}

.link-marker.bottom-left {
    bottom: 0;
    left: 0;
    width: 40px;
    height: 40px;
    transform: translate(-35%, 35%);
    background-image: url('/static/icon/lm/bottom-left-off.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.link-marker.bottom-left.activated {
    background-image: url('/static/icon/lm/bottom-left-on.png');
}

.link-marker.bottom-center {
    bottom: 0;
    left: 50%;
    width: 50px;
    height: 20px;
    transform: translate(-50%, 80%);
    background-image: url('/static/icon/lm/bottom-center-off.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.link-marker.bottom-center.activated {
    background-image: url('/static/icon/lm/bottom-center-on.png');
}

.link-marker.bottom-right {
    bottom: 0;
    right: 0;
    width: 40px;
    height: 40px;
    transform: translate(35%, 35%);
    background-image: url('/static/icon/lm/bottom-right-off.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.link-marker.bottom-right.activated {
    background-image: url('/static/icon/lm/bottom-right-on.png');
}

@media (max-width: 626px) {

    .deck-info {
        height: 360px;
        position: relative;
    }

    .deck-content {
        flex-direction: column;
    }

    .card-info-column {
        display: none;
    }

    .actions-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    #text-view {
        grid-template-columns: 1fr;
    }

    .deck-info-content {
        min-width: 0px;
        width: 400px;
        height: 230px;
    }

    .deck-actions-bar {
        position: static;
        margin-top: 18px;
        margin-bottom: 0;
        right: auto;
        bottom: auto;
        min-width: 0;
        max-width: 400px;
        width: 400px;
        border-radius: 8px;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        box-sizing: border-box;
        transform: translateX(-16px);
        backdrop-filter: blur(20px);
    }

    .mobile-card-popup {
        display: flex;
    }

}

@media (min-width:626px) and (max-width: 819px) {

    .deck-info {
        height: 360px;
        position: relative;
    }

    .deck-content {
        flex-direction: column;
    }

    .card-info-column {
        display: none;
    }

    .actions-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    #text-view {
        grid-template-columns: 1fr;
    }

    .deck-info-content {
        min-width: 0px;
        width: 626px;
        height: 230px;
    }

    .deck-actions-bar {
        position: static;
        margin-top: 26px;
        margin-bottom: 0;
        right: auto;
        bottom: auto;
        min-width: 0;
        max-width: 626px;
        width: 626px;
        border-radius: 8px;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        box-sizing: border-box;
        transform: translateX(-16px);
    }
    .mobile-card-popup {
        display: flex;
    }

}

@media (min-width: 820px) and (max-width: 1150px) {

    #text-view {
        grid-template-columns: 1fr;
        flex-grow: 1;
    }

    .main-deck-column,
    .side-extra-deck-column {
        width: 100%;
    }

    .export-button,
    .clone-deck-button,
    .edit-deck-button,
    .delete-button {
        padding: 8px 10px;
    }

    .mobile-card-popup {
        display: none;
    }

}

@media (min-width: 1151px) {
    .deck-content {
        flex-direction: row;
    }

    .card-info-column {
        display: block;
    }

    #text-view {
        grid-template-columns: 1fr 1fr;
    }

    .add-copies-popup {
        display: none;
    }


    .mobile-card-popup {
        display: none;
    }
}

.like-button {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
    position: relative;
}

.like-button:hover {
    transform: translateY(-2px);
}

.like-icon {
    width: 28px;
    height: 28px;
    display: inline-block;
    position: relative;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Heart icon states using SVG as background */
.heart-outline {
    background-image: url("data:image/svg+xml,%3Csvg width='28' height='28' viewBox='0 0 28 28' fill='none' stroke='%23e63946' stroke-width='2.2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14 25s-8.5-6.7-11.3-10.1C-1.2 10.2 2.1 4.7 7.2 4.7c2.5 0 4.6 1.6 5.8 3.2C14.2 6.3 16.3 4.7 18.8 4.7c5.1 0 8.4 5.5 4.5 10.2C22.5 18.3 14 25 14 25z'/%3E%3C/svg%3E");
}

.heart-filled {
    background-image: url("data:image/svg+xml,%3Csvg width='28' height='28' viewBox='0 0 28 28' fill='%23e63946' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14 25s-8.5-6.7-11.3-10.1C-1.2 10.2 2.1 4.7 7.2 4.7c2.5 0 4.6 1.6 5.8 3.2C14.2 6.3 16.3 4.7 18.8 4.7c5.1 0 8.4 5.5 4.5 10.2C22.5 18.3 14 25 14 25z'/%3E%3C/svg%3E");
}

/* Hover animations */
.heart-outline:hover {
    transform: scale(1.15);
    background-image: url("data:image/svg+xml,%3Csvg width='28' height='28' viewBox='0 0 28 28' fill='none' stroke='%23e63946' stroke-width='2.5' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14 25s-8.5-6.7-11.3-10.1C-1.2 10.2 2.1 4.7 7.2 4.7c2.5 0 4.6 1.6 5.8 3.2C14.2 6.3 16.3 4.7 18.8 4.7c5.1 0 8.4 5.5 4.5 10.2C22.5 18.3 14 25 14 25z'/%3E%3C/svg%3E");
}

.heart-filled:hover {
    transform: scale(1.15);
    filter: brightness(1.1);
}

/* Processing state animation */
.heart-processing {
    animation: pulse 1.2s infinite;
    opacity: 0.7;
    pointer-events: none;
}

.deck-subtitle {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: fit-content;
}

.deck-subtitle a {
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    padding: 4px 8px;
    white-space: nowrap;
}

.author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-left: 6px;
    vertical-align: middle;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.deck-subtitle a:hover .author-avatar {
    box-shadow: 0 0 20px rgba(79, 70, 229, 0.3), inset 0 0 20px rgba(79, 70, 229, 0.2);
    transform: scale(1.25);
}

.deck-subtitle a:hover {
    transform: translateY(-2px) scale(1.05);
    background-color: rgba(79, 70, 229, 0.1);
    box-shadow: 0 0 20px rgba(79, 70, 229, 0.3), inset 0 0 20px rgba(79, 70, 229, 0.2);
}

.author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-left: 6px;
    vertical-align: middle;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }

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

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

/* Like count animation */
.like-count {
    display: inline-block;
    transition: transform 0.3s, color 0.3s;
}

.like-count-animate-unlike {
    animation: countPopUnlike 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.like-count-animate-like {
    animation: countPopLike 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275)
}

@keyframes countPopUnlike {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
        color: #e63946;
    }

    100% {
        transform: scale(1);
    }
}

@keyframes countPopLike {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
        color: #28a745;
    }

    100% {
        transform: scale(1);
    }
}

/* Heart animation when toggling state */
.heart-animate-like {
    animation: heartLike 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.heart-animate-unlike {
    animation: heartUnlike 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes heartLike {
    0% {
        transform: scale(1);
    }

    25% {
        transform: scale(0.6);
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes heartUnlike {
    0% {
        transform: scale(1);
    }

    25% {
        transform: scale(0.8);
    }

    100% {
        transform: scale(1);
    }
}

.mobile-card-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.mobile-card-action-popup,
.hand-sim-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    display:flex;
    box-sizing: border-box;
}

.add-copies-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.hand-sim-popup-content {
    background: linear-gradient(135deg, #1e1e3f 0%, #2a2a4a 100%);
    border-radius: 12px;
    padding: 20px;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    color: white;
    position: relative;
}

.mobile-card-popup-content{
    background: linear-gradient(135deg, #1e1e3f 0%, #2a2a4a 100%);
    border-radius: 12px;
    padding: 20px;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    color: white;
    position: relative;
}


.mobile-card-popup .close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #aaa;
    z-index: 1;
}

.mobile-card-popup .card-art-container {
    margin-top: 16px;
}

.mobile-card-popup .close:hover {
    color: white;
}

.mobile-card-popup .card-info-content {
    margin-bottom: 20px;
}

.mobile-card-popup .card-art-container {
    width: 200px;
    height: 200px;
    margin: 16px auto;
}

.mobile-popup-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-popup-action {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.mobile-popup-action:hover {
    background: rgba(255, 255, 255, 0.2);
}

.mobile-popup-action.primary {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
}

.mobile-popup-action.primary:hover {
    background: linear-gradient(135deg, #357abd 0%, #2968a3 100%);
}

.mobile-popup-action.danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.mobile-popup-action.danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
}

.card-info-content .card-header {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 5px;
    padding-top: 32px;
    border-bottom: 1px solid #eee;
}

.attribute-icons {
    display: flex;
    gap: 6px;
}

.card-attribute {
    width: 25px;
    height: 25px;
}