/**
 * Frontend Styles for Card Memory Game Plugin
 */

/* Container */
.cmg-game-container {
    max-width: 800px;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    display: block;
    z-index: 100;
}

/* Partner header + competition title */
.cmg-header-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
}

.cmg-partner-header {
    margin-bottom: 20px;
}

.cmg-partner-name {
    font-size: 1.8rem;
    font-weight: 600;
    margin-top: 6px;
    margin-bottom: 12px;
}

.cmg-partner-logo img {
    max-height: 90px;
    height: auto;
    width: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.cmg-competition-title {
    margin: 0 0 20px 0;
    font-size: 1.8rem;
}

@media (max-width: 768px) {
    .cmg-header-block {
        align-items: center;
        text-align: center;
    }
    .cmg-partner-name,
    .cmg-competition-title {
        width: 100%;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }
    .cmg-partner-logo img {
        margin-left: auto;
        margin-right: auto;
    }
}

/* Background overlay - positioned last in DOM, behind all content */
.cmg-background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0 !important;
    pointer-events: none;
}

/* Ensure all content is above the background overlay */
.cmg-game-container > *:not(.cmg-background-overlay) {
    position: relative;
    z-index: 1;
}

/* Grey-out only countdown and game board until entry is valid (entry form stays interactive) */
.cmg-terms-locked .cmg-countdown,
.cmg-terms-locked .cmg-game-board {
    opacity: 0.45;
    filter: grayscale(0.5);
    pointer-events: none;
}

/* Prize elements must be above overlay */
.cmg-prize-block {
    position: relative !important;
    z-index: 10 !important;
    opacity: 1 !important;
}

.cmg-prize-image,
.cmg-prize-image img {
    position: relative !important;
    z-index: 10 !important;
    opacity: 1 !important;
}

/* Email entry section must be above overlay */
.cmg-email-entry,
.cmg-email-entry h2,
.cmg-input-group,
.cmg-email-input,
.cmg-first-name-input,
.cmg-hometown-input,
.cmg-input-note,
.cmg-required-note,
.cmg-button-group,
.cmg-start-btn {
    position: relative !important;
    z-index: 10 !important;
    opacity: 1 !important;
}

/* Countdown, game board, and results must be above overlay */
.cmg-countdown,
.cmg-countdown-number,
.cmg-countdown p,
.cmg-game-board,
.cmg-cards-grid,
.cmg-card,
.cmg-game-header,
.cmg-success-message,
.cmg-fail-message,
.cmg-rank-message,
.cmg-performance-summary,
.cmg-replay-btn {
    position: relative !important;
    z-index: 10 !important;
    opacity: 1 !important;
}

/* Results panel - position controlled by JavaScript, don't force relative */
.cmg-game-result {
    z-index: 10 !important;
    opacity: 1 !important;
}

/* Prize Block — same column width as .cmg-entry-form / terms (500px). */
.cmg-prize-block {
    text-align: center;
    margin: 0 auto 30px;
    padding: 20px;
    width: 100%;
    max-width: 500px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/*
 * Countdown / play / results: JS sets .cmg-hide-prize-during-session on #cmg-game-container and .flashvue-engine.
 * Descendant selector beats styling on .cmg-prize-block alone (incl. opacity: 1 !important; display: flex).
 */
#cmg-game-container.cmg-hide-prize-during-session .cmg-prize-block,
.flashvue-engine.cmg-hide-prize-during-session .flashvue-engine__campaign-prize {
    display: none !important;
}

.cmg-prize-image {
    margin-bottom: 15px;
    text-align: center;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.85) !important;
    padding: 12px 14px !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    position: relative !important;
    z-index: 10 !important;
    opacity: 1 !important;
}

.cmg-prize-image img {
    max-width: 300px;
    width: auto;
    height: auto;
    border: 2px solid #ddd !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
    display: block;
}

.cmg-prize-description {
    text-align: center;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    background-color: rgba(255, 255, 255, 0.85) !important;
    padding: 15px 20px !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    position: relative !important;
    z-index: 10 !important;
    opacity: 1 !important;
}

