/* 플링코 게임 모달 스타일 */

.plinko-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    overflow-y: auto;
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
}

.plinko-modal-content {
    background: white;
    border-radius: 15px;
    width: 100%;
    max-width: 1400px;
    margin: 20px auto;
    max-height: 95vh;
    overflow-y: auto;
    box-shadow: 0 10px 50px rgba(0,0,0,0.5);
}

.plinko-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 2px solid #eee;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px 15px 0 0;
}

.plinko-modal-header h2 {
    margin: 0;
    font-size: 1.8em;
}

.plinko-modal-close {
    background: none;
    border: none;
    font-size: 2em;
    color: white;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    transition: background 0.3s;
}

.plinko-modal-close:hover {
    background: rgba(255,255,255,0.2);
}

.plinko-modal-body {
    padding: 20px;
}

.plinko-disclaimer {
    text-align: center;
    color: #666;
    font-size: 0.9em;
    margin-bottom: 20px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 5px;
}

.plinko-points-info {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.points-display {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    font-size: 1.1em;
}

.points-display strong {
    color: #667eea;
    font-size: 1.2em;
}

.plinko-game-container {
    width: 100%;
}

.plinko-game-layout {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.plinko-game-main {
    flex: 1;
    min-width: 600px;
}

.plinko-game-sidebar {
    width: 300px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* HUD 스타일 (기존과 동일하지만 prefix 추가) */
.plinko-hud {
    display: flex;
    justify-content: space-around;
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 10px;
    flex-wrap: wrap;
}

.plinko-hud-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}

.plinko-hud-label {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 5px;
}

.plinko-hud-value {
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
}

/* Canvas */
.plinko-canvas-wrapper {
    position: relative;
    width: 100%;
    background: #1a1a2e;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

#plinko-game-canvas {
    display: block;
    width: 100%;
    height: auto;
    background: linear-gradient(180deg, #0f0c29 0%, #1a1a2e 100%);
}

.plinko-game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    overflow-y: auto;
    padding: 20px;
}

.plinko-game-overlay.hidden {
    display: none;
}

.plinko-overlay-content {
    text-align: center;
    color: white;
    padding: 30px;
    max-width: 400px;
    width: 100%;
    margin: auto;
    min-height: min-content;
}

.plinko-overlay-content h2 {
    font-size: 2em;
    margin-bottom: 15px;
    color: #ffd700;
}

.plinko-overlay-content p {
    font-size: 1.1em;
    margin-bottom: 20px;
    opacity: 0.9;
}

.plinko-overlay-stats {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.plinko-stat-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.plinko-stat-item:last-child {
    border-bottom: none;
}

.plinko-overlay-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.plinko-submit-section {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    flex-direction: column;
    width: 100%;
}

.plinko-submit-section input {
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ddd;
    font-size: 1em;
    width: 100%;
    box-sizing: border-box;
}

.plinko-submit-section .plinko-btn {
    width: 100%;
}

/* Buttons */
.plinko-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.plinko-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.plinko-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.plinko-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.plinko-btn-secondary {
    background: #6c757d;
    color: white;
}

.plinko-btn-secondary:hover:not(:disabled) {
    background: #5a6268;
    transform: translateY(-2px);
}

.plinko-btn-success {
    background: #28a745;
    color: white;
}

.plinko-btn-success:hover:not(:disabled) {
    background: #218838;
    transform: translateY(-2px);
}

.plinko-btn-drop {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    font-size: 1.1em;
    padding: 15px 30px;
    width: 100%;
}

.plinko-btn-drop:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(245, 87, 108, 0.4);
}

.plinko-btn-drop small {
    display: block;
    font-size: 0.7em;
    opacity: 0.8;
    margin-top: 5px;
}

.plinko-btn-icon {
    background: #6c757d;
    color: white;
    padding: 10px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5em;
}

.plinko-btn-icon:hover {
    background: #5a6268;
    transform: scale(1.1);
}

.plinko-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Sidebar */
.plinko-sidebar-section {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.plinko-sidebar-section h3 {
    margin-bottom: 15px;
    color: #667eea;
    font-size: 1.2em;
}

.plinko-target-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.plinko-target-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2em;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    transition: all 0.3s;
}

.plinko-target-number.hit {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    transform: scale(1.2);
    box-shadow: 0 5px 20px rgba(245, 87, 108, 0.6);
    animation: plinko-pulse 0.5s;
}

@keyframes plinko-pulse {
    0%, 100% { transform: scale(1.2); }
    50% { transform: scale(1.4); }
}

.plinko-ranking-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
}

.plinkotab-btn {
    flex: 1;
    padding: 8px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.plinkotab-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.plinko-leaderboard {
    max-height: 400px;
    overflow-y: auto;
}

.plinko-leaderboard-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #eee;
    transition: background 0.3s;
}

.plinko-leaderboard-item:hover {
    background: #f5f5f5;
}

.plinko-rank {
    font-weight: bold;
    color: #667eea;
    min-width: 30px;
}

.plinko-name {
    flex: 1;
    margin: 0 10px;
}

.plinko-score {
    font-weight: bold;
    color: #333;
}

.plinko-personal-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.plinko-stat-row {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 5px;
}

.plinko-stat-row span:last-child {
    font-weight: bold;
    color: #667eea;
}

.plinko-loading {
    text-align: center;
    padding: 20px;
    color: #999;
}

/* Responsive */
@media (max-width: 1024px) {
    .plinko-game-layout {
        flex-direction: column;
    }

    .plinko-game-sidebar {
        width: 100%;
    }

    .plinko-game-main {
        min-width: auto;
    }
}

@media (max-width: 768px) {
    .plinko-modal {
        padding: 10px;
    }

    .plinko-modal-content {
        margin: 10px auto;
        max-height: 98vh;
    }

    .plinko-modal-header h2 {
        font-size: 1.4em;
    }

    .plinko-hud {
        font-size: 0.9em;
    }

    .plinko-hud-value {
        font-size: 1.2em;
    }

    .plinko-target-number {
        width: 40px;
        height: 40px;
        font-size: 1em;
    }

    .plinko-game-overlay {
        padding: 10px;
        align-items: flex-start;
        padding-top: 20px;
    }

    .plinko-overlay-content {
        padding: 20px;
        max-width: 100%;
    }

    .plinko-overlay-content h2 {
        font-size: 1.5em;
    }

    .plinko-overlay-content p {
        font-size: 1em;
    }

    .plinko-submit-section {
        margin-top: 15px;
    }
}