body {
    font-family: Arial, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f5f5f5;
}

.container {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 25px;
}

.upload-content {
    flex: 1;
    min-width: 300px;
}

/* 分析結果を表示するコンテンツエリア */
.analysis-content {
    width: 100%;
    display: block;
    text-align: center;
}

.content-row {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    justify-content: center;
    margin-bottom: 20px;
}

.image-side {
    flex: 1;
    text-align: center;
}

.board-side {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.preview-image {
    max-width: 100%;
    max-height: 300px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* テトリス盤面のスタイル */
.tetris-board {
    display: grid;
    grid-template-columns: repeat(10, 20px);
    grid-template-rows: repeat(20, 20px);
    gap: 1px;
    background: #000;
    border: 3px solid #333;
    border-radius: 5px;
    padding: 5px;
    margin: 0 auto;
    width: fit-content;
}

.cell {
    width: 20px;
    height: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: bold;
    transition: all 0.2s ease;
}

/* ミノの色定義 */
.mino-empty { background: #111; color: #333; }
.mino-I { background: #00f5ff; color: #003d44; border-color: #66f9ff; }
.mino-O { background: #ffff00; color: #444400; border-color: #ffff66; }
.mino-T { background: #a000f0; color: #330044; border-color: #c066f6; }
.mino-L { background: #ffa500; color: #443300; border-color: #ffbb66; }
.mino-J { background: #0000ff; color: #003344; border-color: #6666ff; }
.mino-S { background: #00ff00; color: #003300; border-color: #66ff66; }
.mino-Z { background: #ff0000; color: #330000; border-color: #ff6666; }
.mino-X { background: #666; color: #ccc; border-color: #999; }

.status {
    text-align: center;
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
}

.status.loading {
    background-color: #d1ecf1;
    color: #0c5460;
}

.status.error {
    background-color: #f8d7da;
    color: #721c24;
}

.status.success {
    background-color: #d4edda;
    color: #155724;
}

/* 情報セクションのスタイル */
.info-section {
    margin-top: 30px;
    max-width: 800px;
}

.upload-icon {
    font-size: 48px;
    color: #4CAF50;
    margin-bottom: 20px;
}

.upload-text {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 500;
}

.upload-methods {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 20px;
}

.method-tag {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.upload-area {
    border: 3px dashed #4CAF50;
    border-radius: 12px;
    padding: 60px 20px;
    text-align: center;
    background-color: #fafafa;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.upload-area:hover {
    border-color: #45a049;
    background-color: #f0f8f0;
    transform: translateY(-2px);
}

.upload-area.drag-over {
    border-color: #2196F3;
    background-color: #e3f2fd;
    transform: scale(1.02);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.upload-area.drag-over::before {
    content: "📎 ファイルをドロップして画像を読み込み";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(33, 150, 243, 0.9);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 16px;
    z-index: 10;
    pointer-events: none;
    white-space: nowrap;
}

/* 画像が読み込まれた状態での追加スタイル */
.upload-area.has-image {
    cursor: default;
}

.upload-area.has-image:hover {
    transform: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
