/*
Theme Name: SatyamWin
Description: Lottery theme for satyamwin.com — wallet, draws, results.
Version: 1.0.0
Requires PHP: 7.4
Text Domain: sathyamwin
*/

:root {
	--bg: #1b1030;
	--dot: rgba(255, 255, 255, .07);
	--navy: #13307e;
	--navy-d: #0b1c52;
	--purple: #7a48c9;
	--purple-d: #4a1f8f;
	--purple-dd: #2c0f5e;
	--gold: #ffd54a;
	--gold-d: #e5a800;
	--red: #e53935;
	--red-d: #a3161a;
	--row-a: #f6ea6e;
	--row-b: #ef6b2d;
	--row-c: #93e46d;
	--total: #f2a33a;
	--ink: #1d1233;
	--white: #fff;
	--muted: #d9ccf5;
	--ok: #1f9d55;
	--radius: 14px;
	--shadow: 0 10px 30px rgba(0, 0, 0, .35);
	--font-display: "Bungee", "Impact", sans-serif;
	--font: "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
	margin: 0;
	font-family: var(--font);
	font-size: 15px;
	color: var(--white);
	background-color: var(--bg);
	background-image:
		radial-gradient(var(--dot) 1.4px, transparent 1.6px),
		radial-gradient(ellipse at top, #3a1a73 0%, transparent 60%);
	background-size: 16px 16px, 100% 100%;
	min-height: 100vh;
}

a { color: var(--gold); }
img { max-width: 100%; height: auto; display: block; }

.sw-site { max-width: 1120px; margin: 0 auto; padding: 0 16px 24px; }

/* ---------- Banner ---------- */
.sw-banner { margin-top: 12px; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; border: 3px solid var(--white); border-bottom: 0; box-shadow: var(--shadow); }
.sw-banner__img { width: 100%; }
.sw-banner__fallback {
	position: relative; display: flex; align-items: center; justify-content: center; gap: 28px;
	min-height: 190px; padding: 20px 64px; text-decoration: none;
	background:
		radial-gradient(circle at 50% 120%, rgba(255, 213, 74, .35), transparent 55%),
		repeating-linear-gradient(45deg, rgba(255, 255, 255, .03) 0 10px, transparent 10px 20px),
		linear-gradient(180deg, #1f48b0, var(--navy) 55%, var(--navy-d));
}
.sw-logo {
	font-family: var(--font-display); font-size: clamp(34px, 6.5vw, 72px); line-height: 1; letter-spacing: 1px;
	color: var(--gold); text-shadow: 0 3px 0 var(--gold-d), 0 6px 0 #7a4b00, 0 10px 24px rgba(0, 0, 0, .6);
}
.sw-777 {
	font-family: var(--font-display); font-size: clamp(36px, 6vw, 68px); line-height: 1;
	color: #3d8bff; -webkit-text-stroke: 2px var(--gold); text-shadow: 0 5px 0 #0a2a74, 0 8px 18px rgba(0, 0, 0, .5);
	transform: rotate(-6deg);
}
.sw-cards { display: flex; }
.sw-cards i {
	display: grid; place-items: center; width: 54px; height: 76px; margin-left: -18px;
	font: 700 20px/1.05 var(--font); font-style: normal; text-align: center; color: var(--ink);
	background: #fff; border-radius: 7px; box-shadow: 0 4px 10px rgba(0, 0, 0, .4);
}
.sw-cards i:nth-child(1) { transform: rotate(-14deg); color: var(--red); }
.sw-cards i:nth-child(2) { transform: rotate(-2deg) translateY(-6px); }
.sw-cards i:nth-child(3) { transform: rotate(11deg); }
.sw-suits {
	position: absolute; top: 0; bottom: 0; left: 0; width: 40px; padding: 8px 0;
	display: flex; align-items: center; writing-mode: vertical-rl; justify-content: space-around;
	font-size: 22px; letter-spacing: 6px; color: var(--ink);
	background: linear-gradient(90deg, #d9a400, var(--gold), #d9a400);
}
.sw-suits--r { left: auto; right: 0; }

/* ---------- Nav ---------- */
.sw-nav {
	display: flex; align-items: center; flex-wrap: wrap; gap: 6px 4px; padding: 10px 14px;
	background: linear-gradient(180deg, #8f5be0, var(--purple-d) 60%, var(--purple-dd));
	border: 3px solid var(--white); border-top-width: 2px; border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow);
}
.sw-nav a { color: var(--white); text-decoration: none; font-weight: 700; padding: 8px 14px; border-radius: 999px; transition: background .15s; }
.sw-nav a:hover { background: rgba(255, 255, 255, .12); }
.sw-nav a.is-active { background: var(--gold); color: var(--ink); }
.sw-nav__spacer { flex: 1; }
.sw-chip { background: rgba(0, 0, 0, .3); border: 1px solid var(--gold); color: var(--gold); padding: 6px 12px; border-radius: 999px; font-weight: 800; }
.sw-chip__lbl { color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; margin-right: 2px; }
.sw-nav__user { color: var(--muted); padding: 0 6px; }
.sw-nav .sw-nav__out { background: var(--red); color: var(--white); border: 0; font: 700 15px var(--font); padding: 8px 14px; border-radius: 999px; cursor: pointer; text-decoration: none; }
.sw-nav .sw-nav__out:hover { background: var(--red-d); }
.sw-nav .sw-nav__out:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- Panels ---------- */
.sw-main { padding-top: 16px; }
.sw-panel {
	background: linear-gradient(180deg, var(--purple), #6a3bb8);
	border: 3px solid var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
	padding: 20px; margin-bottom: 16px;
}
.sw-title { text-align: center; margin: 0 0 16px; }
.sw-title span {
	display: inline-block; padding: 6px 18px; background: var(--gold); color: var(--ink);
	font-family: var(--font-display); font-weight: 400; font-size: clamp(20px, 3.6vw, 30px); border-radius: 6px;
	box-shadow: 0 4px 0 var(--gold-d);
}
.sw-h2 { margin: 0 0 14px; font-family: var(--font-display); font-weight: 400; color: var(--gold); font-size: 20px; text-shadow: 0 2px 0 rgba(0, 0, 0, .35); }
.sw-muted { color: var(--muted); font-size: 13px; }
.sw-center { text-align: center; }
.sw-rate { text-align: center; color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.sw-rate strong { color: var(--gold); }
.sw-alert { background: rgba(0, 0, 0, .25); border-left: 4px solid var(--gold); padding: 10px 14px; border-radius: 6px; }
.sw-alert--err { border-color: var(--red); }

/* ---------- Info strip ---------- */
.sw-info { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 0 0 12px; text-align: center; }
.sw-info dt { font-family: var(--font-display); font-size: 13px; color: var(--gold); text-shadow: 0 2px 0 #6b3c00; text-transform: lowercase; }
.sw-info dd { margin: 4px 0 0; font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; }
.sw-info__cd dd { display: inline-block; background: rgba(0, 0, 0, .3); padding: 2px 10px; border-radius: 6px; }
.sw-info__cd.is-urgent dd { background: var(--red); animation: sw-blink 1s steps(2) infinite; }
@keyframes sw-blink { 50% { opacity: .55; } }

/* ---------- Betting table ---------- */
.sw-table { width: 100%; border-collapse: separate; border-spacing: 0; color: var(--ink); border: 2px solid #b493ec; border-radius: 8px; overflow: hidden; }
.sw-table th { background: var(--red); color: var(--white); font-weight: 700; padding: 6px 4px; font-size: 14px; border-right: 1px solid rgba(255, 255, 255, .25); }
.sw-table td { padding: 6px 3px; text-align: center; border-right: 1px solid rgba(80, 40, 140, .35); border-top: 1px solid rgba(80, 40, 140, .35); }
.sw-row--a td { background: var(--row-a); }
.sw-row--b td { background: var(--row-b); }
.sw-row--c td { background: var(--row-c); }
.sw-name strong { display: block; font-family: var(--font-display); font-weight: 400; font-size: 15px; letter-spacing: .5px; }
.sw-name small { font-size: 12px; font-weight: 700; letter-spacing: 1px; }
.sw-sr, .sw-winamt { font-weight: 800; font-size: 13px; }
.sw-d input {
	width: 100%; max-width: 46px; height: 32px; padding: 0 2px; text-align: center;
	font: 700 15px var(--font); color: var(--ink);
	background: #fff; border: 1px solid #8a7aa8; border-radius: 6px; box-shadow: inset 0 2px 3px rgba(0, 0, 0, .15);
}
.sw-d input:focus { outline: 3px solid var(--purple-d); outline-offset: 1px; }
.sw-d input.is-filled { background: var(--ink); color: var(--gold); border-color: var(--ink); }
.sw-d input:disabled { background: rgba(255, 255, 255, .6); cursor: not-allowed; }
.sw-sum output { display: inline-block; min-width: 54px; padding: 5px 6px; background: #fff; border-radius: 6px; font-weight: 800; font-variant-numeric: tabular-nums; box-shadow: inset 0 2px 3px rgba(0, 0, 0, .15); }
.sw-to { font-weight: 800; font-size: 13px; white-space: nowrap; }
.sw-row.has-bet .sw-name strong { text-decoration: underline wavy var(--purple-d) 2px; text-underline-offset: 4px; }
.sw-table tfoot td { background: var(--total); }
.sw-total-lbl { text-align: right !important; font-weight: 800; font-size: 18px; color: var(--navy-d); padding-right: 12px !important; }

/* ---------- Buttons ---------- */
.sw-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.sw-msg { flex: 1 1 260px; margin: 0; font-weight: 700; min-height: 1.2em; }
.sw-msg--ok { color: #b9ffcf; }
.sw-msg--err { color: #ffd0cf; }
.sw-btn {
	display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 26px;
	font: 800 17px var(--font); letter-spacing: .3px; text-decoration: none; cursor: pointer;
	border: 2px solid rgba(255, 255, 255, .7); border-radius: 10px; transition: transform .08s, filter .15s;
}
.sw-btn:hover { filter: brightness(1.08); }
.sw-btn:active { transform: translateY(2px); }
.sw-btn:disabled { opacity: .6; cursor: wait; }
.sw-btn--gold { color: var(--ink); background: linear-gradient(180deg, #ffe789, var(--gold) 45%, var(--gold-d)); box-shadow: 0 4px 0 #8a5d00; }
.sw-btn--red { color: var(--white); background: linear-gradient(180deg, #ff6b66, var(--red) 45%, var(--red-d)); box-shadow: 0 4px 0 #5d0a0c; border-color: #c9a227; }
.sw-btn--ghost { color: var(--white); background: rgba(0, 0, 0, .2); }
.sw-btn--sm { min-height: 36px; padding: 0 16px; font-size: 14px; }
.sw-btn:focus-visible, .sw-nav a:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- Login ---------- */
.sw-cta { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; margin: 18px 0 0; font-weight: 700; }
.sw-modal { padding: 0; border: 0; background: none; color: var(--white); width: min(420px, calc(100% - 32px)); overflow: visible; }
.sw-modal::backdrop { background: rgba(10, 4, 25, .75); backdrop-filter: blur(3px); }
.sw-modal[open] { animation: sw-pop .18s ease-out; }
.sw-modal .sw-login { background: linear-gradient(180deg, var(--purple), var(--purple-dd)); box-shadow: var(--shadow); max-width: none; }
.sw-modal__x { position: absolute; top: -12px; right: -12px; width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--white); background: var(--red); color: var(--white); font-size: 22px; line-height: 1; cursor: pointer; }
.sw-modal__x:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
@keyframes sw-pop { from { transform: scale(.94); opacity: 0; } }
.sw-login { max-width: 380px; margin: 0 auto; background: rgba(0, 0, 0, .25); border: 2px solid var(--gold); border-radius: var(--radius); padding: 18px 22px; }
.sw-login h3 { margin: 0 0 10px; font-family: var(--font-display); font-weight: 400; color: var(--gold); text-align: center; }
.sw-login label { display: block; font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.sw-login input[type=text], .sw-login input[type=password] { width: 100%; height: 42px; padding: 0 12px; font: 16px var(--font); border-radius: 8px; border: 0; }
.sw-pw { position: relative; display: block; }
.sw-pw input { padding-right: 46px !important; }
.sw-pw__eye { position: absolute; top: 0; right: 0; width: 44px; height: 42px; display: grid; place-items: center; background: none; border: 0; color: #6c5d88; cursor: pointer; border-radius: 0 8px 8px 0; }
.sw-pw__eye:hover { color: var(--purple-d); }
.sw-pw__eye:focus-visible { outline: 3px solid var(--purple-d); outline-offset: -3px; }
.sw-login .login-remember label { display: flex; gap: 6px; align-items: center; font-weight: 500; }
.sw-login input[type=submit] { width: 100%; min-height: 44px; font: 800 16px var(--font); color: var(--ink); cursor: pointer; border: 0; border-radius: 10px; background: linear-gradient(180deg, #ffe789, var(--gold) 45%, var(--gold-d)); box-shadow: 0 4px 0 #8a5d00; }

/* ---------- Latest results ---------- */
.sw-balls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.sw-ball { text-align: center; padding: 14px; border-radius: var(--radius); color: var(--ink); box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .15); }
.sw-ball--a { background: var(--row-a); }
.sw-ball--b { background: var(--row-b); }
.sw-ball--c { background: var(--row-c); }
.sw-ball__name { display: block; font-family: var(--font-display); font-size: 14px; }
.sw-ball__num { display: block; font-size: 38px; font-weight: 800; letter-spacing: 2px; font-variant-numeric: tabular-nums; }
.sw-ball__time { font-size: 13px; font-weight: 700; opacity: .8; }
.sw-win { display: inline-grid; place-items: center; min-width: 1.15em; margin-left: 2px; color: var(--white); background: var(--red); border-radius: 50%; box-shadow: 0 2px 0 var(--red-d); }

/* ---------- Results chart ---------- */
.sw-datebar { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.sw-datebar label { font-weight: 800; }
.sw-datebar input[type=date] { height: 38px; padding: 0 10px; font: 600 15px var(--font); border: 0; border-radius: 8px; color-scheme: light; }
.sw-link { color: var(--gold); font-weight: 700; }
.sw-chart-wrap { background: #f6f3fb; border-radius: 10px; overflow: hidden; }
.sw-chart { width: 100%; border-collapse: collapse; color: var(--ink); text-align: center; }
.sw-chart thead th { padding: 12px 6px; font-family: var(--font-display); font-weight: 400; font-size: 17px; color: var(--white); background: var(--navy); }
.sw-chart thead th.sw-chart__g--a { background: #b59a00; }
.sw-chart thead th.sw-chart__g--b { background: #c4471a; }
.sw-chart thead th.sw-chart__g--c { background: #3f9a1d; }
.sw-chart tbody th, .sw-chart td { padding: 11px 6px; border-bottom: 1px solid #e3dcef; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sw-chart tbody th { color: var(--navy); white-space: nowrap; }
.sw-chart tbody tr:nth-child(even) { background: #ece6f6; }
.sw-chart tbody tr:hover { background: #fff3c2; }
.sw-dash { color: #a99bc4; }

/* ---------- My account ---------- */
.sw-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.sw-stat { background: rgba(0, 0, 0, .25); border-radius: var(--radius); padding: 16px; text-align: center; }
.sw-stat span { display: block; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .5px; }
.sw-stat strong { font-size: 26px; font-variant-numeric: tabular-nums; }
.sw-stat--gold { background: linear-gradient(180deg, #ffe789, var(--gold-d)); color: var(--ink); }
.sw-stat--gold span { color: #5a3d00; }
.sw-scroll { overflow-x: auto; border-radius: 10px; background: #f6f3fb; }
.sw-list { width: 100%; border-collapse: collapse; color: var(--ink); font-size: 14px; }
.sw-list th { background: var(--purple-dd); color: var(--white); text-align: left; padding: 10px; white-space: nowrap; }
.sw-list td { padding: 9px 10px; border-bottom: 1px solid #e3dcef; }
.sw-list tbody tr:nth-child(even) { background: #ece6f6; }
.sw-empty { text-align: center; color: #6c5d88; padding: 20px !important; }
.sw-num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--gold); font-weight: 800; }
.sw-tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #ddd; }
.sw-tag--won, .sw-tag--credit, .sw-tag--win { background: #c9f5d9; color: #0c5e2e; }
.sw-tag--lost, .sw-tag--debit { background: #ffd7d6; color: #8c1114; }
.sw-tag--pending, .sw-tag--bet { background: #fff0b8; color: #6b4b00; }
.sw-pos { color: var(--ok); font-weight: 700; }
.sw-neg { color: var(--red-d); font-weight: 700; }
.sw-pager { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 12px; }
.sw-pager a { font-weight: 700; }
.sw-content a { color: var(--gold); }

/* ---------- Footer ---------- */
.sw-footer { text-align: center; font-size: 12px; color: var(--muted); padding: 14px 10px; background: rgba(0, 0, 0, .3); border-radius: var(--radius); }
.sw-footer p { margin: 4px 0; }
.sw-footer__copy { color: var(--gold); font-weight: 700; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
	.sw-info { grid-template-columns: repeat(3, 1fr); }
	.sw-banner__fallback { min-height: 140px; gap: 14px; padding: 16px 52px; }
	.sw-cards { display: none; }

	/* Betting table → one card per game, digits in a 5×2 grid */
	.sw-table, .sw-table tbody, .sw-table tfoot { display: block; border: 0; background: none; }
	.sw-table thead { display: none; }
	.sw-table tr { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; padding: 12px; margin-bottom: 12px; border-radius: 12px; }
	.sw-row--a { background: var(--row-a); }
	.sw-row--b { background: var(--row-b); }
	.sw-row--c { background: var(--row-c); }
	.sw-table tfoot tr { background: var(--total); grid-template-columns: 1fr 1fr; }
	.sw-table td { display: block; border: 0; padding: 0; background: none !important; }
	.sw-name { grid-column: 1 / -1; text-align: left !important; display: flex !important; align-items: baseline; gap: 8px; }
	.sw-sr, .sw-winamt, .sw-total-lbl, .sw-total-pad { display: none !important; }
	.sw-d::before { content: attr(data-d); display: block; font-weight: 800; font-size: 13px; margin-bottom: 2px; }
	.sw-d input { max-width: none; height: 40px; font-size: 17px; }
	.sw-sum, .sw-to { grid-column: span 2; display: flex !important; align-items: center; justify-content: space-between; gap: 6px; font-size: 13px; font-weight: 700; }
	.sw-to { grid-column: span 1; flex-direction: column; justify-content: center; }
	.sw-sum::before, .sw-to::before { content: attr(data-label); }
	.sw-table tfoot .sw-sum { grid-column: span 1; }
	.sw-actions { justify-content: stretch; }
	.sw-actions .sw-btn { flex: 1; }
}

@media (max-width: 560px) {
	body { font-size: 14px; }
	.sw-panel { padding: 14px; }
	.sw-banner__fallback { min-height: 110px; padding: 12px 40px; }
	.sw-suits { width: 28px; font-size: 16px; letter-spacing: 3px; }
	.sw-777 { display: none; }
	.sw-info { grid-template-columns: 1fr 1fr; }
	.sw-info__cd { grid-column: 1 / -1; }
	.sw-balls, .sw-stats { grid-template-columns: 1fr; }
	.sw-ball__num { font-size: 30px; }
	.sw-chart thead th { font-size: 13px; }
	.sw-chart tbody th, .sw-chart td { font-size: 15px; padding: 9px 4px; }
	.sw-nav__user { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	* { animation: none !important; transition: none !important; }
}