/* Mobile centering for prize block */
@media (max-width: 768px) {
    .cmg-prize-block {
        text-align: center;
        margin: 0 auto 20px;
        padding: 15px 10px;
    }
    
    .cmg-prize-image {
        width: 100%;
        text-align: center;
        display: block;
        background-color: rgba(255, 255, 255, 0.85) !important;
        border-radius: 6px !important;
        padding: 10px !important;
    }
    
    .cmg-prize-image img {
        margin: 0 auto;
        max-width: 100%;
        display: block;
        border: 2px solid #ddd !important;
        border-radius: 4px !important;
    }
    
    .cmg-prize-description {
        text-align: center;
        width: 100%;
        margin: 0 auto;
        padding: 12px 15px;
        background-color: rgba(255, 255, 255, 0.85);
        border-radius: 6px;
    }
}

/* How to play */
.cmg-how-to-play {
    margin: 10px auto 20px;
    max-width: 600px;
}

.cmg-how-to-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background-color: #0073aa;
    color: #fff;
    border: 1px solid #005f8c;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    box-sizing: border-box;
}

.cmg-how-to-toggle:hover {
    background-color: #005f8c;
}

.cmg-how-to-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.4);
}

.cmg-how-to-icon {
    font-size: 18px;
    margin-left: 8px;
}

.cmg-how-to-content {
    padding: 10px 14px 6px;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    font-size: 14px;
    line-height: 1.5;
    background-color: #fff;
}

/* Entry form: no pointer-events/z-index hacks; mobile-first tap targets */
.cmg-email-entry {
    text-align: center;
    padding: 24px 16px;
}

.cmg-entry-form {
    max-width: 500px;
    margin: 0 auto;
}

#cmg-entry-form .cmg-terms-block {
    text-align: left;
    margin-bottom: 4px;
    padding: 14px 16px;
    background: #e8e8e8 !important;
    border-radius: 6px;
}

.cmg-terms-block label,
.cmg-optin-below-terms label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 15px;
    line-height: 1.4;
    min-height: 44px;
    padding: 4px 0;
}

.cmg-checkbox-row input[type="checkbox"] {
    margin-top: 3px;
    width: 20px;
    height: 20px;
    min-width: 20px;
    flex-shrink: 0;
}

.cmg-optin-below-terms {
    margin: 8px 0 0 0;
}

#cmg-entry-form .cmg-required-asterisk {
    color: #b32d2e !important;
}

.cmg-field-label {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    text-align: left;
}

/* Validation error: hidden on load; JS sets display:block when showing message */
#cmg-email-error.cmg-email-error {
    display: none !important;
    color: #b32d2e;
    font-size: 14px;
    margin: 0 0 12px 0;
    padding: 8px 12px;
    background: #fcf0f1;
    border-radius: 4px;
    text-align: center;
}
#cmg-email-error.cmg-email-error.cmg-email-error-visible {
    display: block !important;
}

.cmg-entry-body h2 {
    margin-bottom: 20px;
    color: #333;
}

.cmg-input-group {
    display: block;
    max-width: 500px;
    margin: 0 auto 10px;
}

.cmg-button-group {
    display: block;
    max-width: 500px;
    margin: 0 auto 15px;
    text-align: center;
}

@media (min-width: 768px) {
    .cmg-input-group {
        display: block;
        max-width: 500px;
    }
    
    .cmg-button-group {
        display: block;
        max-width: 500px;
    }
}

.cmg-email-input,
.cmg-first-name-input,
.cmg-hometown-input {
    flex: 1;
    padding: 14px 16px;
    min-height: 48px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.2s;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}

.cmg-email-input::placeholder,
.cmg-first-name-input::placeholder,
.cmg-hometown-input::placeholder {
    text-align: center;
    font-size: 16px;
    color: #bbb;
    opacity: 1;
}

.cmg-email-input:focus,
.cmg-first-name-input:focus,
.cmg-hometown-input:focus {
    outline: none;
    border-color: #0073aa;
}

