html {
	font-size: 80%; /* alles 10% kleiner */
}

[data-bs-theme="dark"] body {
	background: linear-gradient(135deg, #0F0A30 0%, #3A2678 50%, #6A2CA0 100%);
	color: #fff;
}

[data-bs-theme="light"] body {
	background: linear-gradient(135deg, #F4EFFB 0%, #E6DFFC 50%, #D4C7F9 100%);
	color: #222;
}

/* Gesamter Spielbereich hat volle Browserhöhe */
.game-wrapper {
    height: 100vh;
}

/* SPIELFELD linke Spalte (Desktop) */
.board-container {
    border-radius: 12px;
    overflow: hidden;          /* kein Scrollen — Bild füllt Container */
    min-width: 260px;
    max-width: 100%;

    /* Quadrat erzwingen */
    aspect-ratio: 1 / 1;

    /* Maximalhöhe über gesamte Bildschirmhöhe */
    max-height: calc(100vh - 40px);

    position: relative; /* wichtig für absolute Spielfigur */
}

#leela-board {
    width: 100%;
    height: 100%;
    max-height: calc(100vh - 20px);
    position: relative; /* erlaubt leela-piece absolute Positionierung */
}

.board-image {
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    display: block;       /* verhindert Zentrierung */
    pointer-events: none;   /* Bild blockiert keine Klicks */
}

/* Würfelbereich auf Desktop fix unter dem Board */
/* .dice-container {
    height: 120px;
} */

/* KI-CHAT rechte Spalte */
.chat-container {
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(6px);
    border-radius: 12px;
    height: calc(100vh - 40px); /* volle Höhe der rechten Spalte */
    display: flex;
    flex-direction: column;
}

@media (orientation: portrait) {
	.board-container {
		width: 100%;
		max-height: 74vh;
		max-width: 74vh;
		aspect-ratio: 1 / 1;
	}
	.chat-container {
		width: 100%;
		height: calc(100vh - 100vw - 30px);
		min-height: 200px;
	}
}
@media (orientation: landscape) {
	.board-wrapper {
		flex: 0 0 auto;
		width: 100vh;
		max-width: 65%;
		aspect-ratio: 1 / 1;
	}
	.chat-wrapper {
		flex: 0 0 auto;
		width: calc(100vw - 100vh - 30px);
		min-width: 35%;
	}
	/* Extra small (Smartphones) */
	@media (min-width: 576px) {}
	/* Small (große Smartphones, kleine Tablets) */
	@media (min-width: 768px) {}
	/* Medium (Tablets, kleine Laptops) */
	@media (min-width: 992px) {}
	/* Large (Laptops, Desktop) */
	@media (min-width: 1200px) {}
	/* Extra Large (große Monitore) */
	@media (min-width: 1400px) {}	
}

/* Chatverlauf immer scrollable */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    border-radius: 6px;
    padding-right: 8px;
}

/* Chatblasen */
.chat-bubble {
    padding: 10px 14px;
    margin-bottom: 10px;
    border-radius: 12px;
    max-width: 85%;
}

.chat-messages .ai .chat-bubble {
    background: rgba(255,255,255,0.15);
    margin-right: auto;
}

/* Light mode AI bubble visibility */
[data-bs-theme="light"] .chat-messages .ai .chat-bubble {
    background: rgba(120, 70, 200, 0.15) !important;
    color: #3d2b68;
    backdrop-filter: saturate(150%);
    border: 1px solid rgba(120,70,200,0.25);
}

/* Pending / KI denkt nach – mystische Bubble */
.chat-messages .pending .chat-bubble {
    background: radial-gradient(circle at 50% 50%, rgba(180,140,255,0.35), rgba(90,40,140,0.25));
    font-style: italic;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    box-shadow: 0 0 12px rgba(180,140,255,0.4), 0 0 24px rgba(120,80,200,0.25);
    animation: mysticPulse 2s ease-in-out infinite;
}

/* Pending bubble light mode */
[data-bs-theme="light"] .chat-messages .pending .chat-bubble {
    background: radial-gradient(circle at 50% 50%, rgba(180,140,255,0.28), rgba(120,90,200,0.18)) !important;
    color: #553d89;
    border: 1px solid rgba(150,110,220,0.25);
}

