@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

body {
	background-color: rgb(15, 25, 18);
	font-family: 'Montserrat', sans-serif;
	margin: 0;
}

h1,
p {
	color: rgb(225, 240, 230);
}

main {
	padding-top: 167px;
}

h1 {
	font-style: italic;
	text-align: center;
	margin-top: 80px;
	font-size: 52px;
}

p {
	text-align: center;
	font-size: 24px;
	margin-top: 40px;
}

#homebutton {
	font-family: 'Montserrat', sans-serif;
	background-color: rgb(35, 60, 45);
	color: rgb(225, 240, 230);
	border: 1px solid rgb(70, 120, 85);
	font-size: 20px;
	width: 150px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	transition: all 0.2s ease-in-out;
	border-radius: 5px;
	padding-top: 5px;
	padding-bottom: 5px;
}

#homebutton img {
	width: 40px;
	height: 40px;
}

#homebutton:hover {
	background-color: rgb(50, 85, 60);
	border-color: rgb(100, 150, 110);
	cursor: pointer;
}

#homebuttons {
	display: flex;
	justify-content: center;
	gap: 50px;
	margin-top: 60px;
}

#logo {
	height: 55px;
	vertical-align: middle;
}

#bmtext {
	margin-top: 65px;
	color: rgb(225, 240, 230);
	text-align: center;
}

nav {
	position: fixed;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 85vw;
	height: 48px;
	background-color: rgb(25, 40, 32);
	display: flex;
	align-items: center;
	justify-content: flex-start;
	padding: 0 25px;
	border-radius: 15px;
	border: 1px solid rgb(70, 120, 85);
	z-index: 100;
	margin-top: 5px;
}

.navlink img {
	height: 35px;
}

#awp {
	height: 32px;
	transition: all 0.2s ease-in-out;
}

#awp:hover {
	rotate: -10deg;
	cursor: pointer;
}

.right-container {
	margin-left: auto;
	display: flex;
	gap: 35px;
}

.nobmtext {
	color: rgb(100, 130, 110);
	font-size: 20px;
	display: none;
}

.nobmtext.active {
	display: block;
}

#inj,
#injtool,
#partners {
	display: flex;
	flex-wrap: wrap;
	gap: 30px;
	margin-top: 60px;
	justify-content: center;
	margin-left: 20px;
	margin-right: 20px;
	text-decoration: none;
}

#partners a {
	text-decoration: none;
}

#particles-js {
	width: 100%;
	height: 100%;
	background-position: 50% 50%;
	position: fixed;
	top: 0px;
	z-index: -1;
}

#flashcard {
	background-color: rgb(35, 60, 45);
	border-radius: 15px;
	width: 220px;
	height: 225px;

	#sj-frame {
		border: none;
		position: absolute;
		top: 0;
		left: 0;
		width: 100vw;
		height: 100vh;
		background-color: #111;
	}

	#sj-error {
		color: #ff6666 !important;
		white-space: pre-wrap;
	}

	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 13px;
	gap: 7px;
	transition: all 0.2s ease-in-out;
	border: 1px solid rgb(70, 120, 85);
}

#flashcardpreview {
	width: 200px;
	height: 150px;
	background-color: rgb(20, 32, 25);
	border-radius: 10px;
	display: flex;
	justify-content: center;
	align-items: center;
	overflow: hidden;
}

#flashcardpreview img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

#flashcardanswer {
	margin: 5px;
	font-size: 23px;
	text-align: center;
	line-height: 1.2;
	color: rgb(225, 240, 230);
}

#flashcard:hover {
	background-color: rgb(50, 85, 60);
	border-color: rgb(100, 150, 110);
	cursor: pointer;
}

#injtool a,
#inj a {
	text-decoration: none;
	color: inherit;
}

#homebuttons2 {
	display: flex;
	justify-content: center;
	gap: 50px;
	margin-top: 20px;
}

