/* 게임 페이지 스타일 */

.header-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 15px;
}

.coin-display {
    background: linear-gradient(45deg, #f39c12, #e67e22);
    padding: 10px 25px;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: bold;
}

.back-link {
    color: #888;
    text-decoration: none;
    padding: 10px 20px;
    border: 1px solid #444;
    border-radius: 25px;
    transition: all 0.3s;
}

.back-link:hover {
    color: #fff;
    border-color: #f39c12;
}

/* 광고 배너 */
.ad-banner {
    background: rgba(0, 0, 0, 0.3);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    margin: 20px 0;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-placeholder {
    text-align: center;
    color: #666;
}

.ad-placeholder span {
    display: block;
    font-size: 1.1rem;
}

.ad-placeholder small {
    font-size: 0.8rem;
    color: #555;
}

.ad-placeholder.vertical {
    padding: 20px 10px;
}

.ad-sidebar {
    background: rgba(0, 0, 0, 0.3);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    min-width: 160px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 게임 그리드 */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.game-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(243, 156, 18, 0.3);
    border-color: #f39c12;
}

.game-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.game-card h3 {
    margin-bottom: 10px;
    color: #f39c12;
}

.game-card p {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.reward {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
}

/* 게임 레이아웃 */
.game-layout {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}

.game-container {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-placeholder {
    text-align: center;
    color: #666;
    font-size: 1.2rem;
}

/* 클리커 게임 */
.clicker-game {
    text-align: center;
    padding: 30px;
    width: 100%;
}

.clicker-game .timer {
    font-size: 3rem;
    color: #e74c3c;
    margin-bottom: 20px;
}

.clicker-game .score {
    font-size: 2rem;
    color: #f39c12;
    margin-bottom: 30px;
}

.click-btn {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(145deg, #f39c12, #e67e22);
    color: white;
    font-size: 4rem;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(243, 156, 18, 0.4);
    transition: transform 0.1s;
}

.click-btn:active {
    transform: scale(0.95);
}

.click-btn:disabled {
    background: #555;
    cursor: not-allowed;
}

/* 반응속도 게임 */
.reaction-game {
    text-align: center;
    padding: 30px;
    width: 100%;
}

.reaction-box {
    width: 300px;
    height: 300px;
    margin: 20px auto;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background 0.3s;
}

.reaction-box.waiting {
    background: #e74c3c;
}

.reaction-box.ready {
    background: #2ecc71;
}

.reaction-box.clicked {
    background: #3498db;
}

.reaction-result {
    font-size: 2rem;
    margin-top: 20px;
}

/* 메모리 게임 */
.memory-game {
    text-align: center;
    padding: 30px;
    width: 100%;
}

.memory-display {
    font-size: 4rem;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
    color: #f39c12;
    letter-spacing: 10px;
}

.memory-input {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 20px 0;
}

.memory-input button {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.memory-input button:hover {
    background: #f39c12;
}

.memory-level {
    color: #888;
    margin-bottom: 15px;
}

/* 슬롯 게임 */
.slot-game {
    text-align: center;
    padding: 30px;
    width: 100%;
}

.slot-machine {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 30px 0;
}

.slot-reel {
    width: 80px;
    height: 100px;
    background: rgba(0, 0, 0, 0.5);
    border: 3px solid #f39c12;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    overflow: hidden;
}

.slot-reel.spinning {
    animation: slotSpin 0.1s infinite;
}

@keyframes slotSpin {
    0% { transform: translateY(-5px); }
    50% { transform: translateY(5px); }
    100% { transform: translateY(-5px); }
}

.spin-btn {
    padding: 15px 50px;
    font-size: 1.3rem;
    border: none;
    border-radius: 30px;
    background: linear-gradient(45deg, #9b59b6, #8e44ad);
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

.spin-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(155, 89, 182, 0.5);
}

.spin-btn:disabled {
    background: #555;
    cursor: not-allowed;
}

.slot-info {
    color: #888;
    margin-top: 20px;
    font-size: 0.9rem;
}

/* 모달 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    text-align: center;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #f39c12;
}

.modal-content p {
    color: #888;
    margin-bottom: 25px;
}

.ad-video-placeholder {
    margin: 25px 0;
}

.fake-video {
    background: #000;
    border-radius: 10px;
    padding: 40px;
    position: relative;
}

.fake-video span {
    color: #555;
    font-size: 1.2rem;
}

.video-progress {
    height: 5px;
    background: #333;
    border-radius: 3px;
    margin-top: 20px;
    overflow: hidden;
}

.video-progress-bar {
    height: 100%;
    background: #f39c12;
    width: 0%;
    transition: width 0.1s linear;
}

.video-timer {
    display: block;
    margin-top: 10px;
    color: #f39c12;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-watch {
    padding: 15px 30px;
    border: none;
    border-radius: 30px;
    background: linear-gradient(45deg, #2ecc71, #27ae60);
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-watch:hover {
    transform: scale(1.05);
}

.btn-watch:disabled {
    background: #555;
    cursor: not-allowed;
}

.btn-skip {
    padding: 15px 30px;
    border: 1px solid #555;
    border-radius: 30px;
    background: transparent;
    color: #888;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-skip:hover {
    border-color: #888;
    color: #fff;
}

/* 결과 모달 */
.modal-content.result {
    background: linear-gradient(135deg, #1a1a2e, #0f3460);
}

.result-score {
    font-size: 4rem;
    color: #f39c12;
    margin: 20px 0;
}

.result-score small {
    font-size: 1.5rem;
    color: #888;
}

.result-reward {
    font-size: 1.5rem;
    color: #2ecc71;
    margin-bottom: 30px;
    padding: 15px;
    background: rgba(46, 204, 113, 0.1);
    border-radius: 10px;
}

.btn-primary {
    padding: 15px 50px;
    border: none;
    border-radius: 30px;
    background: linear-gradient(45deg, #f39c12, #e67e22);
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(243, 156, 18, 0.5);
}

/* 시작 버튼 */
.start-btn {
    padding: 15px 40px;
    font-size: 1.2rem;
    border: none;
    border-radius: 30px;
    background: linear-gradient(45deg, #2ecc71, #27ae60);
    color: white;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s;
}

.start-btn:hover {
    transform: scale(1.05);
}

/* 반응형 */
@media (max-width: 900px) {
    .game-layout {
        flex-direction: column;
    }

    .ad-sidebar {
        min-height: 100px;
        min-width: auto;
    }

    .ad-placeholder.vertical {
        display: flex;
        gap: 10px;
    }
}

@media (max-width: 600px) {
    .header-stats {
        flex-direction: column;
        gap: 10px;
    }

    .modal-buttons {
        flex-direction: column;
    }

    .reaction-box {
        width: 250px;
        height: 250px;
    }
}

/* 인게임 하단 광고 */
.ingame-ad {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.ad-placeholder.ingame {
    background: rgba(0, 0, 0, 0.4);
    border: 2px dashed rgba(243, 156, 18, 0.3);
    border-radius: 10px;
    padding: 15px 30px;
    display: inline-block;
    animation: adPulse 2s infinite;
}

.ad-placeholder.ingame span {
    color: #f39c12;
    font-size: 0.95rem;
}

.ad-placeholder.ingame small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.75rem;
}

@keyframes adPulse {
    0%, 100% { border-color: rgba(243, 156, 18, 0.3); }
    50% { border-color: rgba(243, 156, 18, 0.6); }
}
