:root {
	--primary-color: #8e44ad;
	--accent-color: #FF9800;
	--light-color: #E8F5E9;
	--dark-gray: #2d3748;
	--light-gray: #f7fafc;
}

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

body {
	font-family: 'Cairo', sans-serif;

}

.main-content {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
}

.hero-section {
	text-align: center;
	padding: 60px 20px;
	background: rgba(255, 255, 255, 0.9);
	border-radius: 15px;
	margin-bottom: 40px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.hero-section h1 {
	color: var(--primary-color);
	margin-bottom: 20px;
	font-size: 2.8rem;
}

.hero-section p {
	color: #666;
	font-size: 1.2rem;
	line-height: 1.8;
	max-width: 800px;
	margin: 0 auto 30px;
}

.features {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 30px;
	margin-top: 40px;
}

.feature-card {
	background: white;
	padding: 30px;
	border-radius: 15px;
	box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
	text-align: center;
	transition: transform 0.3s ease;
	border-top: 4px solid var(--accent-color);
}

.feature-card:hover {
	transform: translateY(-10px);
}

.feature-icon {
	font-size: 2.5rem;
	color: var(--primary-color);
	margin-bottom: 20px;
}


#creativeChatBtn {
	width: 70px;
	height: 70px;
	position: fixed;
	bottom: 40px;
	right: 40px;
	background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
	border: none;
	border-radius: 50%;
	color: white;
	font-size: 28px;
	cursor: pointer;
	box-shadow: 0 10px 30px rgba(76, 175, 80, 0.4);
	z-index: 10000;
	transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
	display: flex;
	align-items: center;
	justify-content: center;
	animation: creativePulse 2s ease-in-out infinite;
}

@keyframes creativePulse {

	0%,
	100% {
		transform: scale(1);
		box-shadow: 0 10px 30px rgba(76, 175, 80, 0.4);
	}

	50% {
		transform: scale(1.05);
		box-shadow: 0 15px 40px rgba(255, 152, 0, 0.5);
	}
}

#creativeChatBtn:hover {
	transform: scale(1.08);
	box-shadow:
		0 0 10px #fff,
		0 0 20px #fff,
		0 0 30px #FF6B6B,
		0 0 40px #FF6B6B;
	border: 2px solid white;
}


#creativeChatContainer {
	position: fixed;
	bottom: 130px;
	right: 40px;
	width: 500px;
	height: 700px;
	background: white;
	border-radius: 20px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
	z-index: 9998;
	overflow: hidden;
	border-right: 5px solid var(--accent-color);
	display: none;
	opacity: 0;
	transform: translateY(30px) scale(0.95);
	transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#creativeChatContainer.open {
	display: flex !important;
	flex-direction: column;
	opacity: 1;
	transform: translateY(0) scale(1);
}


.creative-chat-header {
	background: #5D09B5;
	color: white;
	padding: 10px;
	position: relative;
	flex-shrink: 0;
	border-bottom: 3px solid var(--accent-color);
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.assistant-title {
	display: flex;
	align-items: center;
	gap: 15px;
}

.assistant-icon {
	font-size: 1.8rem;
	color: white;
	animation: gentleSway 3s ease-in-out infinite;
}

@keyframes gentleSway {

	0%,
	100% {
		transform: rotate(0deg);
	}

	50% {
		transform: rotate(-10deg);
	}
}

.close-creative-chat {
	background: rgba(255, 255, 255, 0.2);
	border: 2px solid rgba(255, 255, 255, 0.4);
	color: white;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
	cursor: pointer;
}

.close-creative-chat:hover {
	background: rgba(255, 255, 255, 0.3);
	transform: rotate(-90deg);
}


.quick-topics-section {
	height: 220px;
	background: var(--light-gray);
	border-bottom: 2px solid #e2e8f0;
	padding: 20px;
	flex-shrink: 0;
}


.creative-tabs {
	display: flex;
	gap: 10px;
	margin-bottom: 20px;
	border-bottom: 2px solid #e2e8f0;
	padding-bottom: 15px;
}

.creative-tab {
	flex: 1;
	background: white;
	border: 2px solid #e2e8f0;
	color: #312F33;
	padding: 12px;
	border-radius: 10px;
	cursor: pointer;
	transition: all 0.2s ease;
	text-align: center;
	font-family: 'Cairo', sans-serif;
	font-weight: 600;
	font-size: 0.85rem;
	position: relative;
	overflow: hidden;
}

.creative-tab.active {
	background: var(--accent-color);
	color: white;
	border-color: var(--accent-color);
	box-shadow: 0 5px 15px rgba(255, 152, 0, 0.2);
}

.creative-tab:hover:not(.active) {
	border-color: var(--accent-color);
	color: white;
	background-color: #8e44ad;
}


.topics-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 6px 12px;
	row-gap: 6px;
	height: 140px;
	overflow-y: auto;
	padding: 10px;
	background-color: #F3EBFA;
	border-radius: 10px;
	border: 2px solid #e2e8f0;
	align-content: start;
	direction: rtl;
}

