/* === Temel Reset & Genel Ayarlar === */
*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	display: flex;
	min-height: 100vh;
	background: #f8f9fa;
	font-family: 'Poppins', sans-serif;
}

/* === Sidebar Temel Stili === */
.sidebar {
	width: 280px;
	background: #2D2D2D;
	color: #fff;
	position: fixed;
	height: 100vh;
	display: flex;
	flex-direction: column;
	transition: width 0.3s ease;
	overflow: hidden;
	box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
}

/* Sidebar kapalıysa genişliği daralt */
.sidebar.collapsed {
	width: 80px;
}

/* === Sidebar Header (Logo vs.) === */
.sidebar-header {
	padding: 15px 20px;
	background: #1F1F1F;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	text-align: center;
}

.logo {
	width: 160px;
	height: auto;
	transition: width 0.3s ease;
}

/* Sidebar kapalıyken logoyu küçült */
.sidebar.collapsed .logo {
	width: 40px;
}

/* === Sidebar Menü (Nav Items) === */
.sidebar-menu {
	flex: 1;
	padding: 20px 0;
}

.nav-item {
	margin-bottom: 8px;
	/* Normal durumda dış padding uyguluyoruz */
	padding: 0 15px;
}

.nav-link {
	display: block;
	color: #E0E0E0;
	background: transparent;
	padding: 12px 15px;
	border-radius: 8px;
	transition: all 0.3s ease;
	text-decoration: none;
	overflow: hidden;
}

/* Nav-link için hover durumunda sağa kaydırma */
.nav-link:hover {
	background: #FF6B00;
	color: #fff;
	transform: translateX(5px);
}

/* Nav-link aktif olduğunda (seçili) konum sabit kalsın, renkler aynı */
.nav-link.active {
	background: #FF6B00;
	color: #fff;
	transform: translateX(0px);
}


/* Nav içeriği: İkon ve metin */
.nav-link-content {
	display: flex;
	align-items: center;
	gap: 12px;
}

.nav-link-content i {
	font-size: 18px;
	width: 20px;
	text-align: center;
}

.nav-link-content span {
	font-size: 15px;
	font-weight: 500;
	transition: opacity 0.3s ease;
}

/* Sidebar kapalıyken nav link’lerde daralma ve içerik ortalama */
.sidebar.collapsed .nav-item {
	padding: 0 10px;
}

.sidebar.collapsed .nav-link {
	padding: 10px;
	text-align: center;
}

.sidebar.collapsed .nav-link-content {
	gap: 0;
	justify-content: center;
}

/* Eğer metinleri tamamen gizlemek istersen: */
.sidebar.collapsed .nav-link-content span {
	display: none;
}

/* === Toggle Düğmesi === */
/* Toggle düğmesi logout butonunun üstüne gelecek şekilde footer öncesinde yer alacak */
.sidebar-toggle-container {
	padding: 10px 0;
	text-align: center;
}

.sidebar-toggle {
	background: transparent;
	border: none;
	color: #fff;
	font-size: 18px;
	cursor: pointer;
	transition: color 0.3s ease;
}

.sidebar-toggle:hover {
	color: #FF6B00;
}

