/* ==============================================
   rating-systems-guide.css - Rating guide page styles
   ============================================== */

/* ── Header Section ── */
.rating-guide-header {
	text-align: center;
	margin-bottom: 60px;
	animation: slideInDown 0.6s ease-out;
}

.rating-guide-header h1 {
	font-size: 3em;
	font-weight: 700;
	margin-bottom: 15px;
	color: #00d9ff;
	text-transform: uppercase;
	letter-spacing: 2px;
}

.guide-subtitle {
	font-size: 1.1em;
	color: #a0a0a0;
	max-width: 700px;
	margin: 0 auto;
	line-height: 1.6;
}

/* ── Cards Grid ── */
.rating-cards-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
	gap: 30px;
	margin-bottom: 80px;
}

/* ── Rating Card Base ── */
.rating-card {
	background: rgba(30, 35, 50, 0.8);
	border: 2px solid;
	border-radius: 12px;
	padding: 35px;
	transition: all 0.4s ease;
	backdrop-filter: blur(5px);
	position: relative;
	overflow: hidden;
	animation: slideUpCard 0.6s ease-out backwards;
}

.rating-card:nth-child(1) { animation-delay: 0.1s; }
.rating-card:nth-child(2) { animation-delay: 0.2s; }
.rating-card:nth-child(3) { animation-delay: 0.3s; }