/* Pulsierend mystischer Effekt */
@keyframes mysticPulse {
    0%   { transform: scale(1); opacity: 0.8; }
    50%  { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

.chat-messages .user .chat-bubble {
    background: rgba(74,144,226,0.3);
    margin-left: auto;
}

/* Light mode user bubble visibility */
[data-bs-theme="light"] .chat-messages .user .chat-bubble {
    background: rgba(100, 140, 255, 0.25) !important;
    color: #1f2750;
    border: 1px solid rgba(100,140,255,0.35);
}

.dice-image {
	width: 100%;
	height: 100%;
	max-width: 40px;
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.9)) brightness(1.2) sepia(1) hue-rotate(180deg) saturate(2);
}

.dice-image.rolling {
	animation: diceBounceSpin 0.6s linear infinite;
}

.dice-overlay.disabled {
	pointer-events: none;
	opacity: 0.5;
}


@keyframes diceBounceSpin {
	0%   { transform: rotate(0deg) scale(1); }
	25%  { transform: rotate(90deg) scale(1.05); }
	50%  { transform: rotate(180deg) scale(1); }
	75%  { transform: rotate(270deg) scale(1.05); }
	100% { transform: rotate(360deg) scale(1); }
}

/* RESPONSIVE ANPASSUNGEN FÜR TABLETS UND HANDYS */
/* @media (max-width: 991.98px) {	
} */

/* ===========================================================
   Mystic Expanded Chat Mode
   =========================================================== */

.chat-container.chat-expanded {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) scale(1);
    width: 92vw;
    height: 92vh;
    z-index: 99999;

    background: rgba(40, 10, 70, 0.88);
    backdrop-filter: blur(10px) saturate(180%);
    border: 1px solid rgba(200, 160, 255, 0.4);
    box-shadow: 0 0 45px rgba(160, 110, 255, 0.55),
                inset 0 0 25px rgba(180, 140, 255, 0.25);

    animation: mysticExpand 0.4s ease-out;
    border-radius: 20px;
}

/* ================================================
   Light Mode – Mystic Expanded Chat
   ================================================ */
[data-bs-theme="light"] .chat-container.chat-expanded {
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(120, 70, 200, 0.25);
    box-shadow: 0 0 35px rgba(160,110,255,0.35),
                inset 0 0 15px rgba(180,140,255,0.15);
}

[data-bs-theme="light"] .chat-header {
    border-bottom: 1px solid rgba(130,90,200,0.25);
}

[data-bs-theme="light"] .chat-title {
    color: #533d87;
}

[data-bs-theme="light"] .expand-icon {
    filter: drop-shadow(0 0 3px rgba(120,80,200,0.4));
}

/* Light Mode textarea + buttons */
[data-bs-theme="light"] .chat-container textarea {
    background: rgba(255,255,255,0.55);
    color: #3d2b68;
    border: 1px solid rgba(130, 90, 200, 0.35);
}

[data-bs-theme="light"] .chat-container button {
    background: rgba(160,110,255,0.25) !important;
    border: 1px solid rgba(160,110,255,0.45);
    color: #3d2b68;
}

[data-bs-theme="light"] .chat-container button:hover {
    background: rgba(160,110,255,0.35) !important;
}

@keyframes mysticExpand {
    0% { transform: translateX(-50%) scale(0.92); opacity: 0.3; }
    70% { transform: translateX(-50%) scale(1.02); opacity: 1; }
    100% { transform: translateX(-50%) scale(1); }
}

/* Header styling */
.chat-header {
    border-bottom: 1px solid rgba(200,160,255,0.2);
    padding-bottom: 6px;
}

.chat-title {
    color: #e7d9ff;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.chat-expand-toggle {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.chat-expand-toggle:hover {
    transform: scale(1.2);
}

.expand-icon {
    width: 22px;
    height: 22px;
    filter: drop-shadow(0 0 4px rgba(200,170,255,0.6));
}

