        :root {
        	--primary-gradient: linear-gradient(135deg, #ff6b9d, #c44569);
        	--secondary-gradient: linear-gradient(135deg, #667eea, #764ba2);
        	--accent-color: #ff6b9d;
        	--accent-hover: #e55a87;
        	--background: #ffffff;
        	--surface: #ffffff;
        	--surface-hover: #f8f9fa;
        	--text-primary: #2c2c2c;
        	--text-secondary: #666666;
        	--text-muted: #999999;
        	--border: #e1e8ed;
        	--shadow: rgba(0, 0, 0, 0.1);
        	--message-user: linear-gradient(135deg, #ff6b9d, #c44569);
        	--message-ai: #ffffff;
        	--sidebar-bg: #f8f9fa;
        	--header-bg: rgba(255, 255, 255, 0.95);
        	--disclaimer-bg: rgba(0, 0, 0, 0.05);
        	--disclaimer-text: #777777;
        	--header-height: 60px;
        	--button-border-color: rgba(255, 107, 157, 0.1);
        	--button-border-color-warning: rgba(255, 167, 38, 0.1);
        	--button-border-color-danger: rgba(255, 71, 87, 0.1);
        	--button-bg-color-warning: rgba(255, 167, 38, 1);
        	--button-bg-color-danger: rgba(255, 71, 87, 1);
        }

        [data-theme="dark"] {
        	--primary-gradient: linear-gradient(135deg, #ff6b9d, #c44569);
        	--secondary-gradient: linear-gradient(135deg, #667eea, #764ba2);
        	--accent-color: #ff6b9d;
        	--accent-hover: #e55a87;
        	--background: #1a1a1a;
        	--surface: #2d2d2d;
        	--surface-hover: #404040;
        	--text-primary: #ffffff;
        	--text-secondary: #cccccc;
        	--text-muted: #999999;
        	--border: #404040;
        	--shadow: rgba(0, 0, 0, 0.3);
        	--message-user: linear-gradient(135deg, #ff6b9d, #c44569);
        	--message-ai: #2d2d2d;
        	--sidebar-bg: #242424;
        	--header-bg: rgba(45, 45, 45, 0.95);
        	--disclaimer-bg: rgba(255, 255, 255, 0.05);
        	--disclaimer-text: #aaaaaa;
        	--button-border-color: rgba(255, 107, 157, 0.1);
        	--button-border-color-warning: rgba(255, 167, 38, 0.1);
        	--button-border-color-danger: rgba(255, 71, 87, 0.1);
        	--button-bg-color-warning: rgba(255, 167, 38, 1);
        	--button-bg-color-danger: rgba(255, 71, 87, 1);
        }

        html {
        	height: 100%;
        	height: 100dvh;
        	overflow: hidden;
        }

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

        body {
        	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
        	background: var(--background);
        	color: var(--text-primary);
        	height: 100vh;
        	height: 100dvh;
        	height: -webkit-fill-available;
        	overflow: hidden;
        	transition: all 0.3s ease;
        	-webkit-overflow-scrolling: touch;
        	position: relative;
        }

        @supports (-webkit-touch-callout: none) {
        	body {
        		height: -webkit-fill-available;
        	}
        }

        .app-container {
        	display: flex;
        	height: 100vh;
        	height: 100dvh;
        	height: -webkit-fill-available;
        	max-height: 100vh;
        	max-height: 100dvh;
        	max-height: -webkit-fill-available;
        	overflow: hidden;
        }

        .header {
        	position: fixed;
        	top: 0;
        	left: 0;
        	right: 0;
        	height: var(--header-height);
        	background: var(--header-bg);
        	backdrop-filter: blur(10px);
        	border-bottom: 1px solid var(--border);
        	display: flex;
        	align-items: center;
        	padding: 0 20px;
        	z-index: 1001;
        	transition: all 0.3s ease;
        	-webkit-transform: translateZ(0);
        	transform: translateZ(0);
        }

        .header-title {
        	font-size: 1.3rem;
        	font-weight: 600;
        	background: var(--primary-gradient);
        	-webkit-background-clip: text;
        	-webkit-text-fill-color: transparent;
        	background-clip: text;
        	margin-right: auto;
        }

        .header-actions {
        	display: flex;
        	gap: 10px;
        	align-items: center;
        }

        .theme-toggle {
        	position: relative;
        	width: 72px;
        	height: 36px;
        	background: var(--surface-hover);
        	border: 1px solid var(--border);
        	border-radius: 18px;
        	cursor: pointer;
        	display: flex;
        	align-items: center;
        	padding: 0;
        	transition: all 0.3s ease;
        	overflow: hidden;
        }

        [data-theme="dark"] .theme-toggle {
        	background: var(--surface-hover);
        	border-color: var(--surface-hover);
        }

        .theme-toggle::before {
        	content: '';
        	position: absolute;
        	left: 3px;
        	width: 28px;
        	height: 28px;
        	background: white;
        	border-radius: 50%;
        	transition: all 0.3s ease;
        	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
        	z-index: 3;
        }

        [data-theme="dark"] .theme-toggle::before {
        	transform: translateX(34px);
        	background: var(--accent-color);
        }

        .theme-icon {
        	position: absolute;
        	width: 18px;
        	height: 18px;
        	display: flex;
        	align-items: center;
        	justify-content: center;
        	font-size: 14px;
        	transition: all 0.3s ease;
        	z-index: 2;
        }

        .theme-icon.sun {
        	left: 9px;
        	color: var(--text-primary);
        }

        .theme-icon.moon {
        	right: 9px;
        	color: var(--text-primary);
        }

        .theme-icon.sun {
        	opacity: 1;
        }

        .theme-icon.moon {
        	opacity: 0.4;
        }

        [data-theme="dark"] .theme-icon.sun {
        	opacity: 0.4;
        }

        [data-theme="dark"] .theme-icon.moon {
        	opacity: 1;
        	color: white;
        }

        .mobile-menu-btn {
        	display: none;
        	background: none;
        	border: 0;
        	color: var(--accent-color);
        	width: 40px;
        	height: 40px;
        	border-radius: 50%;
        	cursor: pointer;
        	transition: all 0.3s ease;
        	font-size: 1rem;
        }

        .sidebar {
        	width: 320px;
        	background: var(--sidebar-bg);
        	border-right: 1px solid var(--border);
        	display: flex;
        	flex-direction: column;
        	margin-top: var(--header-height);
        	height: calc(100vh - var(--header-height));
        	height: calc(100dvh - var(--header-height));
        	height: calc(-webkit-fill-available - var(--header-height));
        	max-height: calc(100vh - var(--header-height));
        	max-height: calc(100dvh - var(--header-height));
        	max-height: calc(-webkit-fill-available - var(--header-height));
        	transition: all 0.3s ease;
        }

        .sidebar-header {
        	padding: 20px 20px 19px 20px;
        	border-bottom: 1px solid var(--border);
        }

        .new-character-btn {
                background: var(--sidebar-bg);
                color: var(--accent-color);
        	border: none;
        	padding: 9px 15px;
        	border-radius: 12px;
        	font-weight: 600;
        	cursor: pointer;
        	margin-right: 20px;
        	transition: all 0.3s ease;
                border: 1px solid var(--border);
        }

        .new-character-btn:hover {
        	transform: scale(1.1);
        }

	[data-theme="dark"] .new-character-btn {
        	background: var(--surface-hover);
        	padding: 10px 15px;
        	color: white;
		border: none;
	}

        .character-list {
        	flex: 1;
        	overflow-y: auto;
        	padding: 10px;
        }

        .character-item {
        	display: flex;
        	align-items: center;
        	gap: 15px;
        	padding: 15px;
        	border-radius: 12px;
        	cursor: pointer;
        	transition: all 0.3s ease;
        	margin-bottom: 5px;
        	position: relative;
        }

        .character-item:hover {
        	background: var(--surface-hover);
        }

        .character-item.active {
        	background: var(--accent-color);
        	color: white;
        }

        .character-avatar {
        	width: 50px;
        	height: 50px;
        	border-radius: 50%;
        	object-fit: cover;
        	border: 2px solid var(--border);
        }

        .character-item.active .character-avatar {
        	border-color: rgba(255, 255, 255, 0.5);
        }

        .character-info {
        	flex: 1;
        	min-width: 0;
        }

        .character-name {
        	font-weight: 600;
        	font-size: 1rem;
        	margin-bottom: 5px;
        	white-space: nowrap;
        	overflow: hidden;
        	text-overflow: ellipsis;
        }

        .character-preview {
        	font-size: 0.9rem;
        	opacity: 0.7;
        	white-space: nowrap;
        	overflow: hidden;
        	text-overflow: ellipsis;
        }

        .sidebar-disclaimer {
        	padding: 15px;
        	margin-top: auto;
        	cursor: pointer;
        	transition: all 0.3s ease;
        	user-select: none;
        }

        .sidebar-disclaimer:hover {}

        [data-theme="dark"] .sidebar-disclaimer:hover {}

        .sidebar-disclaimer h4 {
        	font-size: 0.8rem;
        	color: var(--text-muted);
        	margin-bottom: 0px;
        	text-transform: uppercase;
        	letter-spacing: 0.5px;
        	font-weight: 600;
        }

        .disclaimer-content {
        	overflow: hidden;
        	transition: max-height 0.3s ease, opacity 0.3s ease;
        }

        .disclaimer-content.collapsed {
        	max-height: 0px;
        }

        .disclaimer-content.expanded {
        	max-height: 300px;
        }

        .disclaimer-text {
        	font-size: 0.7rem;
        	color: var(--disclaimer-text);
        	line-height: 1.3;
        	margin: 0;
        }

        .disclaimer-preview {
        	display: none;
        }

        .disclaimer-full {
        	display: none;
        	margin-top: 8px;
        }

        .disclaimer-content.expanded .disclaimer-preview {
        	display: none;
        }

        .disclaimer-content.expanded .disclaimer-full {
        	display: block;
        }

        .main-content {
        	flex: 1;
        	display: flex;
        	flex-direction: column;
        	margin-top: var(--header-height);
        	height: calc(100vh - var(--header-height));
        	height: calc(100dvh - var(--header-height));
        	height: calc(-webkit-fill-available - var(--header-height));
        	max-height: calc(100vh - var(--header-height));
        	max-height: calc(100dvh - var(--header-height));
        	max-height: calc(-webkit-fill-available - var(--header-height));
        }

        .welcome-screen {
        	flex: 1;
        	display: flex;
        	flex-direction: column;
        	align-items: center;
        	justify-content: center;
        	padding: 40px;
        	text-align: center;
        	background: var(--background);
        }

        .welcome-icon {
        	font-size: 4rem;
        	background: var(--primary-gradient);
        	-webkit-background-clip: text;
        	-webkit-text-fill-color: transparent;
        	background-clip: text;
        	margin-bottom: 20px;
        }

        .welcome-title {
        	font-size: 2rem;
        	margin-bottom: 10px;
        	background: var(--primary-gradient);
        	-webkit-background-clip: text;
        	-webkit-text-fill-color: transparent;
        	background-clip: text;
        }

        .welcome-subtitle {
        	color: var(--text-secondary);
        	font-size: 1.1rem;
        }

        .chat-container {
        	flex: 1;
        	display: none;
        	flex-direction: column;
        	height: 100%;
        }

        .chat-container.active {
        	display: flex;
        }

        .chat-header {
        	padding: 20px;
        	border-bottom: 1px solid var(--border);
        	display: flex;
        	align-items: center;
        	gap: 15px;
        	background: var(--surface);
        	position: relative;
        }

        .chat-avatar {
        	width: 45px;
        	height: 45px;
        	border-radius: 50%;
        	object-fit: cover;
        	border: 2px solid var(--accent-color);
        }

        .chat-info {
        	flex: 1;
        }

        .chat-name {
        	font-size: 1.2rem;
        	font-weight: 600;
        	margin-bottom: 2px;
        }

        .chat-status {
        	color: var(--text-secondary);
        	font-size: 0.9rem;
        }

        .chat-menu {
        	position: relative;
        }

        .chat-menu-btn {
        	background: none;
        	border: 0;
        	color: var(--text-muted);
        	width: 40px;
        	height: 40px;
        	border-radius: 30%;
        	cursor: pointer;
        	transition: all 0.3s ease;
        	display: flex;
        	align-items: center;
        	justify-content: center;
        	font-size: 1.35rem;
        }

        .chat-menu-btn:hover {
        	color: var(--accent-color);
        }

        .chat-menu-dropdown {
        	position: absolute;
        	top: 100%;
        	right: 0;
        	margin-top: 8px;
        	background: var(--surface);
        	border: 1px solid var(--border);
        	border-radius: 12px;
        	box-shadow: 0 8px 24px var(--shadow);
        	min-width: 200px;
        	z-index: 1000;
        	opacity: 0;
        	visibility: hidden;
        	transform: translateY(-10px);
        	transition: all 0.2s ease;
        }

        .chat-menu-dropdown.show {
        	opacity: 1;
        	visibility: visible;
        	transform: translateY(0);
        }

        .chat-menu-item {
        	display: flex;
        	align-items: center;
        	gap: 12px;
        	padding: 12px 16px;
        	color: var(--text-primary);
        	text-decoration: none;
        	cursor: pointer;
        	transition: all 0.2s ease;
        	border: none;
        	background: none;
        	width: 100%;
        	text-align: left;
        	font-size: 0.9rem;
        }

        .chat-menu-item:first-child {
        	border-radius: 12px 12px 0 0;
        }

        .chat-menu-item:last-child {
        	border-radius: 0 0 12px 12px;
        }

        .chat-menu-item:hover {
        	background: var(--surface-hover);
        }

        .chat-menu-item i {
        	width: 16px;
        	text-align: center;
        	opacity: 0.7;
        }

        .chat-menu-item.warning {
        	color: #ffa726;
        }

        .chat-menu-item.danger {
        	color: #ff4757;
        }

        .chat-menu-item.warning:hover {
        	background: rgba(255, 167, 38, 0.1);
        }

        .chat-menu-item.danger:hover {
        	background: rgba(255, 71, 87, 0.1);
        }

        .chat-menu-separator {
        	height: 1px;
        	background: var(--border);
        	margin: 4px 0;
        }

        .chat-messages {
        	flex: 1;
        	overflow-y: auto;
        	padding: 20px;
        	background: var(--background);
        }

        .message {
        	display: flex;
        	margin-bottom: 20px;
        	animation: fadeInUp 0.3s ease;
        	position: relative;
        }

        .message.user {
        	justify-content: flex-end;
        }

        .message-wrapper {
        	position: relative;
        	max-width: 70%;
        }

        .message-content {
        	padding: 15px 20px;
        	border-radius: 20px;
        	position: relative;
        	box-shadow: 0 2px 10px var(--shadow);
        }

        .message.user .message-content {
        	background: var(--message-user);
        	color: white;
        	border-bottom-right-radius: 5px;
        }

        .message.ai .message-content {
        	background: var(--message-ai);
        	color: var(--text-primary);
        	border-bottom-left-radius: 5px;
        	border: 1px solid var(--border);
        }

        .message-image {
        	max-width: 100%;
        	max-height: 300px;
        	border-radius: 15px;
        	margin-top: 10px;
        	cursor: pointer;
        	object-fit: contain;
        }

        .message-actions {
        	position: absolute;
        	top: -10px;
        	opacity: 0;
        	transition: opacity 0.3s ease;
        	display: flex;
        	gap: 5px;
        	z-index: 100;
        }

        .message.user .message-actions {
        	right: -10px;
        }

        .message.ai .message-actions {
        	left: -10px;
        }

        .message-wrapper:hover .message-actions {
        	opacity: 1;
        }

        .message-action-btn {
        	background: var(--surface);
        	border: 1px solid var(--border);
        	color: var(--text-secondary);
        	width: 24px;
        	height: 24px;
        	border-radius: 50%;
        	cursor: pointer;
        	font-size: 0.7rem;
        	display: flex;
        	align-items: center;
        	justify-content: center;
        	transition: all 0.3s ease;
        	box-shadow: 0 2px 5px var(--shadow);
        }

        .message-action-btn:hover {
        	background: var(--accent-color);
        	color: white;
        	border-color: var(--accent-color);
        }

        .message-edit {
        	width: 100%;
        	background: var(--background);
        	color: var(--text-primary);
        	border: 2px solid var(--accent-color);
        	border-radius: 15px;
        	padding: 10px 15px;
        	font-size: 1rem;
        	resize: vertical;
        	min-height: 80px;
        	font-family: inherit;
        }

        .message-edit:focus {
        	outline: none;
        	box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.1);
        }

        .edit-actions {
        	display: flex;
        	gap: 10px;
        	margin-top: 10px;
        	justify-content: flex-end;
        }

        .edit-btn {
        	padding: 8px 15px;
        	border: none;
        	border-radius: 8px;
        	cursor: pointer;
        	font-size: 0.9rem;
        	transition: all 0.3s ease;
        }

        .edit-btn.save {
        	background: var(--accent-color);
        	color: white;
        }

        .edit-btn.save:hover {
        	background: var(--accent-hover);
        }

        .edit-btn.cancel {
        	background: var(--surface-hover);
        	color: var(--text-primary);
        }

        .edit-btn.cancel:hover {
        	background: var(--border);
        }

        .chat-input {
        	background: var(--surface);
        	padding: 20px;
        	border-top: 1px solid var(--border);
        	display: flex;
        	flex-direction: column;
        	gap: 10px;
        }

        .image-preview-banner {
        	display: none;
        	background: rgba(255, 107, 157, 0.1);
        	border: 1px solid rgba(255, 107, 157, 0.3);
        	border-radius: 12px;
        	padding: 12px 16px;
        	align-items: center;
        	gap: 12px;
        }

        .image-preview-banner.show {
        	display: flex;
        }

        .image-preview-thumb {
        	width: 40px;
        	height: 40px;
        	border-radius: 8px;
        	object-fit: cover;
        }

        .image-preview-text {
        	color: var(--text-secondary);
        	font-size: 0.9rem;
        	flex: 1;
        }

        .remove-preview {
        	background: none;
        	border: none;
        	color: var(--accent-color);
        	cursor: pointer;
        	font-size: 1.2rem;
        	padding: 0;
        	width: 24px;
        	height: 24px;
        	display: flex;
        	align-items: center;
        	justify-content: center;
        	border-radius: 50%;
        	transition: all 0.3s ease;
        }

        .remove-preview:hover {
        	background: rgba(255, 107, 157, 0.2);
        }

        .input-row {
        	display: flex;
        	gap: 10px;
        	align-items: flex-end;
        }

        .input-container {
        	flex: 1;
        	position: relative;
        }

        .message-input {
        	width: 100%;
        	border: 2px solid var(--border);
        	border-radius: 25px;
        	padding: 15px 60px 15px 20px;
        	font-size: 1rem;
        	resize: none;
        	height: 50px;
        	min-height: 50px;
        	max-height: 50px;
        	background: var(--background);
        	color: var(--text-primary);
        	transition: all 0.3s ease;
        }

        .message-input:focus {
        	outline: none;
        	border-color: var(--accent-color);
        }

        .input-actions {
        	position: absolute;
        	right: 8px;
        	bottom: 8px;
        	display: flex;
        	gap: 5px;
        }

        .action-btn {
        	width: 35px;
        	height: 35px;
        	border: none;
        	border-radius: 50%;
        	background: var(--accent-color);
        	color: white;
        	cursor: pointer;
        	display: flex;
        	align-items: center;
        	justify-content: center;
        	font-size: 1rem;
        	transition: all 0.3s ease;
        }

        .action-btn:hover {
        	background: var(--accent-hover);
        	transform: scale(1.1);
        }

        .send-btn {
        	background: var(--primary-gradient);
        	color: white;
        	border: none;
        	border-radius: 50%;
        	width: 50px;
        	height: 50px;
        	cursor: pointer;
        	font-size: 1.2rem;
        	transition: all 0.3s ease;
        	box-shadow: 0 4px 15px var(--shadow);
        }

        .send-btn:hover {
        	transform: scale(1.1);
        }

        .send-btn:disabled {
        	opacity: 0.5;
        	cursor: not-allowed;
        	transform: none;
        }

        .typing-indicator {
        	display: flex;
        	align-items: center;
        	gap: 10px;
        	padding: 15px 20px;
        	background: var(--message-ai);
        	border: 1px solid var(--border);
        	border-radius: 20px;
        	border-bottom-left-radius: 5px;
        	box-shadow: 0 2px 10px var(--shadow);
        	max-width: 70%;
        	margin-bottom: 20px;
        }

        .typing-dots {
        	display: flex;
        	gap: 3px;
        }

        .typing-dots span {
        	width: 8px;
        	height: 8px;
        	border-radius: 50%;
        	background: var(--accent-color);
        	animation: typing 1.4s infinite;
        }

        .typing-dots span:nth-child(2) {
        	animation-delay: 0.2s;
        }

        .typing-dots span:nth-child(3) {
        	animation-delay: 0.4s;
        }

        .modal {
        	position: fixed;
        	top: 0;
        	left: 0;
        	width: 100%;
        	height: 100%;
        	background: rgba(0, 0, 0, 0.8);
        	display: none;
        	align-items: center;
        	justify-content: center;
        	z-index: 2000;
        	padding: 20px;
        }

        .modal.show {
        	display: flex;
        }

        .modal-content {
        	background: var(--surface);
        	border-radius: 20px;
        	padding: 30px;
        	max-width: 600px;
        	width: 100%;
        	max-height: 90vh;
        	overflow-y: auto;
        	position: relative;
        	box-shadow: 0 20px 40px var(--shadow);
        }

        .modal-header {
        	text-align: center;
        	margin-bottom: 30px;
        }

        .modal-title {
        	font-size: 1.8rem;
        	font-weight: 600;
        	background: var(--primary-gradient);
        	-webkit-background-clip: text;
        	-webkit-text-fill-color: transparent;
        	background-clip: text;
        	margin-bottom: 10px;
        }

        .modal-subtitle {
        	color: var(--text-secondary);
        }

        .close-modal {
        	position: absolute;
        	top: 15px;
        	right: 15px;
        	background: none;
        	border: none;
        	font-size: 1.5rem;
        	color: var(--text-secondary);
        	cursor: pointer;
        	width: 30px;
        	height: 30px;
        	border-radius: 50%;
        	display: flex;
        	align-items: center;
        	justify-content: center;
        	transition: all 0.3s ease;
        }

        .close-modal:hover {
        	background: var(--surface-hover);
        }

        .upload-area {
        	border: 3px dashed var(--accent-color);
        	border-radius: 15px;
        	padding: 40px 20px;
        	text-align: center;
        	margin-bottom: 25px;
        	transition: all 0.3s ease;
        	cursor: pointer;
        	background: rgba(255, 107, 157, 0.05);
        }

        .upload-area:hover, .upload-area.dragover {
        	background: rgba(255, 107, 157, 0.1);
        	transform: translateY(-2px);
        }

        .upload-area i {
        	font-size: 3rem;
        	color: var(--accent-color);
        	margin-bottom: 15px;
        	display: block;
        }

        .upload-text {
        	color: var(--text-primary);
        	font-size: 1.1rem;
        	margin-bottom: 5px;
        }

        .upload-hint {
        	color: var(--text-secondary);
        	font-size: 0.9rem;
        }

        .preview-container {
        	position: relative;
        	max-width: 200px;
        	margin: 0 auto;
        }

        .preview-image {
        	width: 100%;
        	height: 200px;
        	object-fit: cover;
        	border-radius: 15px;
        	box-shadow: 0 10px 20px var(--shadow);
        }

        .remove-image {
        	position: absolute;
        	top: 10px;
        	right: 10px;
        	background: #ff4757;
        	color: white;
        	border: none;
        	border-radius: 50%;
        	width: 30px;
        	height: 30px;
        	cursor: pointer;
        	font-size: 1rem;
        	transition: all 0.3s ease;
        }

        .remove-image:hover {
        	background: #ff3742;
        }

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

        .form-group label {
        	display: block;
        	margin-bottom: 8px;
        	color: var(--text-primary);
        	font-weight: 600;
        }

        .form-control {
        	width: 100%;
        	padding: 15px;
        	border: 2px solid var(--border);
        	border-radius: 12px;
        	font-size: 1rem;
        	transition: all 0.3s ease;
        	background: var(--background);
        	color: var(--text-primary);
        }

        .form-control:focus {
        	outline: none;
        	border-color: var(--accent-color);
        	box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.1);
        }

        textarea.form-control {
        	resize: vertical;
        	min-height: 100px;
        }

        .btn-primary {
        	background: var(--primary-gradient);
        	color: white;
        	border: none;
        	padding: 15px 30px;
        	border-radius: 12px;
        	font-size: 1.1rem;
        	font-weight: 600;
        	cursor: pointer;
        	width: 100%;
        	transition: all 0.3s ease;
        	position: relative;
        	overflow: hidden;
        }

        .btn-primary:hover {
        	transform: translateY(-2px);
        	box-shadow: 0 10px 20px var(--shadow);
        }

        .btn-primary:disabled {
        	opacity: 0.7;
        	cursor: not-allowed;
        	transform: none;
        }

        .btn-primary .loading {
        	display: none;
        }

        .btn-primary.loading .loading {
        	display: inline;
        	margin-right: 10px;
        }

        .btn-primary.loading .text {
        	display: none;
        }

        .error {
        	color: #ff4757;
        	font-size: 0.9rem;
        	margin-top: 10px;
        	text-align: center;
        }

        .hidden {
        	display: none !important;
        }

        .emoji-picker {
        	position: absolute;
        	bottom: 70px;
        	right: 10px;
        	background: var(--surface);
        	border: 2px solid var(--border);
        	border-radius: 15px;
        	padding: 15px;
        	box-shadow: 0 10px 30px var(--shadow);
        	display: none;
        	z-index: 1000;
        	width: 280px;
        	max-height: 200px;
        	overflow-y: auto;
        }

        .emoji-picker.show {
        	display: block;
        }

        .emoji-grid {
        	display: grid;
        	grid-template-columns: repeat(4, 1fr);
        	gap: 5px;
        }

        .emoji {
        	font-size: 1.5rem;
        	padding: 8px;
        	border-radius: 8px;
        	cursor: pointer;
        	text-align: center;
        	transition: all 0.2s ease;
        }

        .emoji:hover {
        	background: var(--surface-hover);
        	transform: scale(1.2);
        }

        .image-modal {
        	position: fixed;
        	top: 0;
        	left: 0;
        	width: 100%;
        	height: 100%;
        	background: rgba(0, 0, 0, 0.9);
        	display: none;
        	justify-content: center;
        	align-items: center;
        	z-index: 2000;
        	cursor: pointer;
        }

        .image-modal img {
        	max-width: 90%;
        	max-height: 90%;
        	border-radius: 10px;
        }

        .confirm-modal {
        	position: fixed;
        	top: 0;
        	left: 0;
        	width: 100%;
        	height: 100%;
        	background: rgba(0, 0, 0, 0.8);
        	display: none;
        	align-items: center;
        	justify-content: center;
        	z-index: 2100;
        	padding: 20px;
        }

        .confirm-modal.show {
        	display: flex;
        }

        .confirm-content {
        	background: var(--surface);
        	border-radius: 20px;
        	padding: 30px;
        	max-width: 400px;
        	width: 100%;
        	text-align: center;
        	box-shadow: 0 20px 40px var(--shadow);
        	position: relative;
        	animation: modalSlideIn 0.3s ease;
        }

        .confirm-icon {
        	font-size: 3rem;
        	margin-bottom: 20px;
        	color: var(--accent-color);
        }

        .confirm-icon.warning {
        	color: #ffa726;
        }

        .confirm-icon.danger {
        	color: #ff4757;
        }

        .confirm-title {
        	font-size: 1.5rem;
        	font-weight: 600;
        	margin-bottom: 15px;
        	color: var(--text-primary);
        }

        .confirm-message {
        	color: var(--text-secondary);
        	font-size: 1rem;
        	line-height: 1.5;
        	margin-bottom: 30px;
        }

        .confirm-actions {
        	display: flex;
        	gap: 15px;
        	justify-content: center;
        }

        .confirm-btn {
        	padding: 12px 24px;
        	border: none;
        	border-radius: 12px;
        	font-size: 1rem;
        	font-weight: 600;
        	cursor: pointer;
        	transition: all 0.3s ease;
        	min-width: 100px;
        }

        .confirm-btn.cancel {
        	background: var(--surface-hover);
        	color: var(--text-primary);
        	border: 2px solid var(--border);
        }

        .confirm-btn.cancel:hover {
        	background: var(--border);
        }

        .confirm-btn.confirm {
        	background: var(--accent-color);
        	color: white;
        }

        .confirm-btn.confirm.warning {
        	background: #ffa726;
        }

        .confirm-btn.confirm.danger {
        	background: #ff4757;
        }

        .confirm-btn.confirm:hover {
        	transform: translateY(-2px);
        	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
        }

        .age-verification {
        	position: fixed;
        	top: 0;
        	left: 0;
        	width: 100%;
        	height: 100%;
        	background: rgba(0, 0, 0, 0.9);
        	backdrop-filter: blur(10px);
        	display: flex;
        	align-items: center;
        	justify-content: center;
        	z-index: 3000;
        	padding: 20px;
        }

        .age-verification.hide {
        	display: none;
        }

        .age-verification-content {
        	background: var(--surface);
        	border-radius: 25px;
        	padding: 40px;
        	max-width: 500px;
        	width: 100%;
        	text-align: center;
        	box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
        	position: relative;
        	animation: ageModalSlideIn 0.5s ease;
        }

        .age-verification-icon {
        	font-size: 4rem;
        	background: var(--primary-gradient);
        	-webkit-background-clip: text;
        	-webkit-text-fill-color: transparent;
        	background-clip: text;
        	margin-bottom: 25px;
        }

        .age-verification-title {
        	font-size: 2rem;
        	font-weight: 600;
        	color: var(--text-primary);
        	margin-bottom: 15px;
        }

        .age-verification-message {
        	color: var(--text-secondary);
        	font-size: 1.1rem;
        	line-height: 1.6;
        	margin-bottom: 30px;
        }

        .age-verification-actions {
        	display: flex;
        	gap: 20px;
        	justify-content: center;
        	margin-bottom: 30px;
        }

        .age-verification-btn {
        	padding: 15px 30px;
        	border: none;
        	border-radius: 15px;
        	font-size: 1.1rem;
        	font-weight: 600;
        	cursor: pointer;
        	transition: all 0.3s ease;
        	min-width: 120px;
        }

        .age-verification-btn.confirm {
        	background: var(--primary-gradient);
        	color: white;
        }

        .age-verification-btn.confirm:hover {
        	transform: translateY(-2px);
        	box-shadow: 0 10px 25px rgba(255, 107, 157, 0.3);
        }

        .age-verification-btn.decline {
        	background: var(--surface-hover);
        	color: var(--text-primary);
        	border: 2px solid var(--border);
        }

        .age-verification-btn.decline:hover {
        	background: var(--border);
        }

        .age-verification-disclaimer {
        	border-top: 1px solid var(--border);
        	padding-top: 20px;
        	margin-top: 10px;
        }

        .age-verification-disclaimer h4 {
        	font-size: 0.8rem;
        	color: var(--text-secondary);
        	margin-bottom: 10px;
        	text-transform: uppercase;
        	letter-spacing: 0.5px;
        	font-weight: 600;
        }

        .age-verification-disclaimer p {
        	font-size: 0.75rem;
        	color: var(--disclaimer-text);
        	line-height: 1.4;
        	text-align: left;
        	margin: 0;
        }

        @keyframes fadeInUp {
        	from {
        		opacity: 0;
        		transform: translateY(20px);
        	}
        	to {
        		opacity: 1;
        		transform: translateY(0);
        	}
        }

        @keyframes typing {
        	0%, 20% {
        		transform: scale(1);
        		opacity: 1;
        	}
        	50% {
        		transform: scale(1.5);
        		opacity: 0.7;
        	}
        }

        @keyframes modalSlideIn {
        	from {
        		opacity: 0;
        		transform: translateY(-50px) scale(0.9);
        	}
        	to {
        		opacity: 1;
        		transform: translateY(0) scale(1);
        	}
        }

        @keyframes ageModalSlideIn {
        	from {
        		opacity: 0;
        		transform: translateY(-30px) scale(0.95);
        	}
        	to {
        		opacity: 1;
        		transform: translateY(0) scale(1);
        	}
        }

        @media (max-width: 768px) {
        	.header {
        		position: fixed;
        		top: 0;
        		left: 0;
        		right: 0;
        		z-index: 1001;
        		-webkit-transform: translate3d(0, 0, 0);
        		transform: translate3d(0, 0, 0);
        	}
        	.header-title {
        		font-size: 1.1rem;
        	}
        	.mobile-menu-btn {
        		display: flex;
        		align-items: center;
        		justify-content: center;
        	}
        	.sidebar {
        		position: fixed;
        		left: -320px;
        		top: var(--header-height);
        		height: calc(100vh - var(--header-height));
        		height: calc(100dvh - var(--header-height));
        		height: calc(-webkit-fill-available - var(--header-height));
        		z-index: 999;
        		transition: left 0.3s ease;
        		top: 0;
        	}
        	.sidebar.open {
        		left: 0;
        		top: 0;
        	}
        	.main-content {
        		width: 100%;
        		margin-top: var(--header-height);
        		height: calc(100vh - var(--header-height));
        		height: calc(100dvh - var(--header-height));
        		height: calc(-webkit-fill-available - var(--header-height));
        	}
        	.chat-input {
        		position: relative;
        		z-index: 10;
        	}
        	.message-wrapper {
        		max-width: 85%;
        	}
        	.modal-content {
        		margin: 20px;
        		padding: 20px;
        	}
        	.confirm-content {
        		margin: 20px;
        		padding: 25px;
        	}
        	.age-verification-content {
        		margin: 20px;
        		padding: 30px;
        	}
        	.age-verification-actions {
        		flex-direction: column;
        		gap: 15px;
        	}
        	.age-verification-btn {
        		width: 100%;
        	}
        	.emoji-picker {
        		width: 260px;
        	}
        	.header-actions {
        		gap: 5px;
        	}
        	.sidebar-disclaimer {
        		padding: 12px;
        	}
        	.disclaimer-text {
        		font-size: 0.65rem;
        	}
        	.chat-menu-dropdown {
        		right: -10px;
        		min-width: 180px;
        	}
        }

        .sidebar-overlay {
        	position: fixed;
        	top: var(--header-height);
        	left: 0;
        	width: 100%;
        	height: calc(100vh - var(--header-height));
        	height: calc(100dvh - var(--header-height));
        	height: calc(-webkit-fill-available - var(--header-height));
        	background: rgba(0, 0, 0, 0.5);
        	z-index: 998;
        	display: none;
        }

        .sidebar-overlay.show {
        	display: block;
        }

        @media screen and (max-width: 768px) {
        	.sidebar-overlay.show {
        		display: block;
        	}
        }

        @media screen and (max-width: 768px) {
        	@supports (-webkit-appearance: none) {
        		.app-container {
        			height: 100vh;
        			height: calc(var(--vh, 1vh) * 100);
        		}
        		.main-content {
        			height: calc(100vh - var(--header-height));
        			height: calc((var(--vh, 1vh) * 100) - var(--header-height));
        		}
        		.sidebar {
        			height: calc(100vh - var(--header-height));
        			height: calc((var(--vh, 1vh) * 100) - var(--header-height));
        		}
        		.sidebar-overlay {
        			height: calc(100vh - var(--header-height));
        			height: calc((var(--vh, 1vh) * 100) - var(--header-height));
        		}
        	}
        }

        /* Custom Scrollbar Styling */

        ::-webkit-scrollbar {
        	width: 8px;
        	height: 8px;
        }

        ::-webkit-scrollbar-track {
        	background: var(--background);
        	border-radius: 4px;
        }

        ::-webkit-scrollbar-thumb {
        	background: var(--accent-color);
        	border-radius: 4px;
        	transition: background 0.3s ease;
        }

        ::-webkit-scrollbar-thumb:hover {
        	background: var(--accent-hover);
        }

        ::-webkit-scrollbar-corner {
        	background: var(--background);
        }

        /* For Firefox */

        * {
        	scrollbar-width: thin;
        	scrollbar-color: var(--accent-color) var(--background);
        }

        /* Specific styling for different containers */

        .sidebar {
        	scrollbar-width: thin;
        	scrollbar-color: var(--accent-color) var(--sidebar-bg);
        }

        .sidebar::-webkit-scrollbar-track {
        	background: var(--sidebar-bg);
        }

        .character-list {
        	scrollbar-width: thin;
        	scrollbar-color: var(--accent-color) var(--sidebar-bg);
        }

        .character-list::-webkit-scrollbar-track {
        	background: var(--sidebar-bg);
        }

        .chat-messages {
        	scrollbar-width: thin;
        	scrollbar-color: var(--accent-color) var(--background);
        }

        .chat-messages::-webkit-scrollbar-track {
        	background: var(--background);
        }

        .modal-content {
        	scrollbar-width: thin;
        	scrollbar-color: var(--accent-color) var(--surface);
        }

        .modal-content::-webkit-scrollbar-track {
        	background: var(--surface);
        }

        /* Thinner scrollbars for mobile */

        @media (max-width: 768px) {
        	::-webkit-scrollbar {
        		width: 4px;
        		height: 4px;
        	}
        	* {
        		scrollbar-width: thin;
        	}
        }

        /* Hide scrollbar on very small screens but keep functionality */

        @media (max-width: 480px) {
        	.chat-messages::-webkit-scrollbar {
        		width: 2px;
        	}
        	.sidebar::-webkit-scrollbar {
        		width: 2px;
        	}
        }

        /* For better mobile touch scrolling */

        @media (max-width: 768px) {
        	.chat-messages {
        		-webkit-overflow-scrolling: touch;
        	}
        	.character-list {
        		-webkit-overflow-scrolling: touch;
        	}
        	.modal-content {
        		-webkit-overflow-scrolling: touch;
        	}
        }

        .app-logo {
        	fill: currentColor;
        	margin-right: 8px;
        	vertical-align: middle;
        }

        .app-logo {
        	margin-right: 8px;
        	vertical-align: middle;
        	fill: #ff6b9d;
        }

        .welcome-icon svg {
        	fill: #ff6b9d;
        }

        .age-verification-icon svg {
        	fill: #ff6b9d;
        }