/* KungFu Stats Frontend Styles */
body { font-family: Arial, sans-serif; }
.kungfu-student-profile { max-width: 1000px; margin: 0 auto; padding: 20px; }
.kungfu-student-header { display: flex; align-items: center; gap: 20px; margin-bottom: 30px; }
.kungfu-student-avatar img { width: 150px; height: 150px; border-radius: 50%; object-fit: cover; }
.kungfu-student-info h1 { margin: 0 0 10px; font-size: 28px; }
.kungfu-student-meta { color: #666; font-size: 14px; }
.kungfu-student-meta p { margin: 5px 0; }

.kungfu-achievement-section { margin-top: 30px; }
.kungfu-achievement-section h2 { font-size: 22px; border-bottom: 2px solid #eee; padding-bottom: 10px; }

.kungfu-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin: 20px 0; }
.kungfu-stat-card { background: #f9f9f9; border-radius: 8px; padding: 20px; text-align: center; }
.kungfu-stat-card .stat-value { font-size: 36px; font-weight: bold; color: #0073aa; }
.kungfu-stat-card .stat-label { font-size: 14px; color: #666; margin-top: 5px; }

.kungfu-achievements-list { list-style: none; padding: 0; }
.kungfu-achievements-list li { padding: 10px 15px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; }
.kungfu-achievements-list .achievement-name { font-weight: bold; }
.kungfu-achievements-list .achievement-date { color: #999; font-size: 12px; }
.kungfu-achievements-list .achievement-points { color: #0073aa; font-weight: bold; }

/* Bar chart styles */
.kungfu-bar-chart { display: flex; align-items: flex-end; gap: 10px; padding: 20px; min-height: 250px; }
.bar-container { flex: 1; display: flex; flex-direction: column; align-items: center; }
.bar { width: 40px; background: #0073aa; border-radius: 4px 4px 0 0; transition: height 0.5s ease; cursor: pointer; position: relative; min-height: 0; height: 0; }
.bar-value { position: absolute; top: -25px; left: 50%; transform: translateX(-50%); font-size: 12px; font-weight: bold; color: #333; }
.bar-label { margin-top: 10px; font-size: 12px; color: #666; }

/* Progress bar */
.progress-bar { background: #eee; border-radius: 10px; height: 20px; overflow: hidden; margin: 15px 0; }
.progress-bar-fill { background: linear-gradient(90deg, #0073aa, #00a0d2); height: 100%; width: 0; border-radius: 10px; transition: width 1s ease; }

/* Stars */
.student-authority-stars { display: flex; gap: 5px; margin: 10px 0; text-align: center; justify-content: center;}
.star { font-size: 24px; color: #ddd; transition: all 0.3s ease; }
.star.animate { color: #ffb900; transform: scale(1.2); }

/* Achievement points icon animation */
.achievement-points-icon { display: inline-block; transition: transform 0.3s ease; }
.achievement-points-icon.animate { animation: pulse 0.5s ease; }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.3); } 100% { transform: scale(1); } }

/* Students list on frontend */
.kungfu-students-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.kungfu-student-card { 
  background: #111;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 20px;
    padding-top: 20px;
  padding-top: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  box-sizing: border-box;
  flex: 0 0 calc(25% - 15px);
  min-width: 280px;
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: 250px;
}
.kungfu-student-card:hover { box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.kungfu-student-card img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; margin-bottom: 10px; }

/* ===== MISSING STYLES ADDED ===== */

/* Frontend students list page */
.kungfu-frontend-students { max-width: 1200px; margin: 0 auto; padding: 20px; }

/* Division tabs */
.kungfu-division-tabs { display: flex; gap: 10px; margin: 20px 0; flex-wrap: wrap; }
.kungfu-tab { display: inline-block; padding: 10px 20px; background: #f0f0f0; border-radius: 6px; text-decoration: none; color: #333; font-weight: 500; transition: all 0.2s; }
.kungfu-tab:hover { background: #e0e0e0; color: #000; }
.kungfu-tab-active { background: #0073aa; color: #fff; }
.kungfu-tab-active:hover { background: #005a87; color: #fff; }

/* View toggle */
.kungfu-view-toggle { display: flex; gap: 5px; margin-bottom: 15px; }
.kungfu-view-button { padding: 8px 16px; background: #f0f0f0; border-radius: 4px; cursor: pointer; font-size: 14px; transition: background 0.2s; }
.kungfu-view-button:hover { background: #e0e0e0; }
.kungfu-view-button.active { background: #0073aa; color: #fff; }

/* Search */
.kungfu-search-wrapper { position: relative; display: inline-block; width: 100%; max-width: 300px; }
.kungfu-clear-search-btn { display: none; position: absolute; right: 5px; top: 50%; transform: translateY(-50%); background: none; border: none; font-size: 18px; cursor: pointer; color: #aaa; }

/* View containers */
.kungfu-view-container { margin-top: 10px; }
.kungfu-students-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; }

/* Student card header */
.student-header { 
	margin-bottom: 8px;
	padding-bottom: 10px;
	border-bottom: 1px solid #333;
	flex-shrink: 0;
	overflow-x: scroll;
	text-align: center;
}
.student-header h3 { text-transform: uppercase; margin: 0 0 5px; font-size: 18px; }
.student-avatar { 
	margin-bottom: 10px;
	margin-top: 16px;
	text-align: center;
}
.student-avatar img {
  box-shadow: 0 0 20px rgba(0, 128, 255, 0.7), 0 0 20px rgba(0, 128, 255, 0.5);
}

/* Student info points */
.student-info-points { margin: 10px 0; }
.kungfu-total-points { text-align: center; }
.total-rate-title { margin: 0; font-size: 14px; color: #666; }
.total-points { font-size: 24px; font-weight: bold; color: #0073aa; }
.total-points-subtitle { display: block; font-size: 12px; color: #999; margin-top: 3px; }

/* Table view */
.kungfu-students-table { display: none; }
.kungfu-student-row { display: flex; align-items: center; gap: 15px; padding: 12px; border-bottom: 1px solid #eee; }
.kungfu-student-row:hover { background: #f9f9f9; }
.kungfu-table-cell { flex: 1; }
.kungfu-table-cell:first-child { flex: 0 0 60px; }
.kungfu-table-cell a { color: #0073aa; text-decoration: none; font-weight: 500; }
.kungfu-table-cell a:hover { text-decoration: underline; }

/* Student details page */
.kungfu-student-details { max-width: 800px; margin: 0 auto; padding: 20px; }
.kungfu-student-personal-card { 
  background-color: #111;
  border: 2px solid #222;
  border-radius: 12px;
  padding: 12px 16px;
  max-width: 800px;
  margin: 0 auto;
  margin-top: 0px;
  position: relative;
  font-weight: bold;
}

/* Navigation icons */
.nav { 
  display: flex;
  flex-direction: column;
  position: absolute;
  z-index: 999;
  gap: 16px;
}
.nav a { color: #555; text-decoration: none; }
.nav a:hover { color: #0073aa; }

/* Text status */
.text-status-container { margin: 10px 0; }
.student-status-text { font-style: italic; color: #555; font-size: 14px; margin: 5px 0; }

/* Student info block */
.student-info { display: flex; flex-direction: column; gap: 15px; margin: 20px 0; }
.student-info-items { text-align: left; }
.student-info-items p { margin: 5px 0; font-size: 14px; color: #333; }

/* Progress text */
.progress-text { text-align: center; font-size: 13px; color: #666; margin: 5px 0; }
.progress-percent-text { font-size: 14px; }
.plus-points { color: #0073aa; font-weight: bold; }
.progress-bar-container { background: #eee; border-radius: 10px; height: 22px; overflow: hidden; margin: 10px auto; max-width: 300px; }
.progress-bar-container .progress-bar-fill { width: var(--progress-width); height: 100%; }

/* Achievement items in profile */
.achievements-list { display: flex; flex-direction: column; gap: 15px; margin: 20px 0; }
.achievement-item { display: flex; align-items: flex-start; gap: 15px; padding: 15px; border-radius: 8px; position: relative; }
.achievement-item-icon { flex: 0 0 80px; }
.achievement-item-icon img { max-width: 100%; height: auto; border-radius: 4px; }
.achievement-item-details { flex: 1; }
.achievement-item-details h3 { margin: 0 0 5px; font-size: 16px; color: #333; }
.achievement-item-details p { margin: 5px 0; font-size: 13px; color: #666; }
.achievement-meta-details { font-size: 12px; color: #999; }

/* Share button */
.share-button-wrap { flex: 0 0 40px; }
.share-achievement { background: none; border: 1px solid #ddd; border-radius: 50%; width: 36px; height: 36px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.share-achievement:hover { background: #0073aa; border-color: #0073aa; color: #fff; }

/* Share modal */
.share-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1000; display: flex; align-items: center; justify-content: center; }
.share-modal-content { background: #fff; border-radius: 12px; padding: 25px; max-width: 500px; width: 90%; max-height: 90vh; overflow-y: auto; }
.share-modal-header { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; }
.share-modal-header h3 { margin: 0; font-size: 18px; flex: 1; text-align: center; }
.share-modal-close { background: none; border: none; font-size: 14px; color: #0073aa; cursor: pointer; font-weight: 600; padding: 5px 10px; }
.share-desc { text-align: center; color: #666; font-size: 14px; margin: 10px 0; }
.share-modal label { display: block; font-weight: 600; font-size: 13px; margin: 10px 0 5px; color: #333; }
.share-modal-actions { display: flex; gap: 10px; align-items: flex-start; }
.share-modal-actions textarea { width: 80%; height: 80px; font-size: 14px; padding: 5px; border: 1px solid #ddd; border-radius: 4px; }
.share-modal-actions button { padding: 8px 16px; background: #0073aa; color: #fff; border: none; border-radius: 4px; cursor: pointer; font-size: 13px; }
.share-modal-actions button:hover { background: #005a87; }
.share-modal-actions.format-switcher { justify-content: center; }
.format-switcher button { background: #f0f0f0; color: #333; }
.format-switcher button:hover { background: #e0e0e0; }

/* Statistics section */
.stat-desc { font-size: 13px; color: #666; margin: 10px 0; text-align: center; }
.stat-wrap { margin: 20px 0; }

/* Notices */
.kungfu-notice { padding: 15px; background: #f8d7da; color: #721c24; border-radius: 6px; text-align: center; margin: 20px 0; }

/* Responsive */
@media (max-width: 768px) {
    .kungfu-student-header { flex-direction: column; text-align: center; }
    .kungfu-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .kungfu-bar-chart { overflow-x: auto; }

    .kungfu-frontend-students { padding: 10px; }
    .kungfu-division-tabs { justify-content: center; }
    .kungfu-students-grid { justify-content: center; }
    .kungfu-student-card { max-width: 100%; }
    .kungfu-student-details { padding: 10px; }
    .kungfu-student-personal-card { padding: 15px; }
    .achievement-item { flex-direction: column; align-items: center; text-align: center; }
    .achievement-item-icon { flex: 0 0 auto; }
    .share-button-wrap { position: absolute; top: 10px; right: 10px; }
    .share-modal-content { padding: 15px; }
    .share-modal-actions { flex-direction: column; }
    .share-modal-actions textarea { width: 100%; }
    .kungfu-student-row { flex-wrap: wrap; gap: 8px; }
    .kungfu-table-cell:first-child { flex: 0 0 50px; }
    .kungfu-table-cell:last-child { flex: 0 0 100%; text-align: right; }
}
