body {
    margin: 0;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background: #f0f2f5;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 40px;
    box-sizing: border-box;
}

#app {
    width: 90%;
    max-width: 400px;
    background: white;
    padding: 30px 20px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    text-align: center;
}

#stat-bar {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 10px;
    font-weight: bold;
    margin-bottom: 10px;
}

.word-area {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 40px;
    box-sizing: border-box;
}

.action-btn {
    font-weight: bold;
}

.correct {
    background-color: #2196F3 !important;
}

/* 青 */
.wrong {
    background-color: #f44336 !important;
}

/* 赤 */
.small {
    width: 60px !important;
    height: 60px !important;
    background: #aaa !important;
}

#wordIndex {
    color: #999;
    font-size: 14px;
    margin-bottom: 5px;
}

#word {
    font-size: 38px;
    font-weight: bold;
    margin: 0;
    line-height: 1.2;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#mean {
    font-size: 20px;
    color: #e53935;
    margin-top: 25px;
    width: 100%;
    word-break: break-all;
    line-height: 1.4;
    visibility: hidden;
}

/* プログレスバー */
.progress {
    width: 100%;
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
    margin: 25px 0;
}

.progress-bar {
    height: 100%;
    width: 100%;
    background: #4caf50;
    transition: width 0.05s linear;
}

.mobile-controls {
    display: flex;
    justify-content: space-around;
    width: 100%;
}

.nav-btn {
    width: 80px;
    height: 80px;
    font-size: 28px;
    border-radius: 50%;
    border: none;
    background: #4caf50;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.3);
}

.nav-btn:active {
    transform: scale(0.92);
}

input[type="number"] {
    padding: 8px;
    width: 80px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

#startBtn {
    padding: 12px 40px;
    font-size: 18px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    margin-top: 20px;
}

.result-section {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    margin-top: 20px;
    overflow: hidden;
    border-top: 2px solid #eee;
}

.tabs {
    display: flex;
    margin: 10px 0;
}

.tab-btn {
    flex: 1;
    padding: 8px;
    border: none;
    background: #eee;
    cursor: pointer;
}

.tab-btn.active {
    background: #4caf50;
    color: white;
}

.table-wrapper {
    overflow-y: auto;
    flex-grow: 1;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th,
td {
    border-bottom: 1px solid #eee;
    padding: 8px;
    text-align: left;
}

tr:nth-child(even) {
    background: #fafafa;
}

#setup p label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 16px;
}

#reviewMode {
    width: 20px;
    height: 20px;
}
