@font-face {
  font-family: linja-pona;
  src: url('linja-pona-4.1.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}
.linja-pona {
  font-family: linja-pona;
  font-feature-settings: "liga" 1, "clig" 1, "calt" 1, "kern" 1, "mark" 1;
  text-rendering: optimizeLegibility;
}

.nowrap {
	white-space: nowrap;
}

/* フラッシュカードのスタイル */
.flashcard {
    max-width: 500px;
    margin: 0 auto;
    cursor: pointer;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    width: 100%;
    box-sizing: border-box;
}

.flashcard:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.card-side {
    min-height: 230px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

#tokipona-display {
  font-size: 4rem;
  font-weight: bold;
  font-family: linja-pona;
  margin-bottom: 1rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
  text-align: center;
}

#word-display {
    font-size: 2.5rem;
    font-weight: bold;
    color: #3273dc;
    margin-bottom: 1rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: center;
}

#kana-display {
    font-size: 1.2rem;
    color: #666;
    font-style: italic;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: center;
}

#meaning-display {
    text-align: left;
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

#meaning-display p {
    margin-bottom: 0.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

#meaning-display strong {
    color: #3273dc;
}

.hinshi {
  border: 2px solid #000;
  padding: 2px 3px;
  margin: 0 2px;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: bold;
}

.antonym {
  color: #ff3860;
  font-weight: bold;
  font-style: italic;
}

/* ボタンのスタイル改善 */
.button {
    transition: all 0.2s ease;
}

.button:hover {
    transform: translateY(-1px);
}

/* カウンターのスタイル */
#card-counter {
    font-size: 1.1rem;
    color: #666;
    margin: 0 1rem;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .flashcard {
        max-width: 95%;
        margin: 0 auto;
    }
    
    .card-side {
        min-height: 180px;
        padding: 1rem;
    }
    
    #tokipona-display {
        font-size: 3rem;
    }
    
    #word-display {
        font-size: 2rem;
    }
    
    #kana-display {
        font-size: 1rem;
    }
    
    #meaning-display {
        font-size: 0.9rem;
    }
    
    .hinshi {
        font-size: 0.9rem;
        padding: 1px 2px;
    }
    
    .button {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
    
    #card-counter {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .flashcard {
        max-width: 98%;
    }
    
    .card-side {
        min-height: 160px;
        padding: 0.8rem;
    }
    
    #tokipona-display {
        font-size: 2.5rem;
    }
    
    #word-display {
        font-size: 1.8rem;
    }
    
    #kana-display {
        font-size: 0.9rem;
    }
    
    #meaning-display {
        font-size: 0.85rem;
    }
    
    .hinshi {
        font-size: 0.8rem;
        padding: 1px 2px;
    }
    
    .button {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    #card-counter {
        font-size: 0.9rem;
    }
}

/* ローディング状態 */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* アニメーション効果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.flashcard {
    animation: fadeIn 0.5s ease-out;
}