.topics-grid::-webkit-scrollbar {
	width: 8px;
}

.topics-grid::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 4px;
}

.topics-grid::-webkit-scrollbar-thumb {
	background: var(--primary-color);
	border-radius: 4px;
}

.topics-grid::-webkit-scrollbar-thumb:hover {
	background: #388E3C;
}


.topic-button {
	height: 38px;
	background: white;
	border: 2px solid #e2e8f0 !important;
	color: var(--dark-gray);
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.2s ease;
	font-size: 0.7rem;
	font-family: 'Cairo', sans-serif;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 0 8px;
	overflow: hidden;
	position: relative;
}

.topic-button:hover {
	background-color: gray !important;
	color: white !important;
}

.topic-button:active {
	transform: translateY(0);
}


.creative-messages {
	flex: 1;
	overflow-y: auto;
	padding: 25px;
	background: var(--light-gray);
	will-change: transform;
	direction: rtl;
	scroll-behavior: smooth;
	scrollbar-width: thin;
	scrollbar-color: var(--primary-color) #f1f1f1;
}

.creative-messages::-webkit-scrollbar {
	width: 8px;
}

.creative-messages::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 4px;
}

.creative-messages::-webkit-scrollbar-thumb {
	background: var(--primary-color);
	border-radius: 4px;
	cursor: grab;
}

.creative-messages::-webkit-scrollbar-thumb:hover {
	background: #388E3C;
}

.creative-messages::-webkit-scrollbar-thumb:active {
	cursor: grabbing;
}

.messages-wrapper {
	display: flex;
	flex-direction: column;
	gap: 20px;
	min-height: min-content;
	padding-bottom: 20px;
}


.creative-message {
	max-width: 95%;
	padding: 20px;
	border-radius: 15px;
	line-height: 1.6;
	font-size: 0.95rem;
	position: relative;
	animation: creativeMessageAppear 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
	transform-origin: center;
	opacity: 0;
	will-change: transform, opacity;
	text-align: right;
	word-wrap: break-word;
	overflow-wrap: break-word;
	word-break: break-word;
}

