/* Game IFRAME Modal Styles */
.game-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.95) 0%, 
        rgba(20, 30, 48, 0.98) 25%,
        rgba(56, 178, 172, 0.15) 50%,
        rgba(147, 51, 234, 0.15) 75%,
        rgba(0, 0, 0, 0.95) 100%);
    backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 1;
    visibility: visible;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: modal-backdrop-glow 8s ease-in-out infinite;
}

@keyframes modal-backdrop-glow {
    0%, 100% { 
        background: linear-gradient(135deg, 
            rgba(0, 0, 0, 0.95) 0%, 
            rgba(20, 30, 48, 0.98) 25%,
            rgba(56, 178, 172, 0.1) 50%,
            rgba(147, 51, 234, 0.1) 75%,
            rgba(0, 0, 0, 0.95) 100%);
    }
    50% { 
        background: linear-gradient(135deg, 
            rgba(0, 0, 0, 0.95) 0%, 
            rgba(20, 30, 48, 0.98) 25%,
            rgba(56, 178, 172, 0.2) 50%,
            rgba(147, 51, 234, 0.2) 75%,
            rgba(0, 0, 0, 0.95) 100%);
    }
}

.game-modal.hidden {
    opacity: 0;
    visibility: hidden;
}

.game-dialog {
    background: linear-gradient(145deg, 
        rgba(56, 178, 172, 0.95) 0%, 
        rgba(147, 51, 234, 0.95) 30%,
        rgba(56, 178, 172, 0.95) 70%,
        rgba(147, 51, 234, 0.95) 100%);
    border-radius: 24px;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    transform: scale(0.9);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 40px 120px rgba(56, 178, 172, 0.4),
        0 0 0 2px rgba(255, 255, 255, 0.2),
        inset 0 2px 0 rgba(255, 255, 255, 0.3),
        0 0 60px rgba(56, 178, 172, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(20px);
}

.game-dialog::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 2px;
    background: linear-gradient(45deg, 
        rgba(56, 178, 172, 0.8), 
        rgba(147, 51, 234, 0.8), 
        rgba(56, 178, 172, 0.8), 
        rgba(147, 51, 234, 0.8));
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    animation: border-glow 3s ease-in-out infinite;
}

@keyframes border-glow {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.game-modal:not(.hidden) .game-dialog {
    transform: scale(1);
}

.game-dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, 
        rgba(56, 178, 172, 0.9) 0%, 
        rgba(147, 51, 234, 0.9) 100%);
    position: relative;
    backdrop-filter: blur(10px);
}

.game-dialog-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        rgba(56, 178, 172, 1), 
        rgba(147, 51, 234, 1), 
        rgba(56, 178, 172, 1), 
        rgba(147, 51, 234, 1));
    background-size: 200% 100%;
    animation: shimmer 2s ease-in-out infinite;
}

.game-dialog-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.5), 
        transparent);
}

.game-dialog-title {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 50%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.game-dialog-title::before {
    content: '🎮';
    font-size: 1.75rem;
    background: none;
    -webkit-text-fill-color: initial;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    animation: icon-float 3s ease-in-out infinite;
}

@keyframes icon-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.game-dialog-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.game-countdown {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9), rgba(20, 30, 48, 0.9));
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 700;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    animation: countdown-glow 2s ease-in-out infinite;
}

@keyframes countdown-glow {
    0%, 100% { 
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        border-color: rgba(255, 255, 255, 0.2);
    }
    50% { 
        box-shadow: 0 6px 20px rgba(56, 178, 172, 0.4);
        border-color: rgba(56, 178, 172, 0.5);
    }
}

.game-countdown.hidden {
    display: none;
}

.game-dialog-close {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 2px solid rgba(255, 255, 255, 0.2);
    font-size: 1.25rem;
    cursor: pointer;
    color: #ffffff;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-dialog-close:hover {
    background: linear-gradient(135deg, rgba(255, 87, 87, 0.9), rgba(255, 154, 0, 0.9));
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 20px rgba(255, 87, 87, 0.4);
}

.game-dialog-content {
    position: relative;
    height: calc(90vh - 120px);
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.05), rgba(255, 255, 255, 0.02));
    border-radius: 0 0 20px 20px;
    overflow: hidden;
}

.game-dialog-content::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, 
        rgba(56, 178, 172, 0.03) 0%,
        transparent 25%,
        transparent 75%,
        rgba(147, 51, 234, 0.03) 100%);
    pointer-events: none;
    z-index: 1;
}

.game-iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0 0 20px 20px;
    position: relative;
    z-index: 2;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.1);
}

