* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 2.5em;
    color: #2c3e50;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.game-description {
    font-size: 1.2em;
    color: #7f8c8d;
    font-weight: bold;
}

.game-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.stat {
    background: rgba(255, 255, 255, 0.9);
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.9em;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 1.5em;
    font-weight: bold;
    color: #27ae60;
}

.money-selector {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.money-selector h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.3em;
}

.money-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    max-width: 800px;
    margin: 0 auto;
}

.money-btn {
    background: #fff;
    border: 3px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.money-btn:hover {
    border-color: #3498db;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.money-btn.selected {
    border-color: #27ae60;
    background: #f8fff8;
}

.money-btn img {
    width: 120px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
}

.money-btn span {
    font-weight: bold;
    color: #2c3e50;
    font-size: 1.1em;
}

.game-area {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.copy-machine {
    text-align: center;
    margin-bottom: 30px;
}

.machine-display {
    background: #34495e;
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.machine-display p {
    font-size: 1.2em;
    margin-bottom: 15px;
}

#selectedMoney {
    color: #f39c12;
    font-weight: bold;
}

.copy-button {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.3em;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.copy-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.copy-button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.money-display {
    min-height: 200px;
    background: #ecf0f1;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: flex-start;
    border: 2px dashed #bdc3c7;
    position: relative;
    overflow: hidden;
}

.money-display:empty::before {
    content: "복사된 돈이 여기에 나타납니다!";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #95a5a6;
    font-size: 1.2em;
    font-style: italic;
}

.money-item {
    width: 80px;
    height: 40px;
    border-radius: 5px;
    background-size: cover;
    background-position: center;
    border: 2px solid #f39c12;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: moneyFall 0.8s ease-out;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.money-item:hover {
    transform: scale(1.1);
    z-index: 10;
}

@keyframes moneyFall {
    0% {
        transform: translateY(-50px) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: translateY(0) rotate(180deg);
        opacity: 0.8;
    }
    100% {
        transform: translateY(0) rotate(360deg);
        opacity: 1;
    }
}

.game-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.control-btn {
    padding: 12px 25px;
    font-size: 1.1em;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.control-btn.clear {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.control-btn.auto {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white;
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

footer {
    text-align: center;
    background: rgba(231, 76, 60, 0.9);
    color: white;
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
}

.disclaimer {
    font-weight: bold;
    font-size: 1.1em;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header h1 {
        font-size: 2em;
    }

    .money-buttons {
        grid-template-columns: repeat(2, 1fr);
    }

    .money-btn img {
        width: 100px;
        height: 50px;
    }

    .game-stats {
        flex-direction: column;
        align-items: center;
    }

    .game-controls {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .money-buttons {
        grid-template-columns: 1fr;
    }

    .money-btn img {
        width: 150px;
        height: 75px;
    }
}

/* 자동 복사 모드 애니메이션 */
.auto-mode {
    animation: autoGlow 1s ease-in-out infinite alternate;
}

@keyframes autoGlow {
    0% {
        box-shadow: 0 0 20px rgba(155, 89, 182, 0.5);
    }
    100% {
        box-shadow: 0 0 30px rgba(155, 89, 182, 0.8);
    }
}