.cmg-input-note,
.cmg-required-note {
    text-align: left;
    color: #666;
    font-size: 14px;
    margin: 2px 0 12px 0;
    font-style: italic;
}

/* Start is a div so nothing can disable it; always clickable and pointer cursor */
#cmg-start-btn {
    cursor: pointer !important;
    pointer-events: auto !important;
    user-select: none;
}
#cmg-start-btn.cmg-btn-starting {
    pointer-events: none;
    cursor: wait !important;
}
.cmg-start-btn {
    padding: 14px 30px;
    min-height: 48px;
    font-size: 16px;
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.cmg-start-btn:not(.cmg-btn-disabled):before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.cmg-start-btn:not(.cmg-btn-disabled):active:before {
    width: 300px;
    height: 300px;
}

.cmg-start-btn:hover:not(.cmg-btn-disabled) {
    background-color: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.cmg-start-btn:active:not(.cmg-btn-disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Looks disabled but stays clickable so submit runs and we can show validation message */
.cmg-btn-disabled {
    background-color: #ccc !important;
    cursor: pointer !important;
    opacity: 0.6;
    box-shadow: none !important;
    transform: none !important;
}

/* Countdown */
.cmg-countdown {
    text-align: center;
    padding: 60px 20px;
}

.cmg-countdown-number {
    font-size: 120px;
    font-weight: bold;
    color: #0073aa;
    line-height: 1;
    margin-bottom: 20px;
    animation: pulse 1s infinite;
}

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

.cmg-countdown p {
    font-size: 24px;
    color: #666;
}

/* Game Board */
.cmg-game-board {
    margin-top: 20px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    width: 100%;
    max-width: 100%;
}

.cmg-game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f5f5f5;
    border-radius: 4px;
}

.cmg-timer,
.cmg-moves {
    font-size: 18px;
    font-weight: bold;
}

.cmg-timer-label,
.cmg-moves-label {
    color: #666;
    margin-right: 5px;
}

.cmg-timer-value {
    color: #0073aa;
}

.cmg-timer-value.cmg-timer-warning {
    color: #d63638;
    animation: timerWarning 1s infinite;
    font-size: 22px;
}

@keyframes timerWarning {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.7;
        transform: scale(1.1);
    }
}

.cmg-moves-value {
    color: #333;
}

/* Cards Grid — 6×4 desktop / 4×6 mobile; cells stay square via grid + card aspect-ratio 1 */
.cmg-cards-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 6px;
    margin-top: 8px;
    margin-left: auto;
    margin-right: auto;
    aspect-ratio: 6 / 4;
    /* Extra header/prize/entry above the board: leave more vertical budget so the grid is not over-squashed */
    max-height: min(82vh, calc(100vh - 220px));
    width: 100%;
    max-width: 100%;
    text-align: center;
}

/* Mobile phones: 4 wide x 6 deep — NO SCROLLING.
   Keep tablets (e.g. iPad 768px portrait) on 6x4 to avoid viewport overflow. */
@media (max-width: 640px) {
    .cmg-game-container {
        padding: 8px;
    }
    
    .cmg-cards-grid {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(6, 1fr);
        gap: 3px;
        aspect-ratio: 4 / 6;
        height: auto;
        max-height: none;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }
    
    /* Ensure game board doesn't cause scrolling */
    .cmg-game-board {
        overflow: visible;
        max-height: none;
    }
}

@media (max-width: 480px) {
    .cmg-cards-grid {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(6, 1fr);
        gap: 2px;
    }
}

.cmg-card {
    aspect-ratio: 1;
    width: 100%;
    min-height: 0;
    position: relative;
    cursor: pointer;
    perspective: 1000px;
    transform-style: preserve-3d;
}