#iframe-container {
	position: relative;
	width: 85%;
	height: calc(100vh - 100px);
	margin: 0 auto;
	top: 65px;
}

#studyframe {
	width: 100%;
	height: 100%;
	border: none;
	opacity: 0;
	transition: opacity 0.3s ease;
	position: relative;
	z-index: 1;
}

#loading-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: #1b3030;
	display: flex;
	align-items: center;
	justify-content: center;
	color: white;
	font-size: 24px;
	transition: opacity 0.3s ease;
	z-index: 2;
}

#loading-overlay.hidden {
	opacity: 0;
	pointer-events: none;
}

.settings-wrapper {
	max-width: 700px;
	margin: 0 auto;
	padding: 20px 20px 60px;
}

.settings-section {
	background-color: rgb(25, 40, 32);
	border: 1px solid rgb(70, 120, 85);
	border-radius: 15px;
	padding: 28px 32px;
	margin-bottom: 24px;
}

.settings-section h2 {
	color: rgb(225, 240, 230);
	font-size: 20px;
	margin: 0 0 6px 0;
	font-style: italic;
}

.settings-section p.desc {
	color: rgb(130, 170, 140);
	font-size: 13px;
	margin: 0 0 20px 0;
	text-align: left;
}

.setting-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
}

.setting-label {
	color: rgb(200, 225, 210);
	font-size: 15px;
}

/* Dropdown */
select.setting-select {
	font-family: 'Montserrat', sans-serif;
	background-color: rgb(35, 60, 45);
	color: rgb(225, 240, 230);
	border: 1px solid rgb(70, 120, 85);
	border-radius: 8px;
	padding: 8px 14px;
	font-size: 14px;
	cursor: pointer;
	outline: none;
	transition: all 0.2s;
	min-width: 200px;
}

select.setting-select:hover,
select.setting-select:focus {
	background-color: rgb(50, 85, 60);
	border-color: rgb(100, 150, 110);
}

/* Button */
button.setting-btn {
	font-family: 'Montserrat', sans-serif;
	background-color: rgb(35, 60, 45);
	color: rgb(225, 240, 230);
	border: 1px solid rgb(70, 120, 85);
	border-radius: 8px;
	padding: 9px 22px;
	font-size: 14px;
	cursor: pointer;
	transition: all 0.2s;
}

button.setting-btn:hover {
	background-color: rgb(50, 85, 60);
	border-color: rgb(100, 150, 110);
}

/* Open in About:Blank sub-options */
.ablank-options {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin-top: 16px;
}

.ablank-options label {
	color: rgb(180, 210, 190);
	font-size: 13px;
	display: flex;
	flex-direction: column;
	gap: 5px;
}

input.setting-input {
	font-family: 'Montserrat', sans-serif;
	background-color: rgb(35, 60, 45);
	color: rgb(225, 240, 230);
	border: 1px solid rgb(70, 120, 85);
	border-radius: 8px;
	padding: 8px 14px;
	font-size: 14px;
	outline: none;
	transition: all 0.2s;
	width: 100%;
	box-sizing: border-box;
}

input.setting-input:focus {
	border-color: rgb(100, 150, 110);
	background-color: rgb(50, 85, 60);
}

.toast {
	position: fixed;
	bottom: 30px;
	left: 50%;
	transform: translateX(-50%) translateY(20px);
	background-color: rgb(50, 85, 60);
	color: rgb(225, 240, 230);
	border: 1px solid rgb(100, 150, 110);
	border-radius: 10px;
	padding: 12px 28px;
	font-size: 14px;
	font-family: 'Montserrat', sans-serif;
	opacity: 0;
	transition: opacity 0.3s, transform 0.3s;
	z-index: 999;
	pointer-events: none;
}

