/* =========================================
   🚀 Speed背单词 - 页面级样式 (功能页面)
   由 app.css 拆分而来
   ========================================= */

/* =========================================
   辅导老师页面
   ========================================= */

.tutor-content {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px;
    padding: 16px;
    background: #f7f8fa;
    min-height: 90vh;
}

.control-section .van-cell {
    padding: 10px 16px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.tutor-stats-card {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.stats-grid {
    display: flex;
    justify-content: space-around;
    align-items: center;
    text-align: center;
    margin-bottom: 15px;
}

.stats-value {
    font-size: 24px;
    font-weight: 800;
    color: #323233;
}

.report-btn {
    height: 44px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(25, 137, 250, 0.2);
}

.student-list-group {
    margin: 10px 0 !important;
}

.student-name {
    font-weight: 600;
    font-size: 15px;
    margin-right: 8px;
}

/* =========================================
   启动页动画
   ========================================= */

@keyframes rocket-out {
    0% { transform: translateY(-15px) scale(1); opacity: 1; }
    100% { transform: translateY(-500px) scale(2); opacity: 0; }
}

@keyframes blink {
    from, to { opacity: 0; }
    50% { opacity: 1; }
}

@keyframes rocket-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* =========================================
   词库管理
   ========================================= */

.library-manager-minimal {
    background-color: #f2f2f7;
    min-height: 100vh;
}

.category-header {
    padding: 20px 16px 8px;
    font-size: 13px;
    color: #8e8e93;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.book-row {
    background: #ffffff;
    display: flex;
    align-items: center;
    padding: 12px 16px;
    position: relative;
    border-bottom: 0.5px solid #e5e5ea;
}

.book-row:active {
    background-color: #e5e5e7;
}

.book-info-area {
    flex: 1;
}

.book-name {
    font-size: 13px;
    font-weight: 500;
    color: #1c1c1e;
    display: flex;
    align-items: center;
    gap: 6px;
}

.book-counts {
    font-size: 12px;
    color: #8e8e93;
    margin-top: 4px;
}

.reset-action {
    padding-left: 15px;
    color: #ff3b30;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.library-split-container {
    display: flex;
    height: calc(100vh - 46px);
    background: #fff;
}

.sidebar-area {
    width: 120px !important;
    background: #f7f8fa;
    overflow-y: auto;
    flex-shrink: 0;
}

.sidebar-area .van-sidebar {
    width: 100% !important;
}

.sidebar-area .van-sidebar-item {
    padding: 20px 12px;
    font-size: 13px;
}

.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px 20px 16px;
}

.category-title {
    padding: 15px 0;
    font-size: 14px;
    font-weight: bold;
    color: #323233;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 5;
}

.book-row-minimal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 0.5px solid #ebedf0;
}

.book-info-main {
    flex: 1;
    min-width: 0;
}

.book-name {
    font-size: 13px;
    color: #1c1c1e;
    display: flex;
    align-items: center;
    gap: 6px;
}

.book-stats {
    font-size: 12px;
    color: #969799;
    margin-top: 4px;
}

.reset-link {
    color: #ff3b30;
    font-size: 14px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.learning-tag {
    white-space: nowrap !important;
    flex-shrink: 0;
    font-size: 11px !important;
    display: inline-flex;
    align-items: center;
    padding: 0 4px;
    height: 18px;
}

.book-right-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
    margin-left: 12px;
}

/* =========================================
   连连看游戏
   ========================================= */

.match-game-wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: transparent;
    position: relative;
    z-index: 5;
}

.match-game-wrapper div[style*="text-align: center"] {
    position: relative;
    z-index: 11;
    margin-top: 10px;
}

.match-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 12px;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 15px;
    height: 70vh;
    box-sizing: border-box;
}

.match-card {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 2px solid #ebedf0;
    border-radius: 12px;
    height: 100%;
    padding: 4px;
    box-sizing: border-box;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.card-inner-text {
    width: 100%;
    word-break: break-all;
    white-space: normal;
    text-align: center;
    font-size: clamp(13px, 3.5vw, 18px);
    line-height: 1.3;
    color: #323233;
    font-weight: 500;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
    text-overflow: ellipsis;
}

.match-card.is-selected {
    border-color: #1989fa;
    background-color: #f0f7ff;
    transform: scale(0.95);
}

.match-card.is-error {
    border-color: #ee0a24;
    background-color: #fff0f0;
    animation: match-shake 0.4s;
}

.match-card.is-matched {
    visibility: hidden;
    pointer-events: none;
}

@keyframes match-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

@media (min-width: 768px) {
    .match-grid { gap: 20px; height: 60vh; }
    .card-inner-text { -webkit-line-clamp: 5; line-clamp: 5; }
}

.leaderboard-link {
    color: #1989fa;
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
    padding: 5px 10px;
    transition: opacity 0.2s;
}

.leaderboard-link:active {
    opacity: 0.7;
}

.leaderboard-link-wrapper {
    display: block;
    width: fit-content;
    margin: 30px auto 10px;
    cursor: pointer;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.leaderboard-text {
    color: #ffffff;
    font-size: 14px;
    text-decoration: underline;
}

.leaderboard-link-wrapper:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.25);
}

/* =========================================
   📖 牛津词典释义弹窗样式
   ========================================= */

.oxford-dict-popup {
    overflow: hidden !important;
}

.oxford-definition {
    font-size: 15px;
    line-height: 1.7;
    color: #1d1d1f;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.oxford-definition .pos {
    display: inline-block;
    font-size: 12px;
    color: #666;
    background: #f0f2f5;
    padding: 1px 6px;
    border-radius: 4px;
    margin-right: 4px;
    font-style: italic;
}

.oxford-definition .pron {
    font-size: 13px;
    color: #86868b;
    font-family: "Georgia", serif;
    margin: 0 4px;
}

.oxford-definition .def_head {
    margin-bottom: 8px;
}

.oxford-definition .def_item {
    margin-bottom: 10px;
    padding-left: 12px;
    border-left: 3px solid #1989fa;
}

.oxford-definition .example {
    font-style: italic;
    color: #666;
    font-size: 14px;
    margin: 6px 0 6px 16px;
    padding-left: 8px;
    border-left: 2px solid #e5e5e7;
}

.oxford-definition .chinese {
    color: #333;
    font-weight: 500;
}

.oxford-definition .english {
    color: #1d1d1f;
    font-style: italic;
}

.oxford-definition .sep {
    border: none;
    border-top: 1px dashed #e5e5e7;
    margin: 12px 0;
}

.oxford-definition .sub_title {
    font-size: 14px;
    font-weight: 700;
    color: #1989fa;
    margin: 12px 0 6px;
}

.oxford-definition a {
    color: #1989fa;
    text-decoration: none;
}

.oxford-definition a:active {
    opacity: 0.7;
}

.oxford-definition img {
    max-width: 100%;
    height: auto;
}

.oxford-definition table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0;
}

.oxford-definition td, .oxford-definition th {
    border: 1px solid #e5e5e7;
    padding: 6px 8px;
    font-size: 14px;
}
