/* ==================== GLOBAL ==================== */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
	min-height: 100vh;
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 16px;
	background: linear-gradient(145deg, #0a0f1e, #1a1f2f);
	position: relative;
	overflow-x: hidden;
}

body::before {
	content: '';
	position: fixed;
	width: 200%;
	height: 200%;
	top: -50%;
	left: -50%;
	background: radial-gradient(circle at 30% 30%, rgba(100, 108, 255, 0.15) 0%, transparent 50%),
				radial-gradient(circle at 70% 70%, rgba(255, 71, 157, 0.15) 0%, transparent 50%);
	animation: backgroundMove 60s linear infinite;
	z-index: 0;
}

@keyframes backgroundMove {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

.container {
	background: rgba(18, 25, 40, 0.95);
	backdrop-filter: blur(20px);
	border-radius: 48px;
	padding: 32px;
	box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.8);
	max-width: 1600px;
	width: 100%;
	position: relative;
	z-index: 1;
	border: 1px solid rgba(255, 255, 255, 0.1);
}

h1 {
	text-align: center;
	font-size: 3rem;
	margin-bottom: 30px;
	background: linear-gradient(135deg, #fff, #a5b4fc);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}

footer { text-align:center; color:white;}

/* ==================== RESET-INFO ==================== */
.reset-info {
	background: linear-gradient(145deg, #2d3b5a, #1a2540);
	border-radius: 30px;
	padding: 15px 25px;
	margin-bottom: 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-left: 6px solid #f472b6;
}

.reset-date {
	color: white;
	font-size: 1.2rem;
	display: flex;
	align-items: center;
	gap: 10px;
}

.reset-badge {
	background: linear-gradient(135deg, #f59e0b, #f472b6);
	color: white;
	padding: 8px 20px;
	border-radius: 30px;
	font-size: 1rem;
	font-weight: 600;
}

.reset-countdown {
	color: #f472b6;
	font-weight: bold;
	font-size: 1.3rem;
}

/* ==================== LOGIN CONTAINER ==================== */
.login-container {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 30px;
	margin-bottom: 40px;
}

.login-box {
	background: linear-gradient(145deg, #1e293b, #0f172a);
	border-radius: 40px;
	padding: 30px;
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.login-header {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 30px;
	padding-bottom: 20px;
	border-bottom: 2px solid;
	border-image: linear-gradient(90deg, #6366f1, #ec4899) 1;
}

.login-icon {
	font-size: 2.5rem;
	background: linear-gradient(135deg, #6366f1, #ec4899);
	padding: 12px;
	border-radius: 20px;
}

.login-title {
	font-size: 2rem;
	font-weight: 700;
	background: linear-gradient(135deg, #fff, #cbd5e1);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}

.input-group {
	margin-bottom: 20px;
}

.input-group label {
	display: block;
	color: #94a3b8;
	margin-bottom: 8px;
	font-size: 1rem;
}

.input-field {
	width: 100%;
	padding: 16px 20px;
	background: rgba(0, 0, 0, 0.3);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 20px;
	color: white;
	font-size: 1rem;
	transition: all 0.3s;
}

.input-field:focus {
	outline: none;
	border-color: #6366f1;
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

.login-btn {
	width: 100%;
	padding: 16px;
	background: linear-gradient(135deg, #6366f1, #8b5cf6);
	border: none;
	border-radius: 30px;
	color: white;
	font-size: 1.2rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin-top: 20px;
}

.login-btn:hover {
	transform: translateY(-3px);
	box-shadow: 0 15px 30px #6366f180;
}

.register-btn {
	background: linear-gradient(135deg, #ec4899, #f472b6);
}

/* ==================== HIGHSCORE BOX ==================== */
.highscore-box {
	background: linear-gradient(145deg, #1e293b, #0f172a);
	border-radius: 40px;
	padding: 30px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	overflow-x: auto;
}

.highscore-header {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 30px;
	padding-bottom: 20px;
	border-bottom: 2px solid;
	border-image: linear-gradient(90deg, #f59e0b, #f472b6) 1;
}

.highscore-icon {
	font-size: 2.5rem;
	background: linear-gradient(135deg, #f59e0b, #f472b6);
	padding: 12px;
	border-radius: 20px;
}

.highscore-title {
	font-size: 2rem;
	font-weight: 700;
	background: linear-gradient(135deg, #f59e0b, #f472b6);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}

/* ==================== TABELLE ==================== */
.highscore-table {
	width: 100%;
	border-collapse: collapse;
	color: white;
	font-size: 18px;
	border: 2px solid #f472b6;
	border-radius: 12px;
	overflow: hidden;
	text-align: center;
}

.highscore-table th {
	text-align: center;
	padding: 15px 10px;
	background: rgba(244, 114, 182, 0.2);
	font-weight: 600;
	color: #f472b6;
	border: 1px solid #f472b6;
	font-size: 18px;
}

.highscore-table td {
	padding: 12px 10px;
	border: 1px solid rgba(244, 114, 182, 0.3);
	font-size: 18px;
}

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

.rank-1-row td:first-child {
	color: gold;
	font-weight: bold;
}

.rank-2-row td:first-child {
	color: silver;
	font-weight: bold;
}

.rank-3-row td:first-child {
	color: #cd7f32;
	font-weight: bold;
}

.timestamp-col {
	color: #94a3b8;
	white-space: nowrap;
	font-size: 18px;
}

.no-highscore {
	text-align: center;
	color: #94a3b8;
	padding: 40px;
	font-size: 18px;
}

/* ==================== SPIELBEREICH ==================== */
.game-section {
	display: none;
}

.game-section.active {
	display: block;
}

.user-info {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	background: linear-gradient(145deg, #1e293b, #0f172a);
	border-radius: 30px;
	padding: 15px 25px;
}

.welcome-text {
	color: white;
	font-size: 1.2rem;
}

.welcome-name {
	color: #f472b6;
	font-weight: bold;
	font-size: 1.4rem;
}

.logout-btn {
	background: linear-gradient(135deg, #ef4444, #dc2626);
	padding: 12px 30px;
	border: none;
	border-radius: 30px;
	color: white;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s;
	display: flex;
	align-items: center;
	gap: 8px;
}

.logout-btn:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 20px #ef444480;
}

.top-section {
	background: linear-gradient(145deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
	border-radius: 40px;
	padding: 24px;
	margin-bottom: 28px;
}

.dice-panels {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
	margin-bottom: 24px;
}

.dice-panel {
	background: linear-gradient(145deg, #1e293b, #0f172a);
	border-radius: 32px;
	padding: 24px;
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.panel-header {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 24px;
	padding-bottom: 16px;
	border-bottom: 2px solid;
	border-image: linear-gradient(90deg, #6366f1, #ec4899) 1;
}

.player-icon {
	font-size: 2.5rem;
	background: linear-gradient(135deg, #6366f1, #ec4899);
	border-radius: 20px;
	padding: 8px;
}

.player-name {
	font-size: 1.8rem;
	font-weight: 700;
	background: linear-gradient(135deg, #fff, #cbd5e1);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}

.roll-badge {
	margin-left: auto;
	background: linear-gradient(135deg, #6366f1, #8b5cf6);
	color: white;
	padding: 8px 20px;
	border-radius: 40px;
	font-size: 1rem;
	font-weight: 600;
}

.dice-row {
	display: flex;
	justify-content: center;
	gap: 16px;
	perspective: 1000px;
}

.dice {
	width: 90px;
	height: 90px;
	position: relative;
	transform-style: preserve-3d;
	transition: all 0.3s;
	cursor: pointer;
}

.dice::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(145deg, #ffffff, #f0f4fa);
	border-radius: 20px;
	box-shadow: 0 15px 30px -10px #000000cc;
	transform: translateZ(2px);
}

.dice::after {
	content: attr(data-value);
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 4rem;
	color: #1e293b;
	transform: translateZ(10px);
	pointer-events: none;
}

.dice:hover {
	transform: translateY(-8px) rotateX(10deg);
}

.dice.selected::before {
	background: linear-gradient(145deg, #f0fff0, #d0ffd0);
	box-shadow: 0 20px 40px #4caf4f80,
			   0 0 0 4px #4CAF50 inset;
}

.dice.computer {
	cursor: default;
}

.dice.computer::before {
	background: linear-gradient(145deg, #2d3b5a, #1a2540);
}

.dice.computer::after {
	color: white;
}

@keyframes roll3D {
	0% { transform: rotateX(0deg); }
	100% { transform: rotateX(720deg); }
}

.rolling .dice::before {
	animation: roll3D 0.8s ease-out;
}

.action-bar {
	display: flex;
	gap: 20px;
	justify-content: center;
	margin-top: 16px;
}

.btn {
	padding: 16px 48px;
	font-size: 1.3rem;
	font-weight: 600;
	border: none;
	border-radius: 60px;
	background: linear-gradient(135deg, #6366f1, #8b5cf6);
	color: white;
	cursor: pointer;
	transition: all 0.3s;
	box-shadow: 0 20px 30px -10px #6366f180;
	display: flex;
	align-items: center;
	gap: 12px;
}

.btn:hover {
	transform: translateY(-5px);
	box-shadow: 0 30px 40px -10px #8b5cf6;
}

.btn.reset {
	background: linear-gradient(135deg, #ef4444, #dc2626);
}

.log-bar {
	background: linear-gradient(145deg, #1e293b, #0f172a);
	border-radius: 60px;
	padding: 20px 32px;
	margin: 20px 0;
	font-size: 1.2rem;
	color: white;
	border-left: 6px solid #f472b6;
}

.score-section {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 28px;
}

.score-card {
	background: linear-gradient(145deg, #1e293b, #0f172a);
	border-radius: 40px;
	padding: 28px;
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.score-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 24px;
	padding-bottom: 16px;
	border-bottom: 2px solid;
	border-image: linear-gradient(90deg, #6366f1, #ec4899) 1;
}

.score-header span:first-child {
	font-size: 1.6rem;
	font-weight: 700;
	background: linear-gradient(135deg, #fff, #cbd5e1);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}

.total-badge {
	background: linear-gradient(135deg, #f59e0b, #d97706);
	color: white;
	padding: 8px 24px;
	border-radius: 40px;
	font-size: 1.5rem;
	font-weight: 700;
}

.score-list {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 8px;
}

.score-item {
	background: rgba(255, 255, 255, 0.05);
	border-radius: 20px;
	padding: 12px 16px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.score-item:not(.used) {
	cursor: pointer;
}

.score-item:not(.used):hover {
	background: rgba(99, 102, 241, 0.2);
	border-color: #6366f1;
	transform: translateX(5px);
}

.score-item.used {
	opacity: 0.5;
	cursor: not-allowed;
}

.score-item.can-enter {
	background: rgba(76, 175, 80, 0.15);
	border: 2px solid #4CAF50;
	animation: pulse 2s infinite;
}

@keyframes pulse {
	0%, 100% { box-shadow: 0 0 10px #4CAF50; }
	50% { box-shadow: 0 0 20px #4CAF50; }
}

.score-cat {
	color: #94a3b8;
}

.score-value {
	font-size: 1.5rem;
	font-weight: 700;
	color: #f472b6;
	min-width: 40px;
	text-align: center;
}

.result-box {
	text-align: center;
	font-size: 2rem;
	font-weight: 700;
	margin-top: 32px;
	padding: 24px;
	background: linear-gradient(145deg, #1e293b, #0f172a);
	border-radius: 60px;
	color: white;
}

.status-box {
	background: rgba(255, 255, 255, 0.1);
	border-radius: 20px;
	padding: 15px;
	margin: 15px 0;
	text-align: center;
	font-size: 1.2rem;
	font-weight: bold;
	color: white;
}

.status-warning {
	background: rgba(244, 114, 182, 0.3);
	border: 2px solid #f472b6;
}

.status-success {
	background: rgba(76, 175, 80, 0.3);
	border: 2px solid #4CAF50;
}