/* Expanded message area */
.chat-container.chat-expanded .chat-messages {
    max-height: calc(92vh - 170px);
}

/* Expanded input styling */
.chat-container textarea {
    background: rgba(255,255,255,0.1);
    color: #efe7ff;
    border: 1px solid rgba(200,160,255,0.25);
}

.chat-container button {
    background: rgba(200,160,255,0.3) !important;
    border: 1px solid rgba(220,185,255,0.5);
    color: #f3e9ff;
}

.chat-container button:hover {
    background: rgba(220,185,255,0.45) !important;
}


/* ===========================================================
   Leela Spielfigur – Positionierung & Animation
   =========================================================== */

.leela-piece {
    position: absolute;
    width: 7%;
    height: auto;
    max-width: 55px;
    min-width: 22px;
    transform: translate(-50%, -50%);
    z-index: 50 !important;
    pointer-events: auto;       /* Klick wieder erlaubt */
    cursor: pointer;            /* Mauszeiger zeigt Klickbarkeit */
    transition: left 0.9s ease-in-out, top 0.9s ease-in-out;
}

.leela-piece:hover {
    filter: drop-shadow(0 0 10px rgba(200,160,255,0.75));
}

/* Schwebende mystische Bewegung während der Animation */
.leela-piece.moving {
    animation: leelaFloat 1.2s ease-in-out infinite alternate;
    filter: drop-shadow(0 0 8px rgba(200,150,255,0.55));
}

@keyframes leelaFloat {
    0%   { transform: translate(-50%, -50%) scale(1); }
    100% { transform: translate(-50%, -54%) scale(1.06); }
}

/* Glow-Effekt für dunkles Theme */
[data-bs-theme="dark"] .leela-piece.moving {
    filter: drop-shadow(0 0 10px rgba(200,160,255,0.7));
}

/* Glow-Effekt für helles Theme */
[data-bs-theme="light"] .leela-piece.moving {
    filter: drop-shadow(0 0 8px rgba(120,90,200,0.45));
}

/* ===========================================================
   Field Info Popup (Spielfeld-Info bei Klick auf Spielfigur)
   =========================================================== */

.field-info-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    animation: fadeInOverlay 0.25s ease-out;
}

.field-info-box {
    width: 90%;
    max-width: 640px;
	max-height: 90vh;
	overflow-y: auto;
    background: rgba(30, 10, 55, 0.95);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(200, 160, 255, 0.35);
    box-shadow: 0 0 35px rgba(150, 110, 255, 0.45),
                inset 0 0 18px rgba(180, 140, 255, 0.2);
    animation: fieldInfoZoom 0.3s ease-out;
    color: #f4eaff;
}

/* Light mode Anpassung */
[data-bs-theme="light"] .field-info-overlay {
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(6px);
}

[data-bs-theme="light"] .field-info-box {
    background: rgba(255,255,255,0.85);
    border: 1px solid rgba(140, 90, 200, 0.3);
    box-shadow: 0 0 25px rgba(150,110,255,0.25),
                inset 0 0 12px rgba(180,140,255,0.1);
    color: #3b2f55;
}

