/* Records page specific styles */

.header-nav {
	margin-top: 15px;
}

.nav-link {
	color: #007bff;
	text-decoration: none;
	font-size: 16px;
	padding: 8px 16px;
	border-radius: 5px;
	transition: background-color 0.3s;
}

.nav-link:hover {
	background-color: rgba(0, 123, 255, 0.1);
}

.records-stats {
	background: white;
	padding: 20px;
	border-radius: 10px;
	margin-bottom: 20px;
	box-shadow: 0 2px 10px rgba(0,0,0,0.1);
	display: flex;
	gap: 30px;
}

.stat-item {
	display: flex;
	align-items: center;
	gap: 8px;
}

.stat-label {
	color: #666;
	font-size: 14px;
}

.stat-value {
	color: #333;
	font-size: 20px;
	font-weight: bold;
}

.table-container {
	background: white;
	border-radius: 10px;
	padding: 20px;
	box-shadow: 0 2px 10px rgba(0,0,0,0.1);
	overflow-x: auto;
	min-height: 400px;
}

#recordsTable {
	width: 100%;
	border-collapse: collapse;
}

#recordsTable thead {
	background: #f8f9fa;
	position: sticky;
	top: 0;
	z-index: 10;
}

#recordsTable th {
	padding: 12px;
	text-align: left;
	font-weight: 600;
	color: #333;
	border-bottom: 2px solid #dee2e6;
	white-space: nowrap;
}

#recordsTable td {
	padding: 12px;
	border-bottom: 1px solid #e9ecef;
	vertical-align: middle;
}

#recordsTable tbody tr {
	transition: background-color 0.2s;
}

#recordsTable tbody tr:hover {
	background-color: #f8f9fa;
}

/* 控制每列宽度 */
#recordsTable th:nth-child(1),
#recordsTable td:nth-child(1) {
	width: 150px;  /* 用戶名稱 */
}

#recordsTable th:nth-child(2),
#recordsTable td:nth-child(2) {
	width: 150px;  /* 遊戲/分類 */
}

#recordsTable th:nth-child(3),
#recordsTable td:nth-child(3) {
	width: 300px;  /* 內容 */
}

#recordsTable th:nth-child(4),
#recordsTable td:nth-child(4) {
	width: 120px;  /* 圖片 */
}

#recordsTable th:nth-child(5),
#recordsTable td:nth-child(5) {
	width: 250px;  /* 警告原因 */
}

#recordsTable th:nth-child(6),
#recordsTable td:nth-child(6) {
	width: 100px;  /* 標記時間 */
}

#recordsTable th:nth-child(7),
#recordsTable td:nth-child(7) {
	width: 150px;  /* 操作 */
}

.record-image {
	width: 80px;
	height: 80px;
	object-fit: cover;
	border-radius: 8px;
	cursor: pointer;
}

.record-image:hover {
	opacity: 0.8;
}

.user-info {
	display: flex;
	align-items: center;
	gap: 10px;
}

.user-avatar-small {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
}

.user-name {
	font-weight: 500;
}

.record-caption {
	max-width: 300px;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	line-height: 1.4;
}

.game-cate-info {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.tag {
	display: inline-block;
	padding: 4px 8px;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 500;
}

.game-tag {
	background: #e3f2fd;
	color: #1976d2;
}

.category-tag {
	background: #f3e5f5;
	color: #7b1fa2;
}

.warning-reasons {
	max-width: 250px;
}

.warning-tag {
	display: inline-block;
	background: #ffebee;
	color: #c62828;
	padding: 4px 8px;
	border-radius: 4px;
	font-size: 11px;
	margin: 2px;
}

.time-text {
	font-size: 13px;
	color: #666;
	white-space: nowrap;
}

.action-buttons {
	display: flex;
	gap: 8px;
}

.btn {
	padding: 6px 12px;
	border: none;
	border-radius: 5px;
	cursor: pointer;
	font-size: 13px;
	transition: all 0.3s;
	text-decoration: none;
	display: inline-block;
}

.btn-view {
	background: #007bff;
	color: white;
}

.btn-view:hover {
	background: #0056b3;
}

.btn-delete {
	background: #dc3545;
	color: white;
}

.btn-delete:hover {
	background: #c82333;
}

.pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 20px;
	margin-top: 30px;
}

.pagination button {
	padding: 10px 20px;
	border: none;
	border-radius: 5px;
	background: #007bff;
	color: white;
	cursor: pointer;
	transition: background 0.3s;
}

.pagination button:hover {
	background: #0056b3;
}

.pagination button:disabled {
	background: #ccc;
	cursor: not-allowed;
}

#pageInfo {
	color: #666;
	font-size: 14px;
}

.loading {
	text-align: center;
	padding: 40px;
	color: #666;
	font-size: 16px;
}

.error-message {
	text-align: center;
	padding: 40px;
	color: #dc3545;
	font-size: 16px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
	.record-caption {
		max-width: 200px;
	}
	
	.warning-reasons {
		max-width: 180px;
	}
}

@media (max-width: 768px) {
	.table-container {
		padding: 10px;
	}
	
	#recordsTable th,
	#recordsTable td {
		padding: 8px;
		font-size: 13px;
	}
	
	.record-image {
		width: 60px;
		height: 60px;
	}
	
	.user-avatar-small {
		width: 30px;
		height: 30px;
	}
	
	.record-caption,
	.warning-reasons {
		max-width: 150px;
	}
	
	.action-buttons {
		flex-direction: column;
	}
}