.toast.show {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

/* ── Page header ── */
.community-header {
	padding: 60px 40px 30px;
	text-align: center;
}

.community-header h1 {
	font-family: 'Montserrat', sans-serif;
	font-style: italic;
	font-weight: 700;
	font-size: clamp(32px, 5vw, 56px);
	color: rgb(225, 240, 230);
	margin: 0 0 10px;
	letter-spacing: -1px;
}

.community-header p {
	font-family: 'Montserrat', sans-serif;
	color: rgb(150, 180, 160);
	font-size: 16px;
	margin: 0;
}

/* ── Search / filter bar ── */
.community-controls {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 14px;
	padding: 0 40px 40px;
	flex-wrap: wrap;
}

.community-search {
	font-family: 'Montserrat', sans-serif;
	background-color: rgb(35, 60, 45);
	color: rgb(225, 240, 230);
	border: 1px solid rgb(70, 120, 85);
	border-radius: 10px;
	padding: 13px 20px;
	font-size: 15px;
	outline: none;
	width: 320px;
	transition: border-color 0.2s, background-color 0.2s;
}

.community-search::placeholder {
	color: rgb(130, 165, 145);
}

.community-search:focus {
	border-color: rgb(100, 160, 115);
	background-color: rgb(40, 70, 50);
}

.community-sort {
	font-family: 'Montserrat', sans-serif;
	background-color: rgb(35, 60, 45);
	color: rgb(225, 240, 230);
	border: 1px solid rgb(70, 120, 85);
	border-radius: 10px;
	padding: 13px 16px;
	font-size: 15px;
	outline: none;
	cursor: pointer;
	transition: border-color 0.2s;
}

.community-sort:focus {
	border-color: rgb(100, 160, 115);
}

.community-sort option {
	background-color: rgb(35, 60, 45);
}

/* ── User grid ── */
.user-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 20px;
	padding: 0 40px 40px;
	max-width: 1400px;
	margin: 0 auto;
}

/* ── User card ── */
.user-card {
	background-color: rgb(25, 45, 33);
	border: 1px solid rgb(55, 100, 70);
	border-radius: 14px;
	padding: 28px 20px 22px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	cursor: default;
	transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
	animation: cardIn 0.4s ease both;
}

@keyframes cardIn {
	from {
		opacity: 0;
		transform: translateY(16px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.user-card:hover {
	transform: translateY(-4px);
	border-color: rgb(90, 145, 105);
	background-color: rgb(30, 55, 40);
}

.user-card-pfp {
	width: 80px;
	height: 80px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid rgb(70, 120, 85);
	background-color: rgb(40, 70, 50);
	transition: border-color 0.2s;
	flex-shrink: 0;
}

.user-card:hover .user-card-pfp {
	border-color: rgb(100, 160, 115);
}

.user-card-name {
	font-family: 'Montserrat', sans-serif;
	font-weight: 600;
	font-size: 15px;
	color: rgb(215, 235, 220);
	text-align: center;
	word-break: break-word;
	line-height: 1.3;
}

.user-card-joined {
	font-family: 'Montserrat', sans-serif;
	font-size: 11px;
	color: rgb(110, 150, 125);
	text-align: center;
}

/* ── Skeleton loader ── */
.user-card-skeleton {
	background-color: rgb(25, 45, 33);
	border: 1px solid rgb(55, 100, 70);
	border-radius: 14px;
	padding: 28px 20px 22px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
}

.skeleton {
	background: linear-gradient(90deg,
			rgb(35, 60, 45) 25%,
			rgb(50, 85, 60) 50%,
			rgb(35, 60, 45) 75%);
	background-size: 200% 100%;
	animation: shimmer 1.4s infinite;
	border-radius: 6px;
}

.skeleton-circle {
	width: 80px;
	height: 80px;
	border-radius: 50%;
}

.skeleton-text-lg {
	width: 100px;
	height: 14px;
}

.skeleton-text-sm {
	width: 70px;
	height: 10px;
}

@keyframes shimmer {
	0% {
		background-position: 200% 0;
	}

	100% {
		background-position: -200% 0;
	}
}

/* ── Pagination ── */
.pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	padding: 0 40px 60px;
	flex-wrap: wrap;
}

.page-btn {
	font-family: 'Montserrat', sans-serif;
	background-color: rgb(35, 60, 45);
	color: rgb(200, 225, 210);
	border: 1px solid rgb(70, 120, 85);
	border-radius: 8px;
	padding: 10px 18px;
	font-size: 14px;
	cursor: pointer;
	transition: all 0.2s ease;
	min-width: 42px;
	text-align: center;
}

.page-btn:hover:not(:disabled) {
	background-color: rgb(50, 85, 60);
	border-color: rgb(100, 150, 110);
	color: rgb(225, 240, 230);
}

.page-btn.active {
	background-color: rgb(60, 110, 75);
	border-color: rgb(100, 160, 115);
	color: rgb(230, 245, 235);
	font-weight: 600;
}

.page-btn:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

/* ── Status messages ── */
.status-msg {
	text-align: center;
	font-family: 'Montserrat', sans-serif;
	padding: 60px 40px;
	color: rgb(150, 180, 160);
	font-size: 16px;
}

.status-msg.error {
	color: rgb(255, 130, 130);
}

.status-msg span {
	font-style: italic;
}

/* ── Responsive ── */
@media (max-width: 600px) {
	.community-header {
		padding: 40px 20px 20px;
	}

	.user-grid {
		grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
		padding: 0 20px 30px;
		gap: 14px;
	}

	.community-controls {
		padding: 0 20px 30px;
	}

	.community-search {
		width: 100%;
	}

	.pagination {
		padding: 0 20px 40px;
		gap: 6px;
	}

	.page-btn {
		padding: 8px 13px;
		font-size: 13px;
	}
}

#dmca-content {
	max-width: 800px;
	margin: 40px auto;
	padding: 0 20px;
	line-height: 1.7;
}

#dmca-content h1 {
	font-size: 2.2rem;
	margin-bottom: 20px;
}