.game-countdown {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 10;
}

.game-countdown.hidden {
    display: none;
}

.game-dialog-footer {
    padding: 1.5rem 2rem;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, 
        rgba(56, 178, 172, 0.9) 0%, 
        rgba(147, 51, 234, 0.9) 100%);
    text-align: center;
    backdrop-filter: blur(10px);
    position: relative;
}

.game-dialog-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.5), 
        transparent);
}

.game-register-btn {
    background: linear-gradient(135deg, 
        rgba(255, 193, 7, 0.95) 0%, 
        rgba(255, 154, 0, 0.95) 50%, 
        rgba(255, 193, 7, 0.95) 100%);
    color: rgba(139, 69, 19, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 6px 25px rgba(255, 193, 7, 0.4);
    backdrop-filter: blur(5px);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.game-register-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
}

.game-register-btn:hover::before {
    left: 100%;
}

.game-register-btn:hover {
    background: linear-gradient(135deg, 
        rgba(255, 193, 7, 1) 0%, 
        rgba(255, 154, 0, 1) 50%, 
        rgba(255, 193, 7, 1) 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 35px rgba(255, 193, 7, 0.6);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Ad Modal Styles - Enhanced UI/UX */
.ad-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.95) 0%, 
        rgba(20, 30, 48, 0.98) 25%,
        rgba(255, 193, 7, 0.1) 50%,
        rgba(255, 154, 0, 0.1) 75%,
        rgba(0, 0, 0, 0.95) 100%);
    backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 1;
    visibility: visible;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: ad-backdrop-sparkle 10s ease-in-out infinite;
}

@keyframes ad-backdrop-sparkle {
    0%, 100% { 
        background: linear-gradient(135deg, 
            rgba(0, 0, 0, 0.95) 0%, 
            rgba(20, 30, 48, 0.98) 25%,
            rgba(255, 193, 7, 0.05) 50%,
            rgba(255, 154, 0, 0.05) 75%,
            rgba(0, 0, 0, 0.95) 100%);
    }
    50% { 
        background: linear-gradient(135deg, 
            rgba(0, 0, 0, 0.95) 0%, 
            rgba(20, 30, 48, 0.98) 25%,
            rgba(255, 193, 7, 0.15) 50%,
            rgba(255, 154, 0, 0.15) 75%,
            rgba(0, 0, 0, 0.95) 100%);
    }
}

.ad-modal.hidden {
    opacity: 0;
    visibility: hidden;
}

.ad-dialog {
    background: linear-gradient(145deg, 
        rgba(45, 55, 72, 0.98) 0%, 
        rgba(74, 85, 104, 0.98) 30%,
        rgba(45, 55, 72, 0.98) 70%,
        rgba(26, 32, 44, 0.98) 100%);
    border-radius: 28px;
    width: 90%;
    max-width: 500px;
    height: 90vh;
    max-height: 90vh;
    overflow: hidden;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 40px 120px rgba(255, 193, 7, 0.3),
        0 0 0 2px rgba(255, 193, 7, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.15),
        0 0 60px rgba(255, 193, 7, 0.25);
    border: 3px solid rgba(255, 193, 7, 0.5);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
}

/* 廣告彈窗右上方 X 關閉按鈕 */
.ad-dialog-close-x {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(135deg, rgba(255, 87, 87, 0.9), rgba(255, 154, 0, 0.9));
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(255, 87, 87, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    color: white;
}

.ad-dialog-close-x svg {
    width: 1.25rem;
    height: 1.25rem;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.ad-dialog-close-x:hover {
    background: linear-gradient(135deg, rgba(255, 87, 87, 1), rgba(255, 154, 0, 1));
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 20px rgba(255, 87, 87, 0.6);
    border-color: rgba(255, 255, 255, 0.5);
}

.ad-dialog-close-x:hover svg {
    transform: rotate(90deg) scale(1.1);
}

.ad-dialog-close-x:active {
    transform: scale(1.05) rotate(90deg);
    transition: transform 0.1s ease;
}

/* 觸控設備反饋 */
@media (hover: none) and (pointer: coarse) {
    .ad-dialog-close-x:active {
        transform: scale(0.9) !important;
        background: linear-gradient(135deg, rgba(255, 87, 87, 1), rgba(255, 154, 0, 1)) !important;
        box-shadow: 0 4px 15px rgba(255, 87, 87, 0.7) !important;
    }
}

/* 無障礙焦點狀態 */
.ad-dialog-close-x:focus {
    outline: 3px solid rgba(255, 87, 87, 0.6);
    outline-offset: 2px;
}

/* 減少動畫偏好支援 */
@media (prefers-reduced-motion: reduce) {
    .ad-dialog-close-x {
        transition: none !important;
    }
    
    .ad-dialog-close-x:hover {
        transform: scale(1.05) !important;
    }
    
    .ad-dialog-close-x:hover svg {
        transform: none !important;
    }
}

.ad-dialog::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 28px;
    padding: 3px;
    background: linear-gradient(45deg, 
        rgba(255, 193, 7, 0.8), 
        rgba(255, 154, 0, 0.8), 
        rgba(255, 193, 7, 0.8), 
        rgba(255, 154, 0, 0.8));
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    animation: ad-border-shine 4s ease-in-out infinite;
}

@keyframes ad-border-shine {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.ad-dialog::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff6b6b, #ff8e8e, #ff6b6b, #ff8e8e);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.ad-modal:not(.hidden) .ad-dialog {
    transform: scale(1) translateY(0);
}

.ad-dialog-content {
    padding: 2rem;
    text-align: center;
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 50%, #2d3748 100%);
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 0;
    overflow-y: auto;
}

.ad-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
    justify-content: space-evenly;
    min-height: 0;
    padding: 1rem 0;
}