.rating-card:hover {
	transform: translateY(-8px);
	box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

/* ── Card Color Variants ── */
.driver-rating-card {
	border-color: #00d9ff;
}

.driver-rating-card .card-header,
.driver-rating-card .formula-label,
.driver-rating-card .tier-label,
.driver-rating-card .example-title {
	color: #00d9ff;
}

.driver-rating-card .formula-box {
	border-left-color: #00d9ff;
}

.ams2-rating-card {
	border-color: #9d4edd;
}

.ams2-rating-card .card-header,
.ams2-rating-card .formula-label,
.ams2-rating-card .example-title {
	color: #9d4edd;
}

.ams2-rating-card .formula-box {
	border-left-color: #9d4edd;
}

.r3e-rating-card {
	border-color: #ff9500;
}

.r3e-rating-card .card-header,
.r3e-rating-card .formula-label,
.r3e-rating-card .example-title {
	color: #ff9500;
}

.r3e-rating-card .formula-box {
	border-left-color: #ff9500;
}

/* ── Card Header ── */
.card-header {
	margin-bottom: 25px;
}

.card-title {
	font-size: 1.8em;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1px;
	margin-bottom: 8px;
	font-family: Arial, sans-serif;
}

.card-subtitle {
	font-size: 0.9em;
	color: #a0a0a0;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* ── Card Description ── */
.card-description {
	font-size: 0.95em;
	line-height: 1.7;
	color: #d0d0d0;
	margin-bottom: 25px;
}

/* ── Formula Box ── */
.formula-box {
	background: rgba(255, 255, 255, 0.03);
	border-left: 3px solid;
	padding: 20px;
	margin: 25px 0;
	border-radius: 8px;
}

.formula-label {
	font-weight: 700;
	font-size: 0.85em;
	text-transform: uppercase;
	letter-spacing: 1px;
	margin-bottom: 12px;
	display: block;
}

.formula-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	font-size: 0.9em;
}

.formula-item:last-child {
	border-bottom: none;
}

.formula-name {
	font-weight: 600;
	color: #d0d0d0;
}

.formula-value {
	color: #a0a0a0;
	font-weight: 500;
}

/* ── Info Box ── */
.info-box {
	background: rgba(255, 255, 255, 0.05);
	padding: 18px;
	border-radius: 8px;
	margin: 20px 0;
	font-size: 0.9em;
	line-height: 1.8;
	color: #c0c0c0;
}

.ams2-info {
	background: rgba(157, 78, 221, 0.1);
	border-left: 3px solid #9d4edd;
	padding-left: 20px;
}

.r3e-info {
	background: rgba(255, 149, 0, 0.1);
	border-left: 3px solid #ff9500;
	padding-left: 20px;
}

.info-box strong {
	color: #e0e0e0;
}

/* ── Example Box ── */
.example-box {
	background: rgba(255, 255, 255, 0.02);
	border: 1px dashed rgba(255, 255, 255, 0.3);
	padding: 18px;
	border-radius: 8px;
	margin-top: 20px;
}

.example-title {
	font-weight: 700;
	font-size: 0.8em;
	text-transform: uppercase;
	letter-spacing: 1px;
	margin-bottom: 10px;
	display: block;
	opacity: 0.9;
}

.example-text {
	font-size: 0.9em;
	line-height: 1.7;
	color: #b0b0b0;
	font-family: monospace;
}

.example-text strong {
	color: #d0d0d0;
}

/* ── Tier Section ── */
.tier-section {
	margin-top: 25px;
	padding-top: 20px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.tier-label {
	font-weight: 700;
	font-size: 0.85em;
	text-transform: uppercase;
	letter-spacing: 1px;
	margin-bottom: 15px;
	display: block;
}

.tier-badges {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
	gap: 10px;
}

.tier-badge {
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid currentColor;
	border-radius: 8px;
	padding: 12px;
	text-align: center;
	transition: all 0.3s ease;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
}

.tier-badge:hover {
	background: rgba(255, 255, 255, 0.15);
	transform: scale(1.05);
}

.badge-letter {
	font-weight: 700;
	font-size: 0.9em;
}

.badge-range {
	font-size: 0.7em;
	opacity: 0.7;
}

/* ── Tier System Section ── */
.tier-system-section {
	background: rgba(30, 35, 50, 0.8);
	border: 2px solid rgba(0, 217, 255, 0.3);
	border-radius: 12px;
	padding: 50px 40px;
	margin-top: 80px;
	backdrop-filter: blur(5px);
	animation: slideUpCard 0.6s ease-out 0.4s backwards;
}

.tier-system-section h2 {
	font-size: 2.2em;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 2px;
	margin-bottom: 15px;
	text-align: center;
	color: #00d9ff;
}

.tier-system-subtitle {
	text-align: center;
	color: #a0a0a0;
	font-size: 1em;
	margin-bottom: 50px;
}

/* ── Tier System Grid ── */
.tier-system-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
	margin-bottom: 60px;
}

/* ── Tier Row ── */
.tier-row {
	display: grid;
	grid-template-columns: 120px 1fr;
	gap: 25px;
	align-items: center;
	padding: 25px;
	border-radius: 12px;
	border: 2px solid;
	background: rgba(255, 255, 255, 0.03);
	transition: all 0.3s ease;
}

.tier-row:hover {
	transform: translateX(10px);
	background: rgba(255, 255, 255, 0.08);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* ── Tier Colors ── */
.tier-newcomer { border-color: #666; }
.tier-rookie { border-color: #4a90e2; }
.tier-club-racer { border-color: #7ed321; }
.tier-pro { border-color: #f5a623; }
.tier-pretty-ninja { border-color: #9d4edd; }
.tier-alien { border-color: #00d9ff; }

/* ── Tier Badge Large ── */
.tier-badge-large {
	width: 100px;
	height: 100px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 3em;
	font-weight: 900;
	border-radius: 12px;
	border: 3px solid currentColor;
	background: rgba(255, 255, 255, 0.05);
	transition: all 0.3s ease;
}

.tier-row:hover .tier-badge-large {
	transform: scale(1.1) rotate(-5deg);
	background: rgba(255, 255, 255, 0.1);
}

.tier-newcomer .tier-badge-large { color: #999; border-color: #666; }
.tier-rookie .tier-badge-large { color: #4a90e2; border-color: #4a90e2; }
.tier-club-racer .tier-badge-large { color: #7ed321; border-color: #7ed321; }
.tier-pro .tier-badge-large { color: #f5a623; border-color: #f5a623; }
.tier-pretty-ninja .tier-badge-large { color: #9d4edd; border-color: #9d4edd; }
.tier-alien .tier-badge-large { color: #00d9ff; border-color: #00d9ff; }

/* ── Tier Content ── */
.tier-content {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.tier-name {
	font-size: 1.4em;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1px;
	margin: 0;
}

.tier-newcomer .tier-name { color: #999; }
.tier-rookie .tier-name { color: #4a90e2; }
.tier-club-racer .tier-name { color: #7ed321; }
.tier-pro .tier-name { color: #f5a623; }
.tier-pretty-ninja .tier-name { color: #9d4edd; }
.tier-alien .tier-name { color: #00d9ff; }

.tier-range {
	font-size: 0.85em;
	color: #a0a0a0;
	font-weight: 600;
	margin: 0;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.tier-description {
	font-size: 0.95em;
	color: #c0c0c0;
	line-height: 1.6;
	margin: 0;
}

/* ── Quick Reference Table ── */
.tier-quick-ref {
	margin-top: 60px;
	padding-top: 40px;
	border-top: 2px solid rgba(0, 217, 255, 0.3);
}

.tier-quick-ref h3 {
	font-size: 1.4em;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1px;
	margin-bottom: 25px;
	color: #00d9ff;
}

.tier-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95em;
}

.tier-table thead {
	background: rgba(0, 217, 255, 0.1);
	border-bottom: 2px solid rgba(0, 217, 255, 0.3);
}

.tier-table th {
	padding: 15px;
	text-align: left;
	font-weight: 700;
	color: #00d9ff;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	font-size: 0.85em;
}

.ref-col-tier { width: 20%; }
.ref-col-badge { width: 12%; }
.ref-col-range { width: 18%; }
.ref-col-desc { width: 50%; }

.tier-table tbody tr {
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	transition: all 0.3s ease;
}

.tier-table tbody tr:hover {
	background: rgba(255, 255, 255, 0.05);
}

.tier-table td {
	padding: 15px;
	color: #d0d0d0;
}

.ref-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 6px;
	font-weight: 700;
	font-size: 0.9em;
	border: 2px solid currentColor;
	background: rgba(255, 255, 255, 0.05);
}

.ref-row-newcomer .ref-badge { color: #999; }
.ref-row-rookie .ref-badge { color: #4a90e2; }
.ref-row-club-racer .ref-badge { color: #7ed321; }
.ref-row-pro .ref-badge { color: #f5a623; }
.ref-row-pretty-ninja .ref-badge { color: #9d4edd; }
.ref-row-alien .ref-badge { color: #00d9ff; }

/* ── Responsive Tier System ── */
@media (max-width: 768px) {
	.tier-system-section {
		padding: 30px 20px;
		margin-top: 60px;
	}

	.tier-system-section h2 {
		font-size: 1.6em;
	}

	.tier-row {
		grid-template-columns: 80px 1fr;
		gap: 15px;
		padding: 20px;
	}

	.tier-badge-large {
		width: 80px;
		height: 80px;
		font-size: 2em;
	}

	.tier-name {
		font-size: 1.1em;
	}

	.tier-table {
		font-size: 0.85em;
	}

	.tier-table th,
	.tier-table td {
		padding: 12px;
	}
}

@media (max-width: 480px) {
	.tier-system-section {
		padding: 20px 15px;
	}

	.tier-system-section h2 {
		font-size: 1.3em;
	}

	.tier-system-subtitle {
		font-size: 0.9em;
	}

	.tier-row {
		grid-template-columns: 70px 1fr;
		gap: 12px;
		padding: 15px;
	}

	.tier-badge-large {
		width: 70px;
		height: 70px;
		font-size: 1.8em;
	}

	.tier-name {
		font-size: 0.95em;
	}

	.tier-description {
		font-size: 0.85em;
	}

	.tier-table {
		font-size: 0.75em;
	}

	.tier-table th,
	.tier-table td {
		padding: 8px;
	}

	.ref-col-tier, .ref-col-badge, .ref-col-range { display: none; }
	.ref-col-desc { width: 100%; }
}

/* ── Remove old key-facts-section if it exists ── */
.key-facts-section {
	display: none;
}

.facts-grid {
	display: none;
}

.fact-card {
	display: none;
}

/* ── Animations ── */
@keyframes slideInDown {
	from {
		opacity: 0;
		transform: translateY(-30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes slideUpCard {
	from {
		opacity: 0;
		transform: translateY(40px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ── Responsive ── */
@media (max-width: 1024px) {
	.rating-cards-grid {
		grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	}
}

@media (max-width: 768px) {
	.rating-guide-header h1 {
		font-size: 2em;
	}

	.guide-subtitle {
		font-size: 0.95em;
	}

	.rating-cards-grid {
		grid-template-columns: 1fr;
		gap: 20px;
		margin-bottom: 60px;
	}

	.rating-card {
		padding: 25px;
	}

	.card-title {
		font-size: 1.5em;
	}

	.key-facts-section {
		padding: 30px 20px;
		margin-top: 60px;
	}

	.key-facts-section h2 {
		font-size: 1.6em;
		margin-bottom: 30px;
	}

	.facts-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.fact-card {
		padding: 20px;
	}

	.formula-box {
		padding: 15px;
	}

	.info-box {
		font-size: 0.85em;
	}

	.example-box {
		padding: 15px;
	}
}

@media (max-width: 480px) {
	.rating-guide-header h1 {
		font-size: 1.5em;
		letter-spacing: 1px;
	}

	.guide-subtitle {
		font-size: 0.85em;
	}

	.card-title {
		font-size: 1.2em;
	}

	.card-subtitle {
		font-size: 0.8em;
	}

	.rating-card {
		padding: 20px;
	}

	.tier-badges {
		grid-template-columns: repeat(3, 1fr);
	}

	.key-facts-section {
		padding: 20px 15px;
	}

	.key-facts-section h2 {
		font-size: 1.3em;
	}
}