@keyframes creativeMessageAppear {
	from {
		opacity: 0;
		transform: translateY(20px) scale(0.95);
	}

	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.assistant-message {
	background: white;
	border: 2px solid #e2e8f0;
	align-self: flex-start;
	border-top-right-radius: 5px;
	color: var(--dark-gray);
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.user-message {
	background: linear-gradient(135deg, var(--primary-color), #66BB6A);
	align-self: flex-end;
	border-top-left-radius: 5px;
	color: white;
	box-shadow: 0 5px 15px rgba(76, 175, 80, 0.2);
}


.creative-input-section {
	height: 100px;
	padding: 20px;
	background: white;
	border-top: 2px solid #e2e8f0;
	flex-shrink: 0;
	position: relative;
}

.creative-input-section::before {
	content: '';
	position: absolute;
	top: 0;
	right: 0;
	width: 100%;
	height: 2px;
	background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
}

.input-group-creative {
	display: flex;
	gap: 15px;
	align-items: center;
}

.creative-input {
	flex: 1;
	height: 50px;
	background: var(--light-gray);
	border: 2px solid #e2e8f0;
	border-radius: 10px;
	padding: 0 25px;
	color: var(--dark-gray);
	font-family: 'Cairo', sans-serif;
	font-size: 1rem;
	transition: all 0.2s ease;
	text-align: right;
	direction: rtl;
}

.creative-input:focus {
	outline: none;
	border-color: var(--primary-color);
	box-shadow: 0 0 20px rgba(76, 175, 80, 0.1);
	background: white;
}

.creative-input::placeholder {
	color: #999;
}

.creative-send {
	width: 50px;
	height: 50px;
	background: linear-gradient(135deg, var(--primary-color), #66BB6A);
	border: none;
	border-radius: 10px;
	color: white;
	font-size: 1.2rem;
	cursor: pointer;
	transition: all 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
}

.creative-send:hover {
	transform: scale(1.1) rotate(-10deg);
	box-shadow: 0 10px 25px rgba(76, 175, 80, 0.3);
}


.typing-indicator {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 15px 20px;
	background: white;
	border-radius: 15px;
	width: fit-content;
	border: 2px solid #e2e8f0;
	margin-bottom: 20px;
	opacity: 0;
	animation: fadeIn 0.3s ease forwards;
	will-change: transform, opacity;
	direction: rtl;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.typing-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--primary-color);
	animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
	animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
	animation-delay: -0.16s;
}

@keyframes typingBounce {

	0%,
	80%,
	100% {
		transform: scale(0.8);
		opacity: 0.5;
	}

	40% {
		transform: scale(1.2);
		opacity: 1;
	}
}


@media (max-width: 768px) {
	#creativeChatContainer {
		width: 95vw;
		right: 2.5vw;
		left: 2.5vw;
		height: 85vh;
		bottom: 20px;
		max-height: 85vh;
	}

	#creativeChatBtn {
		width: 60px;
		height: 60px;
		bottom: 20px;
		right: 20px;
		font-size: 24px;
	}

	.topics-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.hero-section {
		padding: 40px 15px;
	}

	.hero-section h1 {
		font-size: 2rem;
	}

	.features {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 600px) {
	#creativeChatContainer {
		height: 90vh;
		bottom: 10px;
	}

	.quick-topics-section {
		height: 200px;
	}

	.topics-grid {
		grid-template-columns: 1fr;
		height: 120px;
	}
}


.typing-indicator {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 15px 20px;
	background: white;
	border-radius: 15px;
	width: fit-content;
	border: 2px solid #e2e8f0;
	margin-bottom: 20px;
	opacity: 0;
	animation: fadeIn 0.3s ease forwards;
	will-change: transform, opacity;
	direction: rtl;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.typing-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--primary-color);
	animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
	animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
	animation-delay: -0.16s;
}

@keyframes typingBounce {

	0%,
	80%,
	100% {
		transform: scale(0.8);
		opacity: 0.5;
	}

	40% {
		transform: scale(1.2);
		opacity: 1;
	}
}

.creative-typing {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 15px 20px;
	background: white;
	border-radius: 15px;
	width: fit-content;
	border: 2px solid #e2e8f0;
	margin-bottom: 20px;
	opacity: 0;
	animation: fadeIn 0.3s ease forwards;
	will-change: transform, opacity;
	direction: rtl;
}

.creative-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--primary-color);
	animation: creativeBounce 1.4s infinite ease-in-out;
}

/* Mobile Chatbot Header Reduction */
@media (max-width: 768px) {
    .creative-chat-header {
        padding: 12px 15px !important;
        min-height: 70px !important;
    }
    
    .assistant-icon {
        width: 50px !important;
        height: 50px !important;
        margin-left: 8px !important;
    }
    
    .assistant-title h5 {
        font-size: 0.9rem !important;
        margin-bottom: 2px !important;
    }
    
    .assistant-title small {
        font-size: 0.7rem !important;
    }
    
    .close-creative-chat {
        width: 30px !important;
        height: 30px !important;
    }
}