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

body {
    font-family: 'Hiragino Sans', 'Meiryo', sans-serif;
    background: linear-gradient(180deg, #87ceeb 0%, #e0f0ff 50%, #98d8c8 100%);
    min-height: 100vh;
    color: #333;
    overflow: hidden;
}

.container {
    max-width: 400px;
    margin: 0 auto;
    padding: 10px;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    margin-bottom: 10px;
}

h1 {
    font-size: 1.8rem;
    color: #4a3728;
    text-shadow: 2px 2px 0 #fff;
}

.subtitle {
    color: #666;
    font-size: 0.85rem;
    margin-top: 3px;
}

/* ゲーム情報 */
.game-info {
    display: flex;
    justify-content: space-around;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    padding: 10px;
    margin-bottom: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.info-item {
    text-align: center;
}

.info-label {
    display: block;
    font-size: 0.7rem;
    color: #888;
}

.info-value {
    font-size: 1.4rem;
    font-weight: bold;
    color: #4a3728;
}

/* ゲームエリア */
.game-area {
    flex: 1;
    position: relative;
    background: linear-gradient(180deg, transparent 0%, rgba(139, 119, 101, 0.1) 100%);
    border-radius: 15px;
    overflow: hidden;
    min-height: 400px;
}

.ground {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(180deg, #8b7355, #6b5344);
    border-radius: 0 0 15px 15px;
}

/* ブロック */
.block {
    position: absolute;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.1s;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    user-select: none;
}

.block:hover {
    transform: scale(1.05);
    z-index: 100;
}

.block:active {
    transform: scale(0.95);
}

.block.falling {
    transition: top 0.05s linear, left 0.05s linear, transform 0.3s;
    cursor: default;
}

.block.removing {
    animation: blockPop 0.3s ease-out forwards;
}

@keyframes blockPop {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); }
    100% { transform: scale(0); opacity: 0; }
}

/* ブロック色 */
.block.red {
    background: linear-gradient(145deg, #ff6b6b, #ee5a5a);
}

.block.blue {
    background: linear-gradient(145deg, #4ecdc4, #44a39b);
}

.block.yellow {
    background: linear-gradient(145deg, #ffd93d, #f0c929);
}

.block.green {
    background: linear-gradient(145deg, #6bcb77, #5cb868);
}

.block.purple {
    background: linear-gradient(145deg, #9b59b6, #8e44ad);
}

.block.orange {
    background: linear-gradient(145deg, #ff8c42, #e67a3a);
}

.block.wood {
    background: linear-gradient(145deg, #d4a574, #c49464);
    border: 2px solid #a67c52;
}

.block.stone {
    background: linear-gradient(145deg, #95a5a6, #7f8c8d);
    border: 2px solid #707b7c;
}

/* コントロール */
.controls {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.control-btn {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.1s;
}

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

.start-btn {
    background: linear-gradient(145deg, #4ecdc4, #26a69a);
    color: #fff;
}

.retry-btn {
    background: linear-gradient(145deg, #ff6b6b, #ee5a5a);
    color: #fff;
}

.share-btn {
    background: linear-gradient(145deg, #1da1f2, #0d8ecf);
    color: #fff;
}

/* メッセージ */
.message {
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: #4a3728;
    min-height: 30px;
    margin-top: 10px;
}

/* 結果パネル */
.result-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(145deg, #fff, #f0f0f0);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    z-index: 1000;
    min-width: 280px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.result-panel h2 {
    color: #4a3728;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.result-detail {
    color: #666;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.result-buttons {
    display: flex;
    gap: 10px;
}

.result-buttons .control-btn {
    flex: 1;
}

/* パーティクル */
.particle-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 500;
}

.debris {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    animation: debrisFly 0.8s ease-out forwards;
}

@keyframes debrisFly {
    0% { opacity: 1; }
    100% { opacity: 0; transform: translateY(100px) rotate(360deg); }
}

.explosion-ring {
    position: absolute;
    border: 3px solid rgba(255, 200, 100, 0.8);
    border-radius: 50%;
    animation: ringExpand 0.5s ease-out forwards;
}

@keyframes ringExpand {
    0% { width: 0; height: 0; opacity: 1; }
    100% { width: 100px; height: 100px; opacity: 0; margin: -50px; }
}

/* レスポンシブ */
@media (max-width: 400px) {
    h1 { font-size: 1.5rem; }
    .game-area { min-height: 350px; }
}
