@charset "utf-8";
/* ==========================================================================
 * Rohan2 - Yılbaşı (Xmas) Teması
 * Yalnızca config_flags.php içinde ENABLE_XMAS_THEME = 1 iken yüklenir.
 * Tüm kurallar body.xmas-theme altında; tema kapalıyken hiçbir etkisi yoktur.
 * ========================================================================== */

body.xmas-theme {
	background: url(../images/bg-xmas.jpg) fixed;
	/* WebP (290 KB) destekleyen tarayıcılarda; desteklemeyenler yukarıdaki JPG'yi (980 KB) kullanır */
	background-image: image-set(url(../images/bg-xmas.webp) type("image/webp"), url(../images/bg-xmas.jpg) type("image/jpeg"));
	background-repeat: no-repeat;
	background-size: cover;
}

/* --- Yılbaşı ışıkları --- */
.xmas-theme .light-string {
	position: absolute;
	top: 0; left: 0; width: 100%; height: 20px;
	z-index: 2000;
	display: flex;
	justify-content: space-around;
	pointer-events: none;
}

.xmas-theme .bulb {
	width: 12px; height: 12px;
	border-radius: 50%;
	background: #444;
	margin-top: 47px;
	animation: xmas-flash 2s infinite alternate;
	position: relative;
}

.xmas-theme .bulb::before {
	content: ''; position: absolute; top: -5px; left: 4px;
	width: 4px; height: 6px; background: #222;
}