.cmg-card:hover:not(.cmg-matched):not(.cmg-flipped) {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

.cmg-card:active:not(.cmg-matched):not(.cmg-flipped) {
    transform: scale(0.98);
}

.cmg-card-back,
.cmg-card-front {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.cmg-card-back {
    background-color: #0073aa;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotateY(0deg);
    color: white;
    font-size: 48px;
    font-weight: bold;
}

.cmg-card-back img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    display: block;
}

.cmg-card-front {
    --cmg-card-face-inset: 4%;
    background-color: #fff;
    background-origin: content-box;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
    padding: var(--cmg-card-face-inset);
    transform: rotateY(180deg);
}

.cmg-card.cmg-flipped .cmg-card-back {
    transform: rotateY(180deg);
}

.cmg-card.cmg-flipped .cmg-card-front {
    transform: rotateY(0deg);
}

.cmg-card.cmg-matched {
    cursor: default;
}

.cmg-card.cmg-matched {
    animation: matchedPulse 0.6s ease-in-out;
}

.cmg-card.cmg-matched .cmg-card-front {
    animation: matchedGlow 0.8s ease-in-out;
    box-shadow: 0 0 25px rgba(46, 204, 113, 0.9), 0 0 50px rgba(46, 204, 113, 0.5);
    border: 3px solid rgba(46, 204, 113, 0.8);
}

@keyframes matchedGlow {
    0% { 
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        border: 0px solid transparent;
    }
    50% { 
        box-shadow: 0 0 40px rgba(46, 204, 113, 1), 0 0 80px rgba(46, 204, 113, 0.7);
        border: 4px solid rgba(46, 204, 113, 1);
    }
    100% { 
        box-shadow: 0 0 25px rgba(46, 204, 113, 0.9), 0 0 50px rgba(46, 204, 113, 0.5);
        border: 3px solid rgba(46, 204, 113, 0.8);
    }
}

@keyframes matchedPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Mismatch shake */
.cmg-card.cmg-mismatch {
    animation: cmgMismatchShake 0.3s ease-in-out;
}

@keyframes cmgMismatchShake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    50% { transform: translateX(4px); }
    75% { transform: translateX(-2px); }
    100% { transform: translateX(0); }
}

/* Game Result */
.cmg-game-result {
    text-align: center;
    padding: 40px 20px;
}

/* Results panel when shown - fixed at top of viewport */
.cmg-game-result.cmg-results-visible {
    position: fixed !important;
    top: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 90% !important;
    max-width: 800px !important;
    z-index: 99999 !important;
    background: #fff !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
    border-radius: 8px !important;
    padding: 20px !important;
    margin: 0 !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    display: block !important;
    opacity: 1 !important;
}

/* Results panel when positioned in viewport (supports inline styles from JS) */
.cmg-game-result[style*="position: fixed"] {
    position: fixed !important;
    top: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 99999 !important;
    background: #fff !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
    border-radius: 8px !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
}