#dmca-content h2 {
	font-size: 1.3rem;
	margin-top: 35px;
	margin-bottom: 10px;
}

#dmca-content p {
	font-size: 0.95rem;
	margin-bottom: 10px;
}

#dmca-content ul {
	font-size: 0.95rem;
	padding-left: 20px;
	margin-bottom: 10px;
}

#dmca-content ul li {
	margin-bottom: 8px;
}

#chat-page {
	display: flex;
	flex-direction: column;
	height: 100vh;
	padding-top: 72px;
}

#model-bar {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	padding: 10px 20px 8px;
	border-bottom: 1px solid rgb(35, 58, 45);
	flex-shrink: 0;
}

.model-btn {
	font-family: 'Montserrat', sans-serif;
	background: transparent;
	color: rgb(110, 155, 125);
	border: 1px solid transparent;
	border-radius: 20px;
	padding: 5px 14px;
	font-size: 11px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.18s ease;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.model-btn:hover {
	color: rgb(190, 220, 200);
	border-color: rgb(60, 100, 75);
	background: rgb(25, 42, 32);
}

.model-btn.active {
	color: rgb(220, 245, 228);
	border-color: rgb(80, 140, 100);
	background: rgb(30, 52, 38);
}

#messages {
	flex: 1;
	overflow-y: auto;
	padding: 28px 0 16px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	scroll-behavior: smooth;
}

#messages::-webkit-scrollbar {
	width: 5px;
}

#messages::-webkit-scrollbar-track {
	background: transparent;
}

#messages::-webkit-scrollbar-thumb {
	background: rgb(45, 75, 58);
	border-radius: 3px;
}

.msg-row {
	display: flex;
	flex-direction: column;
	padding: 3px clamp(20px, 8vw, 180px);
	animation: msgIn 0.2s ease both;
}

.msg-row.user {
	align-items: flex-end;
}

.msg-row.assistant {
	align-items: flex-start;
}