.xmas-theme .bulb:nth-child(odd)  { background: #d42426; animation-delay: 0s;   box-shadow: 0 0 10px #d42426; }
.xmas-theme .bulb:nth-child(even) { background: #0f3b1e; animation-delay: 1s;   box-shadow: 0 0 10px #0f3b1e; }
.xmas-theme .bulb:nth-child(3n)   { background: #f8b229; animation-delay: 0.5s; box-shadow: 0 0 10px #f8b229; }

@keyframes xmas-flash {
	0%   { opacity: 0.4; transform: scale(0.9); }
	100% { opacity: 1; transform: scale(1.1); box-shadow: 0 0 20px currentColor; }
}

/* --- Çelenk & hediye kesesi süsleri --- */
.xmas-theme .xmas-animations {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	/* z-index yok: çocuklar kendi katmanlarını ayrı ayrı belirler */
	pointer-events: none;
}

/* Çelenk: içeriğin önünde */
.xmas-theme .xmas-animations .lantern {
	position: absolute;
	top: 20px;
	left: 7.7%;
	z-index: 9999;
}

/* Noel Baba torbası: sayfa içeriğinin arkasında */
.xmas-theme .xmas-animations .moon {
	position: fixed;
	top: 440px;
	left: 72%;
	z-index: -1;
}

/* --- Sunucu başlık/açıklama okunurluğu ---
 * Karlı arka planda yazılar kayboluyordu. Sayaç kutusundaki (.data-bg) koyu şerit
 * ve altın çizgi, başlık + açıklamanın arkasına da uygulanır. Şeridin alt kısmı
 * sayaç kutusunun üst çizgisine denk gelir; ikisi tek panel gibi görünür.
 * (.AngmarDesc kutusu, -33px marjlı .AngmarTitle'ı da kapsadığı için arka plan ona verilir.)
 */
.xmas-theme .AngmarDesc {
	background:
		linear-gradient(90deg, rgba(191, 162, 81, 0), #ca9342, rgba(191, 162, 81, 0)) top / 100% 4px no-repeat,
		linear-gradient(90deg, transparent 0, rgba(0, 0, 0, .55) 25%, rgba(0, 0, 0, .80) 85%, transparent) top / 100% calc(100% - 24px) no-repeat;
}

/* Mobil sayaç kutusu içeriğe göre daralıyordu (380px); üstteki başlık şeridiyle
 * (sunucu kolonu genişliği) aynı boyda olsun. Inline stildeki !important'ı ezmek
 * için seçici daha spesifik tutuldu. */
.xmas-theme .countdown-wrapper.data-bg.combined-uptime-box.mobile-countdown-style {
	min-width: 100% !important;
}

/* Başlık şeridi ile sayaç kutusu arasındaki birleşim çizgisi (sayaç kutusunun
 * üst altın çizgisi) daha ince: 4px -> 2px */
.xmas-theme .AngmarDesc ~ .countdown-wrapper.data-bg::before {
	height: 2px;
}

/* Üst menünün alt altın çizgisi daha belirgin (ışıkların asıldığı tel):
 * 1px soluk -> 2px parlak altın + hafif ışıltı */
.xmas-theme .top-panel {
	border-bottom: 2px solid #f0b955;
	box-shadow: 0 1px 6px rgba(240, 185, 85, 0.55);
}

/* --- Yılbaşı 3D Pet (Budaklı Yılbaşı Ağacı) - assets/js/xmas_pet.js --- */
.xmas-pet-stage {
	position: fixed;
	left: 60%;
	bottom: 60px;
	z-index: 950; /* alttaki duyuru şeridinin (900) üstünde */
	pointer-events: none;
	user-select: none;
	opacity: 0;
	transition: opacity .6s ease;
	will-change: left;
}
.xmas-pet-stage.is-ready { opacity: 1; }

.xmas-pet-canvas {
	width: 100%;
	height: 100%;
	cursor: pointer;
	pointer-events: auto;
	filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .75));
	transition: transform .25s cubic-bezier(.16, 1, .3, 1);
}
.xmas-pet-canvas:hover { transform: scale(1.04); }

.xmas-pet-stage.is-happy .xmas-pet-canvas {
	animation: xmas-pet-hop .55s ease-out 2;
}
@keyframes xmas-pet-hop {
	0%, 100% { transform: translateY(0); }
	40%      { transform: translateY(-16px); }
}

@media (max-width: 768px) {
	.xmas-pet-stage { display: none !important; }
}

/* Pet konuşma balonu: sitenin koyu panel + altın çizgi stiliyle */
.xmas-pet-bubble {
	position: absolute;
	left: 50%;
	bottom: 190px; /* JS, modelin başına göre yeniden hesaplar */
	transform: translate(-50%, 6px) scale(.96);
	width: max-content;
	max-width: 260px;
	padding: 10px 14px;
	background: linear-gradient(180deg, rgba(26, 18, 10, .96), rgba(12, 9, 5, .96));
	border: 1px solid #ca9342;
	border-radius: 10px;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .55), 0 0 10px rgba(202, 147, 66, .25);
	color: #fff0d2;
	font-family: 'Roboto Slab', serif;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
	text-align: center;
	text-shadow: 0 0 4px #000;
	text-transform: none;
	opacity: 0;
	pointer-events: none;
	transition: opacity .35s ease, transform .35s ease;
}
/* Balon kuyruğu */
.xmas-pet-bubble::after {
	content: '';
	position: absolute;
	left: 50%;
	bottom: -7px;
	width: 12px;
	height: 12px;
	background: #0c0905;
	border-right: 1px solid #ca9342;
	border-bottom: 1px solid #ca9342;
	transform: translateX(-50%) rotate(45deg);
}
.xmas-pet-bubble.is-visible {
	opacity: 1;
	transform: translate(-50%, 0) scale(1);
}
.xmas-pet-bubble.is-visible.is-link {
	cursor: pointer;
	pointer-events: auto;
}
.xmas-pet-bubble.is-link .xmas-pet-bubble-text::after {
	content: ' ↓';
	color: #f0b955;
}

/* Kar tüm sayfada yağsın: katman ekrana sabitlenir (önceden yalnızca ilk ekran yüksekliğindeydi) */
.xmas-theme #snow-canvas {
	position: fixed;
	inset: 0;
	width: 100vw;
	height: 100vh;
}

/* Alt bilgi yazıları karlı zeminde okunsun: sitenin altın tonunun koyu bronz hali,
 * üzerine gelince yılbaşı kırmızısı. (Kopya hakkı, slogan, GİŞ, Ceza Yönetmeliği,
 * Toplist ve en alttaki bağlantı satırı) */
.xmas-theme .footer-mt .footer-text,
.xmas-theme .footer-mt a,
.xmas-theme .bottom-links a {
	color: #6b4413 !important;
	text-shadow: 0 1px 0 rgba(255, 255, 255, .55);
	transition: color .2s ease;
}
.xmas-theme .footer-mt a:hover,
.xmas-theme .bottom-links a:hover {
	color: #a3201f !important;
}

/* --- Yılbaşı geri sayımı (config_flags: ENABLE_NEWYEAR_COUNTDOWN) ---
 * Sunucu sayaçlarıyla aynı kutu stili (.mobile-countdown-style); onların -33px
 * yukarı kaydırması burada yok, kutu logo açıklamasının altında kendi yerinde durur. */