.cmg-success-message,
.cmg-fail-message {
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.cmg-success-message {
    background-color: #d4edda;
    border: 2px solid #28a745;
    color: #155724;
}

.cmg-fail-message {
    background-color: #f8d7da;
    border: 2px solid #dc3545;
    color: #721c24;
}

.cmg-success-message h2,
.cmg-fail-message h2 {
    margin-bottom: 15px;
    font-size: 32px;
}

.cmg-rank-message {
    margin: 20px 0;
    padding: 15px;
    background-color: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 4px;
}

.cmg-rank-text {
    font-size: 20px;
    font-weight: bold;
    color: #856404;
    margin: 0;
}

.cmg-try-again {
    display: none !important;
}

.cmg-performance-summary {
    margin-top: 15px;
    text-align: center;
    font-size: 15px;
}

.cmg-performance-summary p {
    margin: 4px 0;
}

.cmg-badge-message {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #856404;
    font-weight: 700;
    font-size: 16px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
    border: 2px solid #ffc107;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cmg-replay-btn {
    margin-top: 20px;
    padding: 10px 24px;
    background-color: #2e9fa4;
    color: #fff;
    border: 2px solid #2e9fa4;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

.cmg-replay-btn:hover,
.cmg-replay-btn:focus {
    background-color: #fff;
    border-color: #2e9fa4;
    color: #2e9fa4;
    transform: translateY(-1px);
    outline: none;
}

.cmg-replay-btn:active {
    transform: translateY(0);
}

/* Confetti Canvas */
.cmg-confetti-canvas {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    pointer-events: none;
    z-index: 99999 !important;
    opacity: 0;
    animation: confettiFadeIn 0.5s ease-in forwards;
}

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

/* Leaderboard (Admin) */
.cmg-leaderboard {
    margin: 20px 0;
}

.cmg-leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.cmg-leaderboard-table th,
.cmg-leaderboard-table td {
    padding: 18px 30px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    white-space: nowrap;
}

.cmg-leaderboard-table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

.cmg-leaderboard-table tr:hover {
    background-color: #f9f9f9;
}

/* Share Buttons */
.cmg-share-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.cmg-share-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.cmg-share-btn {
    padding: 10px 20px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Icon-only buttons (without text) */
.cmg-share-btn:not(.cmg-share-copy) {
    padding: 10px;
    min-width: 40px;
    justify-content: center;
}

/* Copy Link button - text only, no icon spacing */
.cmg-share-copy {
    gap: 0;
    justify-content: center;
}

.cmg-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.cmg-share-facebook:hover {
    border-color: #1877f2;
    color: #1877f2;
}

.cmg-share-twitter:hover {
    border-color: #000000;
    color: #000000;
}

.cmg-share-instagram:hover {
    border-color: #E4405F;
    color: #E4405F;
}

.cmg-share-whatsapp:hover {
    border-color: #25d366;
    color: #25d366;
}

.cmg-share-email:hover {
    border-color: #0073aa;
    color: #0073aa;
}

.cmg-share-btn.cmg-share-copy {
    border-color: #0073aa !important;
    background: #0073aa !important;
    color: #fff !important;
}

.cmg-share-btn.cmg-share-copy:hover {
    border-color: #0073aa !important;
    background: #fff !important;
    color: #0073aa !important;
}

/* Extra specificity to override theme button styles */
#cmg-game-container .cmg-share-buttons .cmg-share-btn.cmg-share-copy {
    border-color: #0073aa !important;
    background: #0073aa !important;
    color: #fff !important;
}

#cmg-game-container .cmg-share-buttons .cmg-share-btn.cmg-share-copy:hover,
#cmg-game-container .cmg-share-buttons .cmg-share-btn.cmg-share-copy:focus,
#cmg-game-container .cmg-share-buttons .cmg-share-btn.cmg-share-copy:active {
    border-color: #0073aa !important;
    background: #fff !important;
    color: #0073aa !important;
}

.cmg-share-icon {
    font-size: 18px;
    display: inline-block;
    width: 20px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
}

/* Social Media Icons - Using Simple Icons CDN */
.cmg-icon-facebook {
    background-image: url("https://cdn.simpleicons.org/facebook/1877f2");
}

.cmg-icon-twitter {
    background-image: url("https://cdn.simpleicons.org/x/000000");
}

.cmg-icon-instagram {
    background-image: url("https://cdn.simpleicons.org/instagram/E4405F");
}

.cmg-icon-whatsapp {
    background-image: url("https://cdn.simpleicons.org/whatsapp/25D366");
}

.cmg-icon-email {
    background-image: url("https://cdn.simpleicons.org/gmail/EA4335");
}

.cmg-icon-link {
    background-image: url("https://cdn.simpleicons.org/link/000000");
}

/* Share Modal */
.cmg-share-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 999999;
    align-items: center;
    justify-content: center;
}

.cmg-share-modal.show {
    display: flex;
}

.cmg-share-modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.cmg-share-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    line-height: 1;
}

.cmg-share-modal-close:hover {
    color: #000;
}

.cmg-share-modal-body {
    margin-top: 20px;
}

.cmg-share-modal-body textarea {
    width: 100%;
    min-height: 100px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    margin-bottom: 15px;
}

.cmg-share-modal-body input[type="text"],
.cmg-share-modal-body input[type="email"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    margin-bottom: 15px;
}

.cmg-share-modal-body .button {
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.cmg-share-modal-body .button:hover {
    background: #005a87;
}