/* === Sidebar Footer (Çıkış Yap Butonu) === */
.sidebar-footer {
	background: #1F1F1F;
	padding: 20px 15px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.logout-link {
	display: block;
	color: #FF6B00;
	background: rgba(255, 107, 0, 0.1);
	padding: 12px 15px;
	border-radius: 8px;
	text-decoration: none;
	transition: all 0.3s ease;
}

.logout-link:hover {
	background: #FF6B00;
	color: #fff;
}

/* === Content Alanı === */
.content {
	margin-left: 280px;
	margin-top: 60px;
	padding: 25px;
	width: calc(100% - 280px);
	transition: margin-left 0.3s ease, width 0.3s ease;
}

/* Sidebar kapalıyken content genişliğini ayarla */
.sidebar.collapsed~.content {
	margin-left: 80px;
	width: calc(100% - 80px);
}

/* === Ek Kart & Buton Stilleri (Örnek) === */
.card {
	border: none;
	border-radius: 12px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.card-title {
	color: #FF6B00;
}

.btn-primary {
	background: #FF6B00;
	border: none;
	padding: 10px 20px;
	border-radius: 6px;
	color: #fff;
	transition: background 0.3s ease;
}

.btn-primary:hover {
	background: #E66000;
}

/* === Responsive Ayarlar === */
@media (max-width: 768px) {
	.sidebar {
		width: 100%;
		height: auto;
		position: relative;
	}

	.content {
		margin-left: 0;
		width: 100%;
	}
}

.page-input,
.page-button {
	height: 38px;
	/* İstediğiniz sabit yüksekliği belirleyin */
	line-height: 38px;
	/* Buton içerisindeki metnin ortalanması için */
}

.input-group .form-control {
	height: 38px;
	/* İstediğiniz sabit yüksekliği belirleyin */
}

.input-group .btn {
	height: 38px;
	/* Butonun yüksekliğini eşitleyin */
}

.dashboard-container {
	padding: 20px;
	background: #f8f9fa;
}

.welcome-card {
	background: linear-gradient(135deg, #6B73FF 0%, #000DFF 100%);
	border-radius: 8px;
	padding: 20px;
	margin-bottom: 20px;
	color: #fff;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.welcome-title {
	font-size: 1.3rem;
}

.welcome-text {
	font-size: 0.9rem;
}

.stats-card {
	border-radius: 8px;
	padding: 15px;
	margin-bottom: 15px;
	color: #fff;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stats-icon {
	font-size: 1.5rem;
	margin-bottom: 10px;
	color: rgba(255, 255, 255, 0.9);
}

.stats-number {
	font-size: 1.5rem;
	font-weight: 500;
	margin-bottom: 5px;
	color: #fff;
}

.stats-label {
	font-size: 0.9rem;
	color: rgba(255, 255, 255, 0.9);
}

.stats-label-premium {
	opacity: 0.9;
	font-size: 0.8rem;
}

.stats-label-free {
	opacity: 0.9;
	font-size: 0.8rem;
}

.game-section {
	margin-bottom: 25px;
	background: #fff;
	border-radius: 8px;
	padding: 20px;
	border: 1px solid #e0e0e0;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.game-title {
	color: #333;
	font-size: 1.2rem;
	margin-bottom: 15px;
	font-weight: 500;
	padding-bottom: 10px;
	border-bottom: 1px solid #e0e0e0;
}

.stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 15px;
	margin-bottom: 20px;
}

/* Word Party Kart Renkleri */
.card-total {
	background: linear-gradient(135deg, #FF6B6B 0%, #FF8E8E 100%);
}

.card-premium {
	background: linear-gradient(135deg, #4ECDC4 0%, #45B7AF 100%);
}

.card-turkish {
	background: linear-gradient(135deg, #FFD166 0%, #FFB347 100%);
}

.card-english {
	background: linear-gradient(135deg, #06D6A0 0%, #05B888 100%);
}

/* Quiz Game Kart Renkleri */
.card-questions {
	background: linear-gradient(135deg, #A78BFA 0%, #8B5CF6 100%);
}

.card-tr {
	background: linear-gradient(135deg, #F472B6 0%, #DB2777 100%);
}

.card-en {
	background: linear-gradient(135deg, #60A5FA 0%, #3B82F6 100%);
}

/* Zorluk Seviyesi Kart Renkleri */
.card-easy {
	background: linear-gradient(135deg, #34D399 0%, #059669 100%);
}

.card-med {
	background: linear-gradient(135deg, #FBBF24 0%, #D97706 100%);
}

.card-hard {
	background: linear-gradient(135deg, #F87171 0%, #DC2626 100%);
}

@media (max-width: 768px) {
	.stats-grid {
		grid-template-columns: 1fr;
	}

	.dashboard-container {
		padding: 15px;
	}
}

/* ==========================================
   TOPBAR - Contextual Toolbar
   ========================================== */
.topbar {
	position: fixed;
	top: 0;
	left: 280px;
	right: 0;
	height: 60px;
	background: #2D2D2D;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 24px;
	z-index: 1050;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	transition: left 0.3s ease;
}

.sidebar.collapsed~.topbar {
	left: 80px;
}

.topbar-left {
	display: flex;
	align-items: center;
	gap: 20px;
	overflow: hidden;
}

.topbar-page-title {
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	margin: 0;
	white-space: nowrap;
	display: flex;
	align-items: center;
	gap: 10px;
}

.topbar-page-title i {
	color: #FF6B00;
	font-size: 18px;
}

.topbar-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.topbar .topbar-actions .topbar-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 14px;
	font-size: 13px;
	font-weight: 500;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	text-decoration: none;
	white-space: nowrap;
	transition: all 0.2s ease;
	line-height: 1.4;
}

.topbar .topbar-actions .topbar-btn-primary {
	background: #FF6B00;
	color: #fff;
}

.topbar .topbar-actions .topbar-btn-primary:hover {
	background: #E66000;
	color: #fff;
	text-decoration: none;
}

.topbar .topbar-actions .topbar-btn-success {
	background: #28a745;
	color: #fff;
}

.topbar .topbar-actions .topbar-btn-success:hover {
	background: #218838;
	color: #fff;
	text-decoration: none;
}

.topbar .topbar-actions .topbar-btn-danger {
	background: #dc3545;
	color: #fff;
}

.topbar .topbar-actions .topbar-btn-danger:hover {
	background: #c82333;
	color: #fff;
	text-decoration: none;
}

.topbar .topbar-actions .topbar-btn-secondary {
	background: rgba(255, 255, 255, 0.12);
	color: #E0E0E0;
}

.topbar .topbar-actions .topbar-btn-secondary:hover {
	background: rgba(255, 255, 255, 0.22);
	color: #fff;
	text-decoration: none;
}

.topbar-right {
	display: flex;
	align-items: center;
}

.topbar-profile {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 6px 12px;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.2s;
	position: relative;
}

.topbar-profile:hover {
	background: rgba(255, 255, 255, 0.08);
}

.topbar-avatar {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: linear-gradient(135deg, #FF6B00, #E66000);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 14px;
	flex-shrink: 0;
}

.topbar-username {
	color: #E0E0E0;
	font-size: 14px;
	font-weight: 500;
}

.topbar-chevron {
	color: #888;
	font-size: 11px;
	transition: transform 0.2s;
}

.topbar-dropdown {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	background: #2D2D2D;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 8px;
	min-width: 180px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-8px);
	transition: all 0.2s ease;
}

.topbar-dropdown.show {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.topbar-dropdown-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 16px;
	color: #E0E0E0;
	text-decoration: none;
	font-size: 14px;
	transition: all 0.2s;
	border-radius: 8px;
}

.topbar-dropdown-item:hover {
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	text-decoration: none;
}

.topbar-dropdown-item.logout {
	color: #FF6B00;
}

.topbar-dropdown-item.logout:hover {
	background: rgba(255, 107, 0, 0.12);
	color: #FF6B00;
}

@media (max-width: 768px) {
	.topbar {
		left: 0;
		padding: 0 12px;
	}

	.sidebar.collapsed~.topbar {
		left: 0;
	}

	.topbar-page-title {
		font-size: 14px;
	}

	.topbar-actions .topbar-btn span {
		display: none;
	}

	.topbar-actions .topbar-btn {
		padding: 7px 10px;
	}

	.topbar-username {
		display: none;
	}
}

/* === Premium Form & DataTables Layout === */

/* Base Layout */
.content-grid {
	display: grid;
	grid-template-columns: 1fr 2fr;
	gap: 24px;
	padding: 24px;
	width: 100%;
	align-items: start;
	/* Let each column determine its height, no stretching */
}

@media (max-width: 991px) {
	.content-grid {
		grid-template-columns: 1fr;
	}
}

/* rc-modal styles applied to containers */
.rc-modal-content {
	background: #ffffff;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
	border: 1px solid rgba(0, 0, 0, 0.05);
	display: flex;
	flex-direction: column;
	width: 100%;
	/* Removed height: 100% so the form only takes up the space it actually needs vertically, eliminating the empty gap below it. */
}

.rc-modal-header {
	background: linear-gradient(135deg, #2D2D2D 0%, #3a3a3a 100%);
	padding: 20px 24px;
	color: white;
	display: flex;
	align-items: center;
	gap: 12px;
	border-bottom: 2px solid #ea580c;
}

.rc-modal-header i {
	color: #ea580c;
	font-size: 1.25rem;
}

.rc-modal-title {
	margin: 0;
	font-size: 1.1rem;
	font-weight: 600;
	letter-spacing: 0.5px;
}

.rc-modal-body {
	padding: 24px;
	background: #f8fafc;
}

/* Form Elements */
.rc-form-section {
	background: white;
	padding: 20px;
	border-radius: 12px;
	border: 1px solid #e2e8f0;
	margin-bottom: 20px;
}

.rc-form-group {
	margin-bottom: 16px;
}

.rc-form-group:last-child {
	margin-bottom: 0;
}

.rc-form-label {
	display: block;
	font-size: 0.875rem;
	font-weight: 600;
	color: #475569;
	margin-bottom: 6px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.rc-form-control {
	width: 100%;
	padding: 10px 14px;
	border: 2px solid #e2e8f0;
	border-radius: 8px;
	font-size: 0.95rem;
	color: #1e293b;
	transition: all 0.2s ease;
	background: white;
}

.rc-form-control:focus {
	outline: none;
	border-color: #ea580c;
	box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.1);
}

select.rc-form-control {
	height: auto;
	line-height: inherit;
}

select[multiple].rc-form-control {
	height: 120px;
}

/* Buttons */
.rc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 20px;
	font-weight: 600;
	font-size: 0.95rem;
	border-radius: 8px;
	transition: all 0.2s;
	border: none;
	cursor: pointer;
}

.rc-btn-primary {
	background: #ea580c;
	color: white;
}

.rc-btn-primary:hover {
	background: #c2410c;
	color: white;
}

.rc-btn-secondary {
	background: #e2e8f0;
	color: #475569;
}

.rc-btn-secondary:hover {
	background: #cbd5e1;
	color: #1e293b;
}

.rc-btn-danger {
	background: #ffe4e6;
	color: #e11d48;
}

.rc-btn-danger:hover {
	background: #fecdd3;
	color: #be123c;
}

.rc-form-actions {
	display: flex;
	align-items: center;
	gap: 12px;
}

.rc-modal-header-radius {
	border-radius: 12px 12px 0 0;
}

.rc-modal-subtitle {
	font-size: 0.85rem;
	font-weight: normal;
	margin-left: 8px;
	opacity: 0.8;
}

/* Badges */
.rc-badge {
	display: inline-flex;
	align-items: center;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.rc-badge-premium {
	background-color: #fef3c7;
	color: #d97706;
}

.rc-badge-normal {
	background-color: #f1f5f9;
	color: #475569;
}

.rc-badge-success {
	background-color: #dcfce7;
	color: #166534;
}

.rc-badge-warning {
	background-color: #fef9c3;
	color: #854d0e;
}

.rc-badge-danger {
	background-color: #fee2e2;
	color: #991b1b;
}

/* Premium Table Design */
.rc-table-wrapper {
	background: white;
	border-radius: 0;
	border: 1px solid #e2e8f0;
	width: 100%;
	display: flex;
	flex-direction: column;
	/* Removed height: 100% to let table be constrained by max-height if needed */
}

/* DataTables wrapper must stretch inside rc-table-wrapper */
.dataTables_wrapper {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	height: 100%;
	/* so inner flex works */
	overflow: hidden;
	/* Do not scroll the wrapper itself! */
}

/* Specific scrollable area for DataTables data, keeping top/bottom fixed */
.rc-table-scroll {
	overflow-y: auto;
	flex-grow: 1;
	scrollbar-width: thin;
	scrollbar-color: #cbd5e1 transparent;
	border-top: 1px solid #e2e8f0;
	border-bottom: 1px solid #e2e8f0;
	/* max-height is set so the table does not cause the page to overflow infinitely */
	max-height: calc(100vh - 340px);
	/* Height reduced by another 1% approx (total ~3%) */
}

.rc-table-scroll::-webkit-scrollbar {
	width: 6px;
	height: 6px;
}

.rc-table-scroll::-webkit-scrollbar-track {
	background: transparent;
}

.rc-table-scroll::-webkit-scrollbar-thumb {
	background-color: #cbd5e1;
	border-radius: 10px;
}

/* Modern Table Body */
table.dataTable {
	border-collapse: separate !important;
	border-spacing: 0;
	margin: 0 !important;
}

table.dataTable thead th {
	border-bottom: 2px solid #e2e8f0;
	color: #64748b;
	font-weight: 600;
	font-size: 0.875rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 16px 24px;
	border-top: none;
	position: sticky !important;
	top: 0 !important;
	background: #f8fafc !important;
	background-clip: padding-box;
	z-index: 100;
}

table.dataTable tbody td {
	padding: 16px;
	vertical-align: middle;
	color: #334155;
	font-size: 0.95rem;
	border-bottom: 1px solid #e2e8f0;
}

.rc-table-checkbox {
	width: 40px;
	text-align: center;
}

.rc-table-checkbox input[type="checkbox"] {
	cursor: pointer;
}

table.dataTable tbody tr:hover {
	background-color: #f8fafc;
}

/* Premium Badge */
.rc-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 4px 10px;
	border-radius: 9999px;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	text-align: center;
}

.rc-badge-premium {
	background: #fef08a;
	color: #854d0e;
	border: 1px solid #fde047;
	width: 95px;
}

.rc-badge-normal {
	background: #e2e8f0;
	color: #475569;
	width: 95px;
}

/* Table Action Buttons */
.rc-table-actions {
	display: flex;
	gap: 6px;
}

.rc-btn-icon {
	width: 32px;
	height: 32px;
	border-radius: 6px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: none;
	transition: all 0.2s;
	cursor: pointer;
}

.rc-btn-icon i {
	font-size: 0.875rem;
}

.rc-btn-icon.edit {
	background: #e0f2fe;
	color: #0369a1;
}

.rc-btn-icon.edit:hover {
	background: #bae6fd;
}

.rc-btn-icon.delete {
	background: #ffe4e6;
	color: #e11d48;
}

.rc-btn-icon.delete:hover {
	background: #fecdd3;
}

/* Error Message */
.error-message {
	color: #e11d48;
	font-size: 0.85rem;
	margin-top: 6px;
	font-weight: 500;
}

/* Language Selector Banner */
.rc-lang-banner {
	background: #fff7ed;
	border-left: 4px solid #ea580c;
	padding: 16px 20px;
	border-radius: 8px;
	margin-bottom: 24px;
	display: flex;
	align-items: center;
	gap: 16px;
}

.rc-lang-banner select {
	width: 200px;
}

/* Customizing DataTable Elements */
.dataTables_wrapper .row {
	margin: 0;
	padding: 12px 16px;
	background: white;
	align-items: center;
}

.dataTables_wrapper .top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px;
	background: white;
	border-bottom: 1px solid #e2e8f0;
}

.dataTables_wrapper .bottom {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px;
	background: white;
	border-top: 1px solid #e2e8f0;
}

/* Better responsive table specifically for mobile */
@media (max-width: 768px) {
	.table-responsive {
		border: 0;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.dataTables_wrapper .top,
	.dataTables_wrapper .bottom {
		flex-direction: column;
		gap: 12px;
		text-align: center;
	}
}

/* === Custom DataTables Navigation & Controls Styling === */
.dataTables_wrapper .dataTables_length select {
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	padding: 6px 28px 6px 12px;
	/* Sağdan ok işareti için yeterli boşluk (28px) */
	margin: 0 8px;
	/* Select'in metinden ayrılması için sağ-sol margin */
	background-color: #f8fafc;
	color: #334155;
	outline: none;
	transition: all 0.2s ease;
}

.dataTables_wrapper .dataTables_length select:focus {
	border-color: #ea580c;
	box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.2);
}

.dataTables_wrapper .dataTables_filter input {
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	padding: 4px 12px;
	background-color: #f8fafc;
	color: #334155;
	outline: none;
	transition: all 0.2s ease;
	margin-left: 8px;
}

.dataTables_wrapper .dataTables_filter input:focus {
	border-color: #ea580c;
	box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.2);
}

.dataTables_wrapper .dataTables_info {
	color: #64748b;
	font-size: 0.9rem;
	padding-top: 0.5rem;
}

.dataTables_wrapper .dataTables_paginate {
	padding-top: 0.5rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.page-item .page-link {
	border-radius: 6px;
	margin: 0 2px;
	border: 1px solid #e2e8f0;
	color: #475569;
	background: #ffffff;
	transition: all 0.2s;
	padding: 6px 12px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.page-item:not(.disabled):not(.active):hover .page-link {
	background-color: #fff7ed;
	color: #ea580c;
	border-color: #ea580c;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.page-item.active .page-link {
	background-color: #ea580c !important;
	border-color: #ea580c !important;
	color: white !important;
	font-weight: 600;
	box-shadow: 0 2px 4px rgba(234, 88, 12, 0.3);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.page-item.disabled .page-link {
	background-color: #f1f5f9;
	color: #94a3b8;
	border-color: #e2e8f0;
}