/* Animationen */
@keyframes fadeInOverlay {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes fieldInfoZoom {
    0%   { transform: scale(0.92); opacity: 0; }
    80%  { transform: scale(1.02); opacity: 1; }
    100% { transform: scale(1); }
}

/* Button Styling im Popup */
.field-info-box button {
    min-width: 100px;
    background: rgba(200,160,255,0.25);
    border: 1px solid rgba(200,160,255,0.45);
}

.field-info-box button:hover {
    background: rgba(200,160,255,0.45) !important;
}

/* Titel + Untertitel */
.field-title {
	font-size: 1.4rem;
	font-weight: 700;
	text-align: center;
}
.field-subtitle {
	font-size: 1rem;
	text-align: center;
	opacity: 0.85;
}

/* Sections */
.field-description p,
.field-level,
.field-reflection ul,
.field-mantra {
	line-height: 1.5;
}

.field-reflection ul {
	padding-left: 18px;
	margin: 0;
}

.mantra-text {
	font-style: italic;
	font-size: 1.1rem;
	text-align: center;
	padding: 0.5rem 0;
	color: var(--bs-primary);
}

/* Scrollbars */
.field-info-box::-webkit-scrollbar {
	width: 8px;
}
.field-info-box::-webkit-scrollbar-thumb {
	background: rgba(140, 140, 140, 0.3);
	border-radius: 4px;
}

/* Mystischer Leela-Button (Beenden-Button / allgemein nutzbar) */
.btn-leela-end {
    background: linear-gradient(135deg, #5e2e91 0%, #b67ee9 100%);
    border: none;
    color: #fff !important;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(150, 90, 200, 0.45);
    transition: all 0.25s ease;
}

.btn-leela-end:hover {
    background: linear-gradient(135deg, #6933a1 0%, #c38bff 100%);
    box-shadow: 0 0 14px rgba(170, 110, 230, 0.55);
    transform: translateY(-1px);
}

.btn-leela-end:active {
    transform: translateY(0);
    box-shadow: 0 0 6px rgba(150, 90, 200, 0.35);
}

/* ===========================================================
   Intro‑Screen – Voller Leela‑Stil
   =========================================================== */

.intro-screen-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: radial-gradient(circle at 50% 30%, rgba(90,40,160,0.55), rgba(20,10,40,0.9));
    backdrop-filter: blur(10px) saturate(160%);
    display: flex;
    justify-content: center;
    align-items: center;
    animation: introFadeIn 1.5s ease-out;
}

[data-bs-theme="light"] .intro-screen-overlay {
    background: radial-gradient(circle at 50% 30%, rgba(200,160,255,0.4), rgba(240,230,255,0.85));
    backdrop-filter: blur(10px) saturate(180%);
}

.intro-screen-box {
    width: 92%;
    max-width: 480px;
    padding: 32px;
    background: rgba(35,15,75,0.92);
    border-radius: 18px;
    border: 1px solid rgba(200,160,255,0.35);
    box-shadow: 0 0 45px rgba(160,110,255,0.55),
                inset 0 0 22px rgba(180,140,255,0.18);
    animation: introZoom 2.55s ease-out;
}

[data-bs-theme="light"] .intro-screen-box {
    background: rgba(255,255,255,0.88);
    border: 1px solid rgba(150,90,220,0.3);
    box-shadow: 0 0 32px rgba(150,110,255,0.25),
                inset 0 0 15px rgba(180,140,255,0.12);
}

.intro-title {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #e8d9ff;
    text-shadow: 0 0 12px rgba(180,140,255,0.55);
}

[data-bs-theme="light"] .intro-title {
    color: #4b337d;
    text-shadow: 0 0 6px rgba(150,110,255,0.35);
}

.intro-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    color: #d9c9ff;
}

[data-bs-theme="light"] .intro-subtitle {
    color: #5a3c99;
}

/* Animations */
@keyframes introFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes introZoom {
    0%   { transform: scale(0.92); opacity: 0; }
    70%  { transform: scale(1.04); opacity: 1; }
    100% { transform: scale(1); }
}

.mail-btn {
    min-width: 100px;
    text-align: center;
}

.social-icon-btn {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: rgba(255,255,255,0.1);
	display: flex;
	justify-content: center;
	align-items: center;
	transition: 0.25s ease;
	backdrop-filter: blur(6px);
}
.social-icon-btn img {
	width: 22px;
	height: 22px;
	filter: drop-shadow(0 0 4px rgba(0,0,0,0.4));
}
.social-icon-btn:hover {
	background: rgba(255,255,255,0.25);
	transform: scale(1.08);
}

.mic-btn.listening svg {
	color: red !important;
	animation: pulse 1.4s infinite ease-in-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        /* box-shadow: 0 0 6px rgba(200,160,255,0.3); */
    }
    50% {
        transform: scale(1.35);
        /* box-shadow: 0 0 14px rgba(200,160,255,0.6); */
    }
    100% {
        transform: scale(1);
        /* box-shadow: 0 0 6px rgba(200,160,255,0.3); */
    }
}

a.disabled-link {
	pointer-events: none;
	opacity: 0.5;
	cursor: not-allowed;
}