/* wafflesonne stats — matched to main site theme */
* { box-sizing: border-box; }

body {
	background: linear-gradient(rgba(20, 26, 35, 0.55), rgba(20, 26, 35, 0.55)),
	            url("img/minecraft.jpg") no-repeat center center fixed;
	background-size: cover;
	font-family: "Open Sans", Helvetica, sans-serif;
	margin: 0;
	color: #fff;
	min-height: 100vh;
}

a { color: #ffb8c9; text-decoration: none; }
h3 { margin: 0 0 12px; font-size: 15px; letter-spacing: 0.4px; color: #ffd1dc; text-transform: lowercase; }

.page { max-width: 960px; margin: 0 auto; padding: 18px 14px 40px; }

/* header */
header { text-align: center; }
.logo { width: 190px; animation: logo 5s ease-in-out infinite; }
@keyframes logo { 0%,100% { transform: scale(1); } 50% { transform: scale(1.07); } }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 16px 0 10px; }
.tab {
	font-family: inherit; font-size: 14px; font-weight: bold; cursor: pointer;
	padding: 8px 16px; color: #e8e8e8;
	background: rgba(20, 26, 35, 0.72);
	border: 1px solid rgba(255, 209, 220, 0.25);
	border-radius: 5px 0 5px 0;
	transition: all 0.15s ease;
}
.tab:hover { transform: translateY(-1px); border-color: rgba(255, 209, 220, 0.6); }
.tab.active { background: rgba(255, 209, 220, 0.85); color: #141a23; border-color: transparent; }
.tabs a.tab { display: inline-block; line-height: 1.4; }

.meta { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px; color: #cfcfcf; margin-bottom: 14px; }
.ring { transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 3; }
.ring-bg { stroke: rgba(255,255,255,0.15); }
.ring-fg { stroke: #ffd1dc; stroke-linecap: round; stroke-dasharray: 62.83; transition: stroke-dashoffset 1s linear; }

/* panes */
.pane { display: none; }
.pane.active { display: block; animation: fadein 0.25s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; } }

/* cards */
.card {
	background: rgba(20, 26, 35, 0.78);
	border: 1px solid rgba(255, 209, 220, 0.14);
	border-radius: 5px 0 5px 0;
	padding: 14px 16px;
	margin-bottom: 14px;
}
.dim { color: #9aa4ae; font-size: 13px; }

/* live */
.livegrid { display: grid; grid-template-columns: 240px 1fr; gap: 14px; }
.bigpill { text-align: center; display: flex; flex-direction: column; justify-content: center; }
.pillcount { font-size: 44px; font-weight: bold; color: #ffd1dc; line-height: 1; }
.pillmax { font-size: 20px; color: #cfcfcf; }
.pilllabel { font-size: 12px; color: #cfcfcf; margin-top: 6px; }
.motd { font-size: 11px; color: #9aa4ae; margin-top: 10px; word-break: break-word; }
#spark { width: 100%; height: 110px; }
.sparklegend { font-size: 11px; color: #9aa4ae; margin-top: 6px; display: flex; justify-content: space-between; }

.activestrip { display: flex; flex-wrap: wrap; gap: 10px; }
.activestrip .who { display: flex; flex-direction: column; align-items: center; width: 64px; }
.activestrip img { width: 40px; height: 40px; image-rendering: pixelated; border-radius: 4px; background: rgba(255,255,255,0.06); }
.activestrip .who span { font-size: 11px; margin-top: 4px; max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.killfeed { display: flex; flex-direction: column; gap: 6px; }
.kill { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 6px 8px; background: rgba(255,255,255,0.04); border-radius: 5px 0 5px 0; }
.kill .kt { font-size: 10px; font-weight: bold; padding: 2px 6px; border-radius: 3px; text-transform: lowercase; }
.kill .when { margin-left: auto; font-size: 11px; color: #9aa4ae; white-space: nowrap; }
.kt-r { background: rgba(255, 107, 129, 0.25); color: #ff8ba0; }
.kt-c { background: rgba(160, 160, 160, 0.2); color: #cfcfcf; }
.kt-a { background: rgba(120, 220, 140, 0.18); color: #8fe6a8; }
.kt-n { background: rgba(255, 220, 120, 0.18); color: #ffe08a; }

/* tables */
.tablewrap { overflow-x: auto; padding: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-size: 11px; color: #ffd1dc; text-transform: lowercase; padding: 8px 10px; cursor: pointer; user-select: none; white-space: nowrap; }
th:hover { color: #fff; }
th.sorted::after { content: " ▾"; }
td { padding: 8px 10px; border-top: 1px solid rgba(255,255,255,0.06); }
tr.datarow { cursor: pointer; transition: background 0.12s; }
tr.datarow:hover { background: rgba(255, 209, 220, 0.07); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.toolbar { display: flex; gap: 8px; margin-bottom: 10px; }
#clansearch, .sortbtn {
	font-family: inherit; font-size: 13px; color: #fff;
	background: rgba(20, 26, 35, 0.78);
	border: 1px solid rgba(255, 209, 220, 0.25);
	border-radius: 5px 0 5px 0; padding: 8px 12px; outline: none;
}
#clansearch { flex: 1; max-width: 320px; }
#clansearch:focus { border-color: rgba(255, 209, 220, 0.7); }
.sortbtn { cursor: pointer; }
.sortbtn:hover { border-color: rgba(255, 209, 220, 0.7); }

/* clan roster expand */
.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; padding: 10px 6px; }
.member { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.04); padding: 6px 8px; border-radius: 5px 0 5px 0; font-size: 12px; }
.member img { width: 28px; height: 28px; image-rendering: pixelated; border-radius: 3px; }
.member .kd { margin-left: auto; color: #9aa4ae; font-size: 11px; }
.crown { color: #ffd1dc; }
.clanrel { font-size: 11px; color: #9aa4ae; padding: 2px 6px 8px; }

/* love */
.lovegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.lovecard { text-align: center; padding: 16px 10px; }
.lovecard .heads { display: flex; justify-content: center; align-items: center; gap: 6px; margin-bottom: 8px; }
.lovecard img { width: 44px; height: 44px; image-rendering: pixelated; border-radius: 4px; background: rgba(255,255,255,0.06); }
.lovecard .heart { color: #ff8ba0; font-size: 20px; animation: beat 1.6s ease-in-out infinite; }
@keyframes beat { 0%,100% { transform: scale(1); } 12% { transform: scale(1.25); } }
.lovecard .names { font-weight: bold; font-size: 13px; }
.lovecard .days { color: #ffd1dc; font-size: 12px; margin-top: 4px; }
.lovecard .since { color: #9aa4ae; font-size: 11px; margin-top: 2px; }

/* leaders */
.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.pod { text-align: center; padding: 14px 8px; }
.pod img { width: 52px; height: 52px; image-rendering: pixelated; border-radius: 4px; background: rgba(255,255,255,0.06); }
.pod .medal { display: inline-block; width: 22px; height: 22px; line-height: 22px; border-radius: 50%; font-size: 12px; font-weight: bold; color: #141a23; margin-bottom: 6px; }
.m1 { background: #ffd76a; } .m2 { background: #d7d7d7; } .m3 { background: #e0a273; }
.pod .pname { font-weight: bold; font-size: 13px; margin-top: 6px; word-break: break-word; }
.pod .pval { color: #ffd1dc; font-size: 12px; margin-top: 2px; }

.powerrow { display: flex; align-items: center; gap: 10px; padding: 6px 4px; font-size: 13px; }
.powerrow .rank { width: 26px; color: #9aa4ae; text-align: right; }
.powerrow .bar { flex: 1; height: 8px; background: rgba(255,255,255,0.07); border-radius: 4px; overflow: hidden; }
.powerrow .bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffb8c9, #ffd1dc); border-radius: 4px; width: 0; transition: width 0.8s ease; }
.powerrow .val { width: 80px; text-align: right; color: #ffd1dc; font-variant-numeric: tabular-nums; }
.pname2 { width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.skillrow { display: flex; align-items: center; gap: 10px; padding: 5px 4px; font-size: 13px; }
.skillrow .sname { width: 110px; color: #cfcfcf; text-transform: lowercase; }

/* casino */
.statcards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.statcard { text-align: center; padding: 14px 8px; }
.statcard .v { font-size: 22px; font-weight: bold; color: #ffd1dc; font-variant-numeric: tabular-nums; }
.statcard .l { font-size: 11px; color: #cfcfcf; margin-top: 4px; }
.pos { color: #8fe6a8; } .neg { color: #ff8ba0; }

/* rank badge */
.rbadge { font-size: 10px; font-weight: bold; padding: 1px 5px; border-radius: 3px; background: rgba(255,209,220,0.18); color: #ffd1dc; margin-left: 5px; white-space: nowrap; }

footer { text-align: center; font-size: 12px; color: #9aa4ae; margin-top: 20px; }

@media (max-width: 760px) {
	.livegrid, .podium, .statcards { grid-template-columns: 1fr; }
	.pname2 { width: 90px; }
	.logo { width: 150px; }
	.card { padding: 12px; }
}