.xmas-theme .newyear-wrap {
	width: 100%;
	display: flex;
	justify-content: center;
	margin: 4px 0 18px;
}
.xmas-theme .countdown-wrapper.data-bg.mobile-countdown-style.newyear-countdown {
	top: 0;
	min-width: 340px !important;
}
.xmas-theme .newyear-countdown .date-header {
	text-transform: uppercase;
}
.xmas-theme .newyear-countdown[hidden],
.xmas-theme .newyear-tag[hidden] {
	display: none !important;
}
/* "Mutlu Yıllar!" etiketi: 1-15 Ocak arasında sayacın yerine */
.xmas-theme .newyear-tag {
	display: inline-block;
	padding: 8px 34px;
	font-family: 'Roboto Slab', serif;
	font-size: 2rem;
	font-weight: 700;
	color: #f8d27a;
	text-shadow: 0 0 6px #000, 0 0 14px rgba(212, 36, 38, .75);
	background: linear-gradient(90deg, transparent 0, rgba(0, 0, 0, .7) 20%, rgba(0, 0, 0, .7) 80%, transparent);
	border-top: 2px solid #ca9342;
	border-bottom: 2px solid #ca9342;
	transform: rotate(-3deg);
	animation: newyear-glow 2.4s ease-in-out infinite alternate;
}
@keyframes newyear-glow {
	from { text-shadow: 0 0 6px #000, 0 0 10px rgba(212, 36, 38, .55); }
	to   { text-shadow: 0 0 6px #000, 0 0 20px rgba(248, 178, 41, .9); }
}
@media (max-width: 768px) {
	.xmas-theme .countdown-wrapper.data-bg.mobile-countdown-style.newyear-countdown { min-width: 260px !important; }
	.xmas-theme .newyear-tag { font-size: 1.5rem; }
}

/* --- "Mutlu Yıllar!" etiketi (config_flags: ENABLE_HAPPY_NEWYEAR_TAG) ---
 * Sayfa akışında yer kaplamasın (Mobile'ı aşağı itmesin): arka plan gibi ekrana sabit,
 * içeriğin arkasında. Konum, arka plandaki kırmızı hediye paketinin üstüne denk gelir.
 * Arka plan "cover" ile ölçeklendiği için görsel boyutu max(100vw, 217.15vh) x
 * max(100vh, 46.05vw) olur (4812x2216) ve sol üstten hizalanır; nokta görselde %67.9 / %39. */
.xmas-theme .hero-content.newyear-hero {
	position: fixed;
	left: calc(0.679 * max(100vw, 217.15vh));
	top: calc(0.39 * max(100vh, 46.05vw));
	transform: translate(-50%, -50%);
	z-index: -1;
	margin: 0;
	padding: 0;
	max-width: none;
	white-space: nowrap;
	pointer-events: none;
	/* Masaüstünde 5 sn görünür, sonra yavaşça kaybolur (telefonda aşağıda kapatılır, kalıcıdır) */
	animation: newyearTagHide .8s ease 5s forwards;
}
@keyframes newyearTagHide {
	to { opacity: 0; visibility: hidden; }
}
.xmas-theme .newyear-hero .hero-event-tag {
	margin: 0;
}

/* --- Telefon / dokunmatik cihazlar ---
 * Sitede viewport meta etiketi olmadığından telefonlar ~980px genişlikte çizilir; genişlik
 * sorgusu tek başına yetmez, dokunmatik (hover yok) cihazlar da buraya dahil edilir. */
@media (hover: none), (max-width: 910px) {   /* mobile-header.css ile aynı sınır */
	/* "Mutlu Yıllar!": arka plandaki paket burada görünmüyor; etiket Mobile'ın hemen üstünde,
	 * açıklama şeridinin altındaki boşlukta durur. Negatif alt boşlukla Mobile'ı aşağı itmez. */
	.xmas-theme .hero-content.newyear-hero {
		position: relative;
		left: auto;
		top: auto;
		transform: none;
		z-index: 5;
		width: 100%;
		margin: 0 auto -70px;
		text-align: center;
		animation: none;   /* telefonda yazı kalıcı */
	}
	.xmas-theme .newyear-hero .hero-event-tag {
		font-size: 3rem;
		text-shadow: 0 0 6px #000, 0 0 14px rgba(0, 0, 0, .8);
	}
	/* Noel Baba torbası dar ekranda içeriğin ortasında kalıyor */
	.xmas-theme .xmas-animations .moon {
		display: none;
	}
}

/* Discord kutusunun üstünde biriken kar (index.php: snowPile, config_flags: ENABLE_XMAS_SNOW_PILE) */
.snow-pile {
	position: fixed;
	z-index: 10000; /* Discord kutusunun (9999) üstünde */
	pointer-events: none;
}
