/* static/style.css - extracted from index.html */

body {
  font-family: sans-serif;
  padding: 20px;
  max-width: 600px;
  margin: 0 auto;
}

.box {
  border: 1px solid #ccc;
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 5px;
}

.protected {
  border-color: green;
  background-color: #f0fff0;
  display: none;
}

button {
  cursor: pointer;
  padding: 8px 16px;
}

label {
  display: block;
  margin-bottom: 8px;
}

input[type="text"],
textarea {
  width: 100%;
  padding: 6px;
  box-sizing: border-box;
}

/* highlight style for matched words */
.highlight {
  background: #fff176;
  padding: 0 2px;
  border-radius: 2px;
  position: relative;
  cursor: pointer;
}

/* tooltip box with content, shows pronunciation (p) and english (e) from cedict on hover/tap */
.highlight::before {
  content: attr(data-p) " — " attr(data-e);
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  min-width: 120px;
  max-width: 320px;
  white-space: pre-wrap;
  background: rgba(0,0,0,0.85);
  color: #fff;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.2;
  display: none;
  z-index: 30;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
.highlight:hover::before {
  display: block;
}

.flex { display:flex; gap:8px; align-items:center; }
.small { font-size:0.9em; color:#666; }
.entry-card { border:1px solid #eee; padding:8px; border-radius:6px; margin-bottom:8px; background:#fff; }
.entry-actions button { margin-right:6px; }
.highlight { background: #fff3b0; padding: 0 2px; border-radius:2px; cursor:help; }
.tab { padding:6px 10px; cursor:pointer; border-radius:4px; border:1px solid #ddd; background:#fafafa; }
.tab.active { background:#e8f0ff; border-color:#bcd; }

/* Chinese text styling */
.chinese-text {
  font-size: 1.4em;
  line-height: 1.8;
  font-family: 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
}

/* Flashcard styling for review mode */
.flashcard {
  border: 2px solid #2c3e50;
  border-radius: 12px;
  padding: 40px;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 300px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.flashcard-content {
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
}

.flashcard-sentence {
  font-size: 2.2em;
  font-weight: 500;
  margin-bottom: 20px;
  line-height: 1.6;
  word-wrap: break-word;
}

.flashcard-meta {
  font-size: 0.85em;
  color: #666;
  margin-bottom: 20px;
}

.flashcard-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.flashcard-btn {
  padding: 12px 24px;
  font-size: 1em;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 100px;
}

#review-good-btn {
  background: #4caf50;
  color: white;
}

#review-good-btn:hover {
  background: #45a049;
  transform: scale(1.05);
}

#review-bad-btn {
  background: #f44336;
  color: white;
}

#review-bad-btn:hover {
  background: #da190b;
  transform: scale(1.05);
}

.flashcard-speak-btn {
  padding: 12px 16px;
  background: #2196f3;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1em;
  transition: all 0.2s;
}

.flashcard-speak-btn:hover {
  background: #0b7dda;
  transform: scale(1.05);
}

/* Minimal auth container styling */
#auth-container {
  background: #f5f5f5 !important;
  border: 1px solid #e0e0e0 !important;
  padding: 8px 12px !important;
  margin-bottom: 12px !important;
}

#auth-container h3 {
  margin: 0 0 6px 0;
  font-size: 0.95em;
}

#auth-container p {
  margin: 0 0 8px 0;
  font-size: 0.9em;
}

#auth-container button {
  padding: 6px 12px;
  font-size: 0.9em;
}