/* 確保在高度內容超出時能夠滾動 */
.ad-dialog-content::-webkit-scrollbar {
    width: 6px;
}

.ad-dialog-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.ad-dialog-content::-webkit-scrollbar-thumb {
    background: rgba(255, 193, 7, 0.5);
    border-radius: 3px;
}

.ad-dialog-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 193, 7, 0.7);
}

.ad-icon {
    font-size: 5rem;
    animation: gift-bounce 2.5s ease-in-out infinite;
    filter: drop-shadow(0 8px 16px rgba(255, 193, 7, 0.6));
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 30%, #ffb347 70%, #ffd700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 8px rgba(255, 193, 7, 0.3);
}

@keyframes gift-bounce {
    0%, 100% { 
        transform: translateY(0) scale(1);
        filter: drop-shadow(0 6px 12px rgba(255, 193, 7, 0.4));
    }
    25% { 
        transform: translateY(-8px) scale(1.05);
        filter: drop-shadow(0 8px 16px rgba(255, 193, 7, 0.6));
    }
    50% { 
        transform: translateY(-12px) scale(1.1);
        filter: drop-shadow(0 10px 20px rgba(255, 193, 7, 0.8));
    }
    75% { 
        transform: translateY(-8px) scale(1.05);
        filter: drop-shadow(0 8px 16px rgba(255, 193, 7, 0.6));
    }
}

.ad-title {
    font-size: 2.25rem;
    font-weight: 900;
    margin: 0;
    background: linear-gradient(135deg, 
        #ffd700 0%, 
        #ffed4e 25%, 
        #ffb347 50%, 
        #ffd700 75%, 
        #ffed4e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 8px rgba(255, 193, 7, 0.4);
    letter-spacing: 1px;
    line-height: 1.2;
    position: relative;
    animation: title-glow 3s ease-in-out infinite;
}

@keyframes title-glow {
    0%, 100% { 
        filter: drop-shadow(0 0 10px rgba(255, 193, 7, 0.6));
    }
    50% { 
        filter: drop-shadow(0 0 20px rgba(255, 193, 7, 0.8));
    }
}

.ad-description {
    margin-bottom: 0;
    background: linear-gradient(135deg, 
        rgba(74, 85, 104, 0.95) 0%, 
        rgba(45, 55, 72, 0.95) 50%, 
        rgba(26, 32, 44, 0.95) 100%);
    padding: 1.5rem;
    border-radius: 20px;
    border: 2px solid rgba(255, 193, 7, 0.3);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.1),
        0 0 30px rgba(255, 193, 7, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
    flex-shrink: 0;
}

.ad-description::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: linear-gradient(45deg, 
        rgba(255, 193, 7, 0.1), 
        transparent, 
        rgba(255, 193, 7, 0.1));
    animation: description-shimmer 6s ease-in-out infinite;
}

