/* app/static/css/modals.css - Modal and overlay styles */

/* Base Modal Styles */
.modal-glass {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    padding: 0;
    border-radius: var(--radius-lg);
    z-index: 10002;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    width: 440px;

    background: linear-gradient(180deg, var(--surface-2), var(--surface));
    border: 1px solid var(--border-strong);
    box-shadow: 0 0 0 100vmax rgba(5, 10, 8, 0.6), 0 24px 60px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

.modal-glass.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

.modal-content {
    position: relative;
}

.modal-header {
    padding: 18px 56px 14px;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.modal-header h3 {
    color: #fff;
    margin: 0;
    font-size: 21px;
    font-weight: 600;
    text-align: center;
}

.modal-body {
    padding: 22px;
}

.close-modal {
    position: absolute;
    top: 14px;
    right: 14px;
    background: none;
    border: none;
    color: var(--muted);
    font-size: 17px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.close-modal:hover {
    background: rgba(233, 222, 196, 0.08);
    color: var(--text);
    transform: none;
}

/* Color Modal Specific Styles */
#color-modal {
    max-width: fit-content;
}

.color-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.color-btn {
    position: relative;
    background: var(--bg-2);
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.color-btn:hover {
    background: var(--surface-3);
    border-color: rgba(240, 196, 106, 0.6);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.color-btn:active {
    transform: translateY(-1px);
}

.color-icon {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Specific color backgrounds */
.color-btn[data-color="red"] .color-icon {
    background: linear-gradient(135deg, #ff4444, #cc0000);
    background-image: url('/static/images/red.png');
    background-size: auto 180%;
    background-position: center;
}

.color-btn[data-color="green"] .color-icon {
    background: linear-gradient(135deg, #44ff44, #00aa00);
    background-image: url('/static/images/green.png');
    background-size: auto 180%;
    background-position: center;
}

.color-btn[data-color="acorn"] .color-icon {
    background: linear-gradient(135deg, #8B4513, #654321);
    background-image: url('/static/images/acorn.png');
    background-size: auto 180%;
    background-position: center;
}

.color-btn[data-color="bell"] .color-icon {
    background: linear-gradient(135deg, #DAA520, #B8860B);
    background-image: url('/static/images/bell.png');
    background-size: auto 180%;
    background-position: center;
}

/* Wild/Any option with special styling */
.color-btn.wild-option {
    grid-column: 1 / -1;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
}

.color-btn.wild-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    padding: 2px;
    background: linear-gradient(45deg, #ff4444, #44ff44, #8B4513, #DAA520);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: rotateGradient 3s linear infinite;
}

.color-btn.wild-option .color-icon {
    background: url('/static/images/any.png') center / contain no-repeat;
    font-size: 0;
}

.color-label {
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
}

/* Bot Difficulty Modal */
.bot-difficulty-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.difficulty-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    background: var(--bg-2);
    color: var(--text);
    cursor: pointer;
    text-align: left;
    width: 100%;
}

.difficulty-btn:hover {
    background: var(--surface-3);
    border-color: rgba(240, 196, 106, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.difficulty-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.difficulty-easy .difficulty-icon {
    background: rgba(67, 183, 122, 0.16);
    color: var(--success);
}

.difficulty-normal .difficulty-icon {
    background: rgba(90, 162, 214, 0.16);
    color: var(--info);
}

.difficulty-hard .difficulty-icon {
    background: rgba(222, 90, 71, 0.16);
    color: var(--danger);
}

.difficulty-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.difficulty-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.difficulty-desc {
    font-size: 13px;
    color: var(--muted);
}

/* Remove Bot Modal */
.remove-bot-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.remove-bot-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(231, 76, 60, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #e74c3c;
}

.remove-bot-actions {
    display: flex;
    gap: 15px;
    width: 100%;
}

.btn-cancel, .btn-confirm {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-cancel {
    background: transparent;
    border: 1px solid var(--border-strong);
    color: var(--text-2);
}

.btn-cancel:hover {
    background: rgba(233, 222, 196, 0.06);
    color: var(--text);
}

.btn-confirm {
    background: var(--danger);
    border: 1px solid rgba(0, 0, 0, 0.2);
    color: white;
}

.btn-confirm:hover {
    background: #c74836;
}

/* Animations */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes rotateGradient {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .color-options {
        grid-template-columns: 1fr;
    }

    .color-btn.wild-option {
        grid-column: 1;
    }

    .difficulty-btn {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .difficulty-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .difficulty-name {
        font-size: 16px;
    }

    .difficulty-desc {
        font-size: 12px;
    }

    .remove-bot-actions {
        flex-direction: column;
    }

    .remove-bot-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
}

/* Add these styles to modals.css */

/* Kick Player Button */
.kick-player-btn {
    background: #e67e22;
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 12px;
    opacity: 0.8;
}

.kick-player-btn:hover {
    background: #d35400;
    opacity: 1;
    transform: scale(1.1);
}

/* Destroy Game Button */
.destroy-game-btn {
    background: #c0392b;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    margin-left: 12px;
    opacity: 0.9;
}

.destroy-game-btn:hover {
    background: #a93226;
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(192, 57, 43, 0.3);
}

/* Kick Player Modal */
.kick-player-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.kick-player-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(230, 126, 34, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #e67e22;
}

.kick-warning {
    color: #f39c12;
    font-size: 14px;
    font-style: italic;
}

.kick-player-actions {
    display: flex;
    gap: 15px;
    width: 100%;
}

/* Destroy Game Modal */
.destroy-game-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.destroy-game-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(192, 57, 43, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: #c0392b;
    animation: pulse-warning 2s infinite;
}

.destroy-game-content h4 {
    color: #fff;
    margin: 0;
    font-size: 20px;
}

.destroy-warning {
    background: rgba(227, 163, 59, 0.08);
    border: 1px solid rgba(227, 163, 59, 0.3);
    border-radius: 10px;
    padding: 16px 18px;
    color: var(--warning);
    text-align: left;
    width: 100%;
}

.destroy-warning p {
    margin: 0 0 15px 0;
    font-weight: bold;
}

.destroy-warning ul {
    margin: 0;
    padding-left: 20px;
}

.destroy-warning li {
    margin-bottom: 8px;
    color: var(--text-2);
}

.destroy-game-actions {
    display: flex;
    gap: 15px;
    width: 100%;
}

.btn-destroy {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    background: #c0392b;
    color: white;
}

.btn-destroy:hover {
    background: #a93226;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(192, 57, 43, 0.4);
}

/* Warning pulse animation */
@keyframes pulse-warning {
    0% {
        box-shadow: 0 0 0 0 rgba(192, 57, 43, 0.4);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(192, 57, 43, 0.1);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(192, 57, 43, 0);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .destroy-game-btn {
        padding: 6px 12px;
        font-size: 11px;
        margin-left: 8px;
    }

    .kick-player-btn {
        width: 26px;
        height: 26px;
        font-size: 11px;
    }

    .kick-player-actions,
    .destroy-game-actions {
        flex-direction: column;
    }

    .destroy-game-icon {
        width: 80px;
        height: 80px;
        font-size: 32px;
    }

    .destroy-game-content h4 {
        font-size: 18px;
    }

    .destroy-warning {
        padding: 15px;
    }
}

/* ========== Help / Rules Modal ========== */

/* Backdrop overlay */
.help-modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(5, 10, 8, 0.7);
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.help-modal-backdrop.show {
    opacity: 1;
}

/* Help modal sizing */
.help-modal {
    max-width: 520px;
    width: 90%;
    max-height: 85vh;
    display: none;
}

.help-modal .modal-content {
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}

.help-modal .modal-header {
    flex-shrink: 0;
}

.help-modal .modal-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.help-modal-body {
    overflow-y: auto;
    max-height: calc(85vh - 70px);
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.help-modal-body::-webkit-scrollbar {
    width: 6px;
}

.help-modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.help-modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.help-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* Help sections */
.help-section {
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.help-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.help-section h4 {
    color: var(--brass-2);
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.help-section h4 i {
    font-size: 14px;
    opacity: 0.8;
}

.help-section p {
    color: var(--text-2);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

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

.help-section ul li {
    color: var(--text-2);
    font-size: 14px;
    line-height: 1.6;
    padding: 4px 0 4px 20px;
    position: relative;
}

.help-section ul li::before {
    content: '\f054';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 10px;
    color: var(--brass);
    position: absolute;
    left: 0;
    top: 7px;
}

/* Suits grid */
.help-suits-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
}

.help-suit {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-2);
    font-size: 14px;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 10px;
    border-radius: 6px;
}

.help-suit-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    transform: scale(2);
}

.help-values {
    font-size: 13px !important;
    color: #95a5a6 !important;
    font-style: italic;
}

/* Special cards list */
.help-special-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.help-special-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(0, 0, 0, 0.2);
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid rgba(216, 167, 72, 0.5);
}

.help-card-badge {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 16px;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.badge-seven {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.badge-ace {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.badge-upper {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
}

.badge-green-lower {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    font-size: 13px;
}

.help-card-desc {
    color: var(--text-2);
    font-size: 13px;
    line-height: 1.55;
}

.help-card-desc strong {
    color: #fff;
}

/* Responsive help modal */
@media (max-width: 768px) {
    .help-modal {
        max-width: 95%;
        max-height: 90vh;
    }

    .help-modal-body {
        max-height: calc(90vh - 70px);
    }

    .help-suits-grid {
        grid-template-columns: 1fr;
    }

    .help-special-card {
        padding: 10px;
    }

    .help-card-badge {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }

}

/* Additional player item spacing for new buttons */
.player-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .player-actions {
        gap: 6px;
    }
}

/* Help modal has its own backdrop element */
.help-modal {
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

/* JS opens modals with display:flex — keep content full-width */
.modal-glass {
    flex-direction: column;
}

.modal-glass .modal-content {
    width: 100%;
}

/* Destroy button is injected into the game title h1 */
.destroy-game-btn {
    font-family: var(--font-ui);
    white-space: nowrap;
    letter-spacing: 0;
    background: rgba(222, 90, 71, 0.12);
    border: 1px solid rgba(222, 90, 71, 0.4);
    color: #ff9d8e;
    padding: 6px 12px;
    border-radius: 999px;
    margin-left: 4px;
}

.destroy-game-btn:hover {
    background: var(--danger);
    color: #fff;
}

/* Wild option: calm brass frame instead of the animated rainbow */
.color-btn.wild-option {
    border: 1px solid rgba(216, 167, 72, 0.55);
    background: var(--bg-2);
}

.color-btn.wild-option::before {
    display: none;
}

.color-btn.wild-option .color-icon {
    width: 72px;
    height: 72px;
    animation: none;
}

/* Colour picker: always a 2×2 grid + full-width wild option */
#color-modal {
    width: min(380px, 92vw);
    max-width: none;
}

#color-modal .color-options {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 0;
}

#color-modal .color-btn.wild-option {
    grid-column: 1 / -1;
}

#color-modal .color-icon {
    width: 76px;
    height: 76px;
}

/* ---------- Share / invite modal ---------- */
#share-modal {
    width: min(460px, 94vw);
    max-width: none;
}

.share-intro {
    color: var(--text-2);
    font-size: 14px;
    margin-bottom: 14px;
    text-align: center;
}

.share-link-row {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.share-link-row input {
    flex: 1;
    min-width: 0;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    background: var(--bg-2);
    color: var(--text);
    font: inherit;
    font-size: 14px;
}

.share-copy {
    background: linear-gradient(180deg, var(--brass-2), var(--brass));
    color: var(--brass-ink);
    border: 1px solid rgba(0, 0, 0, 0.25);
    padding: 10px 14px;
    font-size: 14px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.share-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 10px;
}

.share-target {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 6px 12px;
    border-radius: 12px;
    background: var(--bg-2);
    border: 1px solid var(--border-strong);
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
}

.share-target[hidden] {
    display: none;
}

.share-target i {
    font-size: 26px;
}

.share-target:hover {
    background: var(--surface-3);
    transform: translateY(-2px);
}

.share-target.whatsapp i  { color: #25d366; }
.share-target.messenger i { color: #0a7cff; }
.share-target.facebook i  { color: #1877f2; }
.share-target.telegram i  { color: #29a9eb; }
.share-target.sms i       { color: var(--success); }
.share-target.native i    { color: var(--brass-2); }
.share-target.instagram i {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.share-hint {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: rgba(67, 183, 122, 0.12);
    border: 1px solid rgba(67, 183, 122, 0.35);
    color: var(--text);
    font-size: 13px;
    text-align: center;
}

.share-hint[hidden] {
    display: none;
}

/* ---------- Join request (host) ---------- */
#join-request-modal {
    width: min(460px, 94vw);
    max-width: none;
}

.join-request-body .jr-name {
    font-size: 17px;
    text-align: center;
}

.join-request-body .jr-name i {
    color: var(--brass-2);
    margin-right: 4px;
}

.jr-note {
    text-align: center;
    color: var(--text-2);
    font-size: 14px;
    margin: 6px 0 16px;
}

.jr-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.jr-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px;
    text-align: left;
    border-radius: 12px;
    background: var(--bg-2);
    border: 1px solid var(--border-strong);
}

.jr-btn i {
    width: 22px;
    text-align: center;
    color: var(--brass-2);
    font-size: 18px;
}

.jr-btn span {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.jr-btn small {
    color: var(--muted);
    font-weight: 500;
}

.jr-btn.primary {
    border-color: rgba(240, 196, 106, 0.6);
    background: rgba(216, 167, 72, 0.1);
}

.jr-btn.decline i {
    color: #ff9d8e;
}

.jr-more {
    margin-top: 12px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

/* ---------- Colour picker as a compact strip above the table ----------
   No dimming and no covering the hand: the player sees their cards while choosing */
#color-modal.color-strip {
    top: 12px;
    transform: translate(-50%, 0);
    width: min(560px, 96vw);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

#color-modal.color-strip.show {
    transform: translate(-50%, 0);
}

#color-modal.color-strip .modal-header {
    padding: 10px 44px 8px;
}

#color-modal.color-strip .modal-header h3 {
    font-size: 17px;
}

#color-modal.color-strip .close-modal {
    top: 6px;
    right: 8px;
}

#color-modal.color-strip .modal-body {
    padding: 10px 12px 12px;
}

#color-modal.color-strip .color-options {
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

#color-modal.color-strip .color-btn.wild-option {
    grid-column: auto;
}

#color-modal.color-strip .color-btn {
    padding: 8px 4px;
    gap: 4px;
}

#color-modal.color-strip .color-icon,
#color-modal.color-strip .color-btn.wild-option .color-icon {
    width: 50px;
    height: 50px;
}

#color-modal.color-strip .color-label {
    font-size: 12px;
    text-align: center;
    line-height: 1.2;
}

.color-count {
    font-size: 11px;
    font-weight: 700;
    color: var(--success);
    white-space: nowrap;
}

.color-count.none {
    color: var(--muted);
    font-weight: 500;
}

.color-count:empty {
    display: none;
}

@media (max-width: 480px) {
    #color-modal.color-strip .color-icon,
    #color-modal.color-strip .color-btn.wild-option .color-icon {
        width: 40px;
        height: 40px;
    }

    #color-modal.color-strip .color-label {
        font-size: 11px;
    }
}

/* ---------- Share a match win ---------- */
#win-share-modal {
    width: min(460px, 94vw);
    max-width: none;
}

.win-card {
    display: block;
    width: min(100%, 300px);
    height: auto;
    margin: 0 auto 16px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* ---------- Drops (unlocked card backs / emoji) ---------- */
#drop-modal {
    width: min(420px, 94vw);
    max-width: none;
}

.drop-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-bottom: 18px;
}

.drop-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    padding: 16px 12px 12px;
    border-radius: 14px;
    background: var(--bg-2);
    border: 1px solid rgba(240, 196, 106, 0.45);
    box-shadow: 0 0 24px rgba(240, 196, 106, 0.15);
    animation: chipPop 0.5s var(--ease);
}

.drop-item .pc {
    --w: 60px;
}

.drop-item span:last-child {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--muted);
    font-size: 12px;
}

.drop-item strong {
    color: var(--text);
    font-size: 15px;
}

.drop-cta {
    display: flex;
    width: fit-content;
    margin: 0 auto;
    text-decoration: none;
}

.drop-medal {
    font-size: 56px;
    line-height: 72px;
}
