:root {
	--question-color: #2a2a2a;
	--feedback-box-background: white;
}

[data-theme="dark"] {
	--question-color: #a2e0a8;
	--feedback-box-background: #0f1220;
}


/* ==== QUESTIONS ===== */

.personality-test {
    padding: 40px 6vw;
	padding-top: 0;
	margin: auto;
    font-family:system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.personality-test a {
	color: inherit;
	transition: all 0.2s ease;
}

.personality-test a:hover {
	color: #53cdf3;
	text-decoration: none;
}

/* HEADINGS */

.personality-test h1 {
	font-size: clamp(calc(1.5rem + var(--font-size-large)), 7.5vw, calc(2.5rem + var(--font-size-large)));
    margin-bottom: 30px;
	margin-top: 0;
    font-weight: 700;
	text-align: center;
	background: linear-gradient(140deg, #5200d7, #693dae 30%, #9370cf 60%, #9769e1 90%);
	-webkit-background-clip: text; 
	background-clip: text; 
	-webkit-text-fill-color: transparent;
}

.personality-test h1 svg {
	fill: #5200d7;
	transform: scale(1.75);
}

.personality-test-result h3{
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.personality-test-result h4{
    font-size:1.1rem;
    margin-bottom:8px;
}

.question-container {
	margin-top: 1rem;
}

.question-container h2 {
	font-size: 1.5rem;
	color: var(--question-color);
}

.answers {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin-top: 0.75rem;
}

.answer-button {
	padding: 0.5rem;
	font-size: 1rem;
	font-weight: 500;
	cursor: pointer;
	border-radius: 8px;
	border: 1px solid #ccc;
	background: #fff;
	transition: 0.2s;
}

.answer-button:hover {
	background: #f2f2f2;
}

.answer-button:focus {
	transform: translateY(1px) scale(0.95);
}

#anchor {
    scroll-margin-top: 150px;
}

/* QUESTION FINISH */

.test-finished a {
	text-decoration: none;
	display: inline-block;
	margin: 0.5rem 0;
}
.test-finished button {
	border: none;
    padding: 10px 18px;
    border-radius: 8px;
	cursor: pointer;
	transition: 0.25s;
	color: gray;
}

.result-button {
    background: linear-gradient(140deg, #49ae77, #106f3b);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.25s;
}

.result-button:hover{
    background: linear-gradient(140deg, #3ee58a, #036931);
    transform: translateY(-1px);
}

.test-finishe-reset-button {
	margin: 1rem 0;
	display: inline-block;
}

.test-finishe-reset-button button {
	background: linear-gradient(140deg, #dd6c6c, #b12525);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.25s;
}

.test-finishe-reset-button button:hover {
	background: linear-gradient(140deg, #eba1a1, #c12f2f);
    transform: translateY(-1px);
}

/* PROGRESS */

.progress {
	font-size: 0.8rem;
	opacity: 0.7;
	margin-bottom: 0.5rem;
}

/* NAVIGATIOJN */

.navigation {
	display: flex;
	justify-content: space-between;
	margin: 2rem 0;
}

.nav-btn {
	padding:10px 18px;
	border-radius:8px;
	background:#eee;
	border:none;
	cursor:pointer;
}

.analysis-toggle {
	margin-top: 30px;
	cursor: pointer;
	font-size: 14px;
	opacity: 0.7;
}

.analysis-box {
	display: none;
	margin-top: 15px;
	padding: 20px;
	background: #f8f8f8;
	border-radius: 8px;
}

/* FEEDBACK BOX */

.feedback-box {
}

@media (max-width: 500px) {
	.feedback-box {
		position: fixed;
		bottom: 0;
		left: 0;
		background: var(--feedback-box-background);
		width: 100%;
		font-size: 0.5rem;
	}
	.feedback-box p {
		font-size: 0.9rem !important;
	}
	.feedback-box-wrapper {
		padding: 0 1rem;
	}
}

@font-face {
    font-family: 'Sansation';
    src: url('../lib/fonts/Sansation/Sansation-Bold.woff2') format('woff2'),
        url('../lib/fonts/Sansation/Sansation-Bold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

.feedback-box p {
	font-size: 1rem;
	font-family: "Sansation";
	/*background: linear-gradient(140deg, #471e89, #693dae 30%, #471e89 60%, #471e89 90%);
	-webkit-background-clip: text; 
	background-clip: text; 
	-webkit-text-fill-color: transparent;*/
	color: #693dae;
	fill: #693dae;
	gap: 0.15rem;
}

.feedback-dots {
	letter-spacing: 0;
	display: inline-flex;
}

.feedback-dot-1 {
	animation: dotdelay1 2.5s ease-in-out infinite;
	transition: all 0.2s ease;
}

.feedback-dot-2 {
	animation: dotdelay2 2.5s ease-in-out infinite;
	transition: all 0.2s ease;
}

.feedback-dot-3 {
	animation: dotdelay3 2.5s ease-in-out infinite;
	transition: all 0.2s ease;
}

@keyframes dotdelay1 {
	0% {
		opacity: 0;
		transform: translateY(-4px) translateX(-1px) scale(1.5);
	}
	10% {
		opacity: 1;
		transform: translateY(0) translateX(0) scale(1);
	}
	96% {
		opacity: 1;
		transform: translateY(0);
		transition: transform 0s ease !important;
	}
	100% {
		opacity: 0;
		transform: translateY(-4px) translateX(-1px);
		transition: transform 0s ease !important;
	}
}

@keyframes dotdelay2 {
	0% {
		opacity: 0;
		transform: translateY(-4px) translateX(-1px);
	}
	10% {
		opacity: 0;
		transform: translateY(-4px) translateX(-1px) scale(1.5);
	}
	50% {
		opacity: 1;
		transform: translateY(0) translateX(0) scale(1);
	}
	93% {
		opacity: 1;
	}
	100% {
		opacity: 0;
	}
}

@keyframes dotdelay3 {
	0% {
		opacity: 0;
		transform: translateY(-4px) translateX(-1px);
	}
	33% {
		opacity: 0;
		transform: translateY(-4px) translateX(-1px) scale(1.5);
	}
	66% {
		opacity: 1;
		transform: translateY(0) translateX(0) scale(1);
	}
	90% {
		opacity: 1;
	}
	100% {
		opacity: 0;
	}
}

.hints-detected ol li{
	animation: hintsdelay 3s ease infinite;
	will-change: transform, opacity;
}

@keyframes hintsdelay {
	0% {
		opacity: 0;
		transform: translateY(0) translateX(-10px);
	}
	33% {
		opacity: 1;
		transform: translateY(0) translateX(0);
	}
	66% {
		opacity: 1;
	}
	90% {
		opacity: 1;
	}
	100% {
		opacity: 0;
	}
}

.hints-detected li:nth-child(1) { animation-delay: 0.10s; }
.hints-detected li:nth-child(2) { animation-delay: 0.20s; }
.hints-detected li:nth-child(3) { animation-delay: 0.30s; }


/* ==== RESULTS ===== */

.personality-test-result {
    padding:40px 6vw;
	padding-top: 0;
    font-family:system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

/* HEADINGS */

.personality-test-result h1{
    font-size:2.5rem;
    margin-bottom:30px;
    font-weight:700;
	text-align: center;
}

.personality-test-result h2{
    font-size:1.8rem;
    margin:40px 0 20px;
    font-weight:600;
}

.personality-test-result h3{
    font-size:1.3rem;
    margin-bottom:10px;
}

.personality-test-result h4{
    font-size: 1.1rem;
    margin-bottom: 8px;
	margin-top: 0;
}

.answer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

#toggle-mode {
    font-size: 0.8rem;
    padding: 6px 10px;
    border: none;
    border-radius: 6px;
    background: #671b64;
    cursor: pointer;
    transition: all 0.2s ease;
}

#toggle-mode:hover {
    background: #81397e;
}

#toggle-mode.active {
    background: #333;
    color: white;
}

/* BUTTON */

.personality-test-result button{
    background:#111;
    color:white;
    border:none;
    padding:10px 18px;
    border-radius:8px;
    cursor:pointer;
    transition:0.25s;
}

.personality-test-result button:hover{
    background:#333;
    transform:translateY(-1px);
}

/* RESULT SECTION */

.results-container {
    display:grid;
    gap:20px;
    margin-top:20px;
}

.results-container h2 {
	margin-top: 0;
}

/* TRAIT CARDS */

.traits-container {
    padding: 1rem;
    border-radius:14px;
    transition:0.2s;
}

.traits-container:hover {
    color: gray;
}

/* UNSURE WARNINGS */

.unsure-container {
    border-left:4px solid #ffb347;
    padding:20px;
    border-radius:12px;
    margin-top:20px;
}

.unsure-container h3 {
	margin-top: 0;
}

.unsure-container p{
    margin:8px 0;
}

/* ANSWERS SECTION */

.answer-container{
    margin-top:50px;
}

.your-answer {
	color: green;
	text-decoration: underline;
	cursor: pointer;
	transition: all 0.2s ease;
}

.your-answer:hover {
	text-decoration: none;
}

.question-analysis {
    padding: 20px;
    margin-bottom: 0;
}

.question-analysis ol{
    padding-left:20px;
}

.question-analysis p{
    margin:8px 0;
}

/* ANALYSIS TEXT */

.answer-analysis-container {
    background: rgba(175, 210, 237, 0.7);
    border-radius:8px;
    font-size:0.95rem;
    line-height: 1.5;
	margin: 0;
	opacity: 0;
	transform: translateY(5px);
    transition: opacity 0.3s ease, transform 0.3s ease, padding 0.3s ease, margin 0.3s ease;
}

/* sichtbar */
.answer-analysis-container.show {
    opacity: 1;
	padding: 12px 14px;
    transform: translateY(0);
}

.answer-analysis-container.typing {
	white-space: pre-line;
}

.answer-analysis-container.finished {
	white-space: pre-line;
}

/* elegante Thinking Dots */
.thinking-dots {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    vertical-align: middle;
    line-height: 0;
    height: 1em;
}

.thinking-dots span {
    width: 6px;
    height: 6px;
    background: #888;
    border-radius: 50%;
    display: inline-block;
    animation: bounce 1.2s infinite ease-in-out;
}

.thinking-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.thinking-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Cursor */
.answer-analysis-container.typing::after {
    content: "_";
    margin-left: 2px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%,100% { opacity: 1; }
    50% { opacity: 0; }
}