body {
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f5f5f5;
}

#app {
    max-width: 1200px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    color: #333;
}

.controls {
    text-align: center;
    margin-bottom: 20px;
}

#add-coin-1 {
    padding: 10px 20px;
    font-size: 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#add-coin-1:hover {
    background-color: #45a049;
}

.playground {
    width: 100%;
    height: 600px;
    background-color: white;
    border: 2px solid #ddd;
    border-radius: 10px;
    position: relative;
}


.controls input[type="radio"] {
    display: none;
}

.controls label {
    display: inline-block;
    padding: 10px 20px;
    margin: 0 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f0f0f0;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
    user-select: none;
}

.controls label:hover {
    background-color: #e0e0e0;
}

.controls input[type="radio"]:checked+label {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

/* クリアボタンのスタイル */
.controls button {
    display: inline-block;
    padding: 10px 20px;
    margin: 0 5px;
    border: 1px solid #dc3545;
    border-radius: 5px;
    background-color: #dc3545;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    margin-left: 20px;
    /* ラジオボタンとの間隔を広げる */
}

.controls button:hover {
    background-color: #c82333;
    border-color: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.controls button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.delete-button {
    background-color: #ff6b6b !important;
    border-color: #ff6b6b !important;
}

.delete-button:hover {
    background-color: #ff5252 !important;
    border-color: #ff5252 !important;
}

.split-button {
    background-color: #4CAF50 !important;
    border-color: #4CAF50 !important;
}

.split-button:hover {
    background-color: #45a049 !important;
    border-color: #45a049 !important;
}

.coin {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    color: white;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* .coin.preview {
    opacity: 0.5;
    pointer-events: none;
    z-index: 1000;
} */


/* 10000 - 濃い紫 */
.coin-10000 {
    background: linear-gradient(135deg, #663399, #4a2570);
    border-color: #8a4fc7;
}

/* 1000 - 赤 */
.coin-1000 {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border-color: #ec7063;
}

/* 100 - オレンジ */
.coin-100 {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    border-color: #f8c471;
}

/* 10 - 黄色 */
.coin-10 {
    background: linear-gradient(135deg, #f1c40f, #d4af37);
    border-color: #f7dc6f;
    color: #333;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
}

/* 1 - 緑 */
.coin-1 {
    background: linear-gradient(135deg, #27ae60, #229954);
    border-color: #58d68d;
}

/* 1/10 - 青 */
.coin-1-10 {
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-color: #7fb3d3;
}

/* 1/100 - 水色 */
.coin-1-100 {
    background: linear-gradient(135deg, #1abc9c, #16a085);
    border-color: #52c4a6;
}

/* 1/1000 - グレー */
.coin-1-1000 {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    border-color: #aab7b8;
}

/* 1/10000 - 茶色 */
.coin-1-10000 {
    background: linear-gradient(135deg, #8b4513, #654321);
    border-color: #a0522d;
}

/* コインサイズの調整（値によって大きさを変える） */
.coin-10000 {
    width: 50px;
    height: 50px;
    font-size: 12px;
}

.coin-1000 {
    width: 45px;
    height: 45px;
    font-size: 13px;
}

.coin-100 {
    width: 42px;
    height: 42px;
    font-size: 14px;
}

.coin-10 {
    width: 40px;
    height: 40px;
    font-size: 16px;
}

.coin-1 {
    width: 38px;
    height: 38px;
    font-size: 18px;
}

.coin-1-10 {
    width: 35px;
    height: 35px;
    font-size: 12px;
}

.coin-1-100 {
    width: 32px;
    height: 32px;
    font-size: 10px;
}

.coin-1-1000 {
    width: 30px;
    height: 30px;
    font-size: 9px;
}

.coin-1-10000 {
    width: 28px;
    height: 28px;
    font-size: 8px;
}

.coin.selected {
    outline: 3px solid #007bff;
    outline-offset: 2px;
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.5);
}