@keyframes description-shimmer {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.ad-description-line {
    color: #f7fafc;
    line-height: 1.8;
    margin: 1rem 0;
    font-size: 1.2rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(226, 232, 240, 0.95) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ad-countdown-container {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 30%, #ffb347 70%, #ffd700 100%);
    padding: 1.25rem 1.5rem;
    border-radius: 20px;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    box-shadow: 
        0 12px 35px rgba(255, 193, 7, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 0 20px rgba(255, 193, 7, 0.2);
    border: 3px solid rgba(255, 193, 7, 0.4);
    animation: countdown-pulse 2s ease-in-out infinite;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.ad-countdown-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer-countdown 3s ease-in-out infinite;
}

@keyframes shimmer-countdown {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes countdown-pulse {
    0%, 100% { 
        box-shadow: 0 8px 25px rgba(255, 193, 7, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.8);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 12px 35px rgba(255, 193, 7, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.9);
        transform: scale(1.02);
    }
}

.ad-countdown-label {
    color: #8b4513;
    font-weight: 600;
    font-size: 1.125rem;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.ad-countdown {
    color: #d97706;
    font-weight: 900;
    font-size: 1.75rem;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    min-width: 50px;
    text-align: center;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(255, 193, 7, 0.2);
    position: relative;
    z-index: 1;
}

.ad-claim-btn {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 30%, #ffb347 70%, #ffd700 100%);
    color: #8b4513;
    border: 3px solid rgba(255, 193, 7, 0.4);
    padding: 1.25rem 3rem;
    border-radius: 60px;
    font-weight: 800;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 
        0 12px 35px rgba(255, 193, 7, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 0 20px rgba(255, 193, 7, 0.3);
    margin-bottom: 0.75rem;
    flex-shrink: 0;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.9);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

.ad-claim-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.ad-claim-btn:hover::before {
    left: 100%;
}

.ad-claim-btn:hover {
    background: linear-gradient(135deg, #ffed4e 0%, #ffd700 50%, #ffed4e 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 12px 35px rgba(255, 193, 7, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    color: #8b4513;
}

.ad-register-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 30%, #ff6b6b 70%, #ff8e8e 100%);
    color: white;
    border: 3px solid rgba(255, 107, 107, 0.4);
    padding: 1.25rem 3rem;
    border-radius: 60px;
    font-weight: 800;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 
        0 12px 35px rgba(255, 107, 107, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 0 20px rgba(255, 107, 107, 0.3);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

.ad-register-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.ad-register-btn:hover::before {
    left: 100%;
}

.ad-register-btn:hover {
    background: linear-gradient(135deg, #ff8e8e 0%, #ff6b6b 50%, #ff8e8e 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 12px 35px rgba(255, 107, 107, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    color: white;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Mobile Game IFRAME Modal */
@media (max-width: 768px) {
    .game-dialog {
        width: 95%;
        max-height: 95vh;
        border-radius: 20px;
    }

    .game-dialog-content {
        height: calc(95vh - 140px);
        border-radius: 0 0 16px 16px;
    }

    .game-dialog-header {
        padding: 1rem 1.5rem;
    }

    .game-dialog-title {
        font-size: 1.25rem;
        gap: 0.5rem;
    }

    .game-dialog-title::before {
        font-size: 1.5rem;
    }

    .game-dialog-footer {
        padding: 1rem 1.5rem;
    }

    .game-register-btn {
        width: 100%;
        justify-content: center;
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }

    .game-dialog-close {
        width: 2.25rem;
        height: 2.25rem;
        font-size: 1.1rem;
    }

    .game-countdown {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .ad-dialog {
        width: 95%;
        margin: 1rem;
        border-radius: 24px;
        max-width: 420px;
        height: 90vh;
        max-height: 90vh;
    }

    .ad-dialog-content {
        padding: 1.25rem;
    }

    .ad-icon {
        font-size: 3rem;
    }

    .ad-title {
        font-size: 1.75rem;
        letter-spacing: 0.5px;
    }

    .ad-description {
        padding: 1.25rem;
        margin-bottom: 0;
    }

    .ad-description-line {
        font-size: 1.05rem;
        margin: 0.5rem 0;
    }

    .ad-countdown-container {
        padding: 1rem 1.25rem;
        margin-bottom: 0;
    }

    .ad-countdown {
        font-size: 1.5rem;
        padding: 0.5rem 1rem;
    }

    .ad-countdown-label {
        font-size: 1rem;
    }

    .ad-claim-btn,
    .ad-register-btn {
        width: 100%;
        justify-content: center;
        text-align: center;
        padding: 0.875rem 1.5rem;
        font-size: 1.05rem;
        margin-bottom: 0.5rem;
    }
    
    .ad-dialog-close-x {
        top: 0.75rem !important;
        right: 0.75rem !important;
        width: 2.25rem !important;
        height: 2.25rem !important;
    }
    
    .ad-dialog-close-x svg {
        width: 1.1rem !important;
        height: 1.1rem !important;
    }
}
