/* ============================================================
   Hiper Video Dersler - Frontend Styles
   ============================================================ */

.hiper-vd-wrapper {
	max-width: 1100px;
	margin: 0 auto;
	font-family: inherit;
}

/* ============================================================
   Navigasyon Satırları (Sınıf > Branş > Seri)
   ============================================================ */

.hvd-nav-row {
	margin-bottom: 6px;
	padding: 14px 18px;
	background: #fff;
	border: 1px solid #e8e8f0;
	border-radius: 12px;
}

.hvd-nav-row-label {
	font-size: 10px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	margin-bottom: 10px;
}

.hvd-nav-row-0 .hvd-nav-row-label { color: #5253af; }
.hvd-nav-row-1 .hvd-nav-row-label { color: #7b7ce8; }
.hvd-nav-row-2 .hvd-nav-row-label { color: #a5a6f0; }

.hvd-nav-row-btns {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

/* Butonlar */
.hvd-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 18px;
	border-radius: 50px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.15s ease;
	white-space: nowrap;
	line-height: 1;
}

/* Level 0: Sınıflar */
.hvd-btn-l0 {
	border: 2px solid #ddd;
	background: #fafafa;
	color: #444;
}
.hvd-btn-l0:hover {
	border-color: #5253af;
	color: #5253af;
	background: #f3f3ff;
}
.hvd-btn-l0.active {
	border-color: #5253af;
	background: #5253af;
	color: #fff;
}

/* Level 1: Branşlar */
.hvd-btn-l1 {
	border: 2px solid #e0e0f8;
	background: #f6f6ff;
	color: #555;
}
.hvd-btn-l1:hover {
	border-color: #7b7ce8;
	color: #5253af;
	background: #eeeeff;
}
.hvd-btn-l1.active {
	border-color: #7b7ce8;
	background: #7b7ce8;
	color: #fff;
}

/* Level 2: Seriler */
.hvd-btn-l2 {
	border: 2px solid #e8e8f8;
	background: #f9f9ff;
	color: #666;
	font-size: 12px;
	padding: 6px 14px;
}
.hvd-btn-l2:hover {
	border-color: #a5a6f0;
	color: #5253af;
	background: #f0f0ff;
}
.hvd-btn-l2.active {
	border-color: #a5a6f0;
	background: #a5a6f0;
	color: #fff;
}

/* Buton içindeki video sayısı etiketi */
.hvd-btn-count {
	display: inline-block;
	background: rgba(0,0,0,0.12);
	border-radius: 20px;
	font-size: 10px;
	font-weight: 700;
	padding: 1px 6px;
	min-width: 18px;
	text-align: center;
}
.hvd-btn.active .hvd-btn-count {
	background: rgba(255,255,255,0.25);
}

/* ============================================================
   Yükleniyor
   ============================================================ */
.hiper-vd-loading {
	display: flex;
	justify-content: center;
	padding: 40px 0;
}

.hiper-vd-spinner {
	width: 36px;
	height: 36px;
	border: 3px solid #e0e0e0;
	border-top-color: #5253af;
	border-radius: 50%;
	animation: hvd-spin 0.7s linear infinite;
}

@keyframes hvd-spin {
	to { transform: rotate(360deg); }
}

/* ============================================================
   Video Grid
   ============================================================ */
.hiper-vd-section-title {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #999;
	margin-bottom: 14px;
	margin-top: 20px;
}

.hiper-vd-videolar {
	margin-bottom: 30px;
}

.hiper-vd-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 18px;
}

/* ============================================================
   Video Kartı
   ============================================================ */
.hiper-vd-card {
	background: #fff;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(0,0,0,0.07);
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hiper-vd-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 24px rgba(0,0,0,0.13);
}

.hiper-vd-card-thumb {
	position: relative;
	padding-top: 56.25%;
	background: #111;
	overflow: hidden;
}

.hiper-vd-card-thumb img {
	position: absolute;
	top: 0; left: 0;
	width: 100%; height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.hiper-vd-card:hover .hiper-vd-card-thumb img {
	transform: scale(1.04);
}

.hiper-vd-card-play {
	position: absolute;
	top: 50%; left: 50%;
	transform: translate(-50%, -50%);
	width: 52px; height: 52px;
	background: rgba(0,0,0,0.55);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease;
}

.hiper-vd-card:hover .hiper-vd-card-play {
	background: #ff0000;
}

.hiper-vd-card-play svg {
	width: 22px; height: 22px;
	fill: #fff;
	margin-left: 3px;
}

.hiper-vd-card-badge {
	position: absolute;
	top: 8px; right: 8px;
	background: rgba(0,0,0,0.7);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	padding: 3px 8px;
	border-radius: 4px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.hiper-vd-card-badge.playlist {
	background: #1a73e8;
}

.hiper-vd-card-body {
	padding: 12px 14px;
}

.hiper-vd-card-title {
	font-size: 13px;
	font-weight: 600;
	color: #222;
	margin: 0 0 5px;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.hiper-vd-card-desc {
	font-size: 12px;
	color: #888;
	margin: 0;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ============================================================
   Boş / Hata
   ============================================================ */
.hiper-vd-empty,
.hiper-vd-no-video {
	padding: 30px;
	background: #f9f9f9;
	border-radius: 8px;
	text-align: center;
	color: #666;
}

/* ============================================================
   Modal Player
   ============================================================ */
.hiper-vd-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 99999;
	align-items: center;
	justify-content: center;
}

.hiper-vd-modal.open {
	display: flex;
}

.hiper-vd-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,0.82);
	cursor: pointer;
}

.hiper-vd-modal-box {
	position: relative;
	z-index: 1;
	background: #fff;
	border-radius: 12px;
	width: 92%;
	max-width: 920px;
	box-shadow: 0 20px 60px rgba(0,0,0,0.5);
	animation: hvd-modal-in 0.2s ease;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

@keyframes hvd-modal-in {
	from { transform: scale(0.93); opacity: 0; }
	to   { transform: scale(1);    opacity: 1; }
}

.hiper-vd-modal-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	padding: 16px 20px 12px;
	border-bottom: 1px solid #f0f0f0;
	gap: 12px;
}

.hiper-vd-modal-header-info {
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex: 1;
	min-width: 0;
}

.hiper-vd-modal-title {
	font-size: 17px;
	font-weight: 700;
	color: #1a1a1a;
	margin: 0;
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.hiper-vd-modal-counter {
	font-size: 12px;
	font-weight: 600;
	color: #5253af;
	background: #f0f0ff;
	padding: 2px 10px;
	border-radius: 20px;
	align-self: flex-start;
}

.hiper-vd-modal-close {
	flex-shrink: 0;
	background: #f5f5f5;
	border: none;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	font-size: 20px;
	color: #555;
	cursor: pointer;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s, color 0.15s;
	padding: 0;
}

.hiper-vd-modal-close:hover {
	background: #ffe0e0;
	color: #e53935;
}

.hiper-vd-modal-player {
	position: relative;
	padding-top: 56.25%;
	background: #000;
}

.hiper-vd-modal-player iframe,
.hiper-vd-modal-player #hiper-vd-yt-player {
	position: absolute;
	top: 0; left: 0;
	width: 100%; height: 100%;
	border: 0;
}

.hiper-vd-modal-footer {
	padding: 14px 20px;
	border-top: 1px solid #f0f0f0;
}

.hiper-vd-modal-desc {
	margin: 0 0 10px;
	font-size: 13px;
	color: #777;
	line-height: 1.5;
}

.hiper-vd-modal-desc:empty { display: none; }

.hiper-vd-modal-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.hiper-vd-nav-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 9px 18px;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	background: #fff;
	color: #333;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s;
}

.hiper-vd-nav-btn svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
}

.hiper-vd-nav-btn:hover:not(:disabled) {
	border-color: #5253af;
	color: #5253af;
	background: #f4f4ff;
}

.hiper-vd-nav-btn:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.hiper-vd-nav-pos {
	font-size: 13px;
	font-weight: 700;
	color: #888;
	white-space: nowrap;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 600px) {
	.hvd-btn-l0 { font-size: 12px; padding: 7px 14px; }
	.hvd-btn-l1 { font-size: 12px; padding: 6px 12px; }

	.hiper-vd-grid {
		grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
		gap: 12px;
	}

	.hiper-vd-modal-box { width: 95%; }
}