@keyframes msgIn {
	from {
		opacity: 0;
		transform: translateY(8px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.msg-label {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	margin-bottom: 4px;
	padding: 0 4px;
}

.msg-row.user .msg-label {
	color: rgb(100, 160, 120);
}

.msg-row.assistant .msg-label {
	color: rgb(80, 125, 100);
}

.bubble {
	max-width: min(640px, 85%);
	padding: 11px 16px;
	border-radius: 14px;
	font-size: 14px;
	line-height: 1.7;
	word-break: break-word;
	white-space: pre-wrap;
}

.bubble.user {
	background-color: rgb(38, 68, 50);
	border: 1px solid rgb(65, 110, 80);
	color: rgb(225, 245, 232);
	border-bottom-right-radius: 3px;
}

.bubble.assistant {
	background-color: rgb(22, 36, 28);
	border: 1px solid rgb(45, 80, 58);
	color: rgb(200, 228, 210);
	border-bottom-left-radius: 3px;
}

.typing-dots {
	display: flex;
	gap: 5px;
	align-items: center;
	padding: 2px 0;
}

.typing-dots span {
	width: 6px;
	height: 6px;
	background: rgb(90, 145, 110);
	border-radius: 50%;
	animation: dot 1.2s infinite ease-in-out;
}

.typing-dots span:nth-child(2) {
	animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
	animation-delay: 0.4s;
}

@keyframes dot {

	0%,
	80%,
	100% {
		transform: translateY(0);
		opacity: 0.4;
	}

	40% {
		transform: translateY(-5px);
		opacity: 1;
	}
}

#empty-state {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	pointer-events: none;
	user-select: none;
}

#empty-state svg {
	opacity: 0.18;
}

#empty-state p {
	font-size: 13px;
	font-style: italic;
	color: rgb(80, 120, 95);
	margin: 0;
	text-align: center;
}

#input-area {
	flex-shrink: 0;
	padding: 10px clamp(20px, 8vw, 180px) 18px;
	border-top: 1px solid rgb(35, 58, 45);
}

#input-row {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	background-color: rgb(22, 36, 28);
	border: 1px solid rgb(60, 105, 75);
	border-radius: 14px;
	padding: 9px 12px;
	transition: border-color 0.18s;
}

#input-row:focus-within {
	border-color: rgb(90, 150, 108);
}

#user-input {
	flex: 1;
	font-family: 'Montserrat', sans-serif;
	font-size: 14px;
	background: transparent;
	border: none;
	outline: none;
	color: rgb(220, 240, 228);
	resize: none;
	max-height: 140px;
	line-height: 1.55;
	overflow-y: auto;
}

#user-input::placeholder {
	color: rgb(70, 110, 88);
}

#user-input::-webkit-scrollbar {
	width: 3px;
}

#user-input::-webkit-scrollbar-thumb {
	background: rgb(55, 90, 68);
	border-radius: 2px;
}

#send-btn {
	flex-shrink: 0;
	width: 32px;
	height: 32px;
	border-radius: 9px;
	border: none;
	background-color: rgb(45, 88, 60);
	color: rgb(210, 240, 220);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.18s;
}

#send-btn:hover:not(:disabled) {
	background-color: rgb(60, 110, 78);
}

#send-btn:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

#input-meta {
	display: flex;
	justify-content: flex-end;
	margin-top: 6px;
}

#clear-btn {
	font-family: 'Montserrat', sans-serif;
	background: transparent;
	color: rgb(60, 98, 78);
	border: none;
	font-size: 11px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	cursor: pointer;
	padding: 0;
	transition: color 0.18s;
}

#clear-btn:hover {
	color: rgb(140, 180, 158);
}

.bubble.error {
	background-color: rgb(50, 18, 18);
	border-color: rgb(120, 50, 50);
	color: rgb(255, 145, 145);
	font-style: italic;
}

#sj-frame {
	border: none;
	position: absolute;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background-color: #111;
	z-index: 999;
}

#sj-error {
	color: #ff6666 !important;
	white-space: pre-wrap;
}