:root {
	--primary-color: #6366f1;
	--secondary-color: #8b5cf6;
	--text-dark: #1f2937;
	--text-light: #6b7280;
	--bg-light: #f9fafb;
	--border-color: #e5e7eb;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	background-color: var(--bg-light);
}

.navbar-brand {
	font-weight: 600;
	font-size: 1.5rem;
}

.post-card {
	border: 1px solid var(--border-color);
	border-radius: 0.5rem;
	margin-bottom: 1rem;
	background: white;
}

.post-header {
	padding: 1rem;
	border-bottom: 1px solid var(--border-color);
}

.post-content {
	padding: 1rem;
}

.media-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 0.5rem;
	margin-top: 0.5rem;
}

.media-item {
	border-radius: 0.5rem;
	overflow: hidden;
}

.media-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.like-button {
	color: var(--text-light);
	transition: color 0.2s;
}

.like-button.liked {
	color: var(--primary-color);
}

.message-item {
	border-left: 3px solid var(--primary-color);
	padding: 1rem;
	margin-bottom: 1rem;
}

.message-item.read {
	border-left-color: var(--text-light);
	opacity: 0.7;
}

/* グループページの全体スタイル */
.group-container {
	max-width: 900px;
	margin: 0 auto;
	padding: 20px;
	background: #f5f5f5;
	border-radius: 8px;
	min-height: 100vh;
}

/* グループヘッダー */
.group-header {
	background: white;
	padding: 24px;
	border-radius: 8px;
	margin-bottom: 20px;
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 20px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-content {
	flex: 1;
}

.header-content h1 {
	margin: 0 0 8px 0;
	font-size: 32px;
	font-weight: 700;
	color: white;
}

.header-content .description {
	margin: 0;
	font-size: 14px;
	color: rgba(255, 255, 255, 0.7);
	line-height: 1.6;
}

.group-header h1 {
	margin: 0 0 8px 0;
	font-size: 28px;
	color: #333;
}

.group-header .description {
	margin: 0;
	color: #666;
	font-size: 14px;
	line-height: 1.5;
}

/* グループコントロール */
.group-controls {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	justify-content: flex-end;
}

.inline-form {
	display: inline;
}

/* ボタンスタイル */
.btn {
	padding: 8px 16px;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	display: inline-block;
	transition: all 0.3s ease;
}

.btn-primary {
	background-color: #007bff;
	color: white;
}

.btn-primary:hover {
	background-color: #0056b3;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-danger {
	background-color: #dc3545;
	color: white;
}

.btn-danger:hover {
	background-color: #c82333;
}

.btn-send {
	background-color: #28a745;
	color: white;
	padding: 8px 16px;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	font-weight: 600;
	transition: all 0.3s ease;
}

.btn-send:hover {
	background-color: #218838;
	transform: translateY(-2px);
}

.btn-send:active {
	transform: translateY(0);
}

/* ディバイダー */
.divider {
	border: none;
	border-top: 1px solid #ddd;
	margin: 20px 0;
}

/* チャットセクション */
.chat-section {
	background: white;
	border-radius: 8px;
	padding: 20px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	display: flex;
	flex-direction: column;
	height: calc(100vh - 300px);
}

/* メッセージコンテナ */
.messages-container {
	flex: 1;
	overflow-y: auto;
	padding-right: 8px;
	margin-bottom: 16px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* スクロールバーのスタイル */
.messages-container::-webkit-scrollbar {
	width: 6px;
}

.messages-container::-webkit-scrollbar-track {
	background: transparent;
}

.messages-container::-webkit-scrollbar-thumb {
	background: #ccc;
	border-radius: 3px;
}

.messages-container::-webkit-scrollbar-thumb:hover {
	background: #999;
}

/* メッセージ */
.message {
	display: flex;
	gap: 12px;
	animation: fadeIn 0.3s ease;
	position: relative;
}

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

.message-avatar {
	flex-shrink: 0;
}

.avatar-initial {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	font-weight: 700;
	font-size: 16px;
}

.message-content {
	flex: 1;
	min-width: 0;
}

.message-header {
	display: flex;
	align-items: baseline;
	gap: 8px;
	margin-bottom: 4px;
}

.message-author {
	color: #333;
	font-size: 14px;
}

.message-time {
	color: #999;
	font-size: 12px;
}

.message-body {
	color: #555;
	line-height: 1.5;
	word-wrap: break-word;
}

.message-body p {
	margin: 4px 0;
}

.message-image {
	max-width: 200px;
	border-radius: 6px;
	margin-top: 8px;
	cursor: pointer;
}

.message-image:hover {
	opacity: 0.9;
}

/* メッセージ削除ボタン */
.delete-msg-form {
	display: inline;
}

.btn-delete {
	background: none;
	border: none;
	color: #dc3545;
	cursor: pointer;
	font-size: 12px;
	padding: 0;
	text-decoration: underline;
	transition: color 0.2s;
	margin-top: 4px;
}

.btn-delete:hover {
	color: #c82333;
}

/* メッセージ入力セクション */
.message-input-section {
	border-top: 1px solid #eee;
	padding-top: 16px;
}

.message-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.message-form textarea {
	padding: 12px;
	border: 1px solid #ddd;
	border-radius: 6px;
	font-family: inherit;
	font-size: 14px;
	resize: vertical;
	transition: border-color 0.3s;
}

.message-form textarea:focus {
	outline: none;
	border-color: #007bff;
	box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-actions {
	display: flex;
	gap: 12px;
	align-items: center;
}

.file-input-label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 12px;
	background-color: #f0f0f0;
	border: 1px solid #ddd;
	border-radius: 6px;
	cursor: pointer;
	font-size: 13px;
	transition: all 0.3s;
}

.file-input-label:hover {
	background-color: #e8e8e8;
}

#attachmentInput {
display: none;
}

.not-member-notice {
	text-align: center;
	padding: 20px;
	color: #666;
	font-size: 14px;
}

/* グループページ全体 */
.groups-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 40px 20px;
	background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
	min-height: 100vh;
}

/* ページヘッダー */
.page-header {
	background: white;
	border-radius: 12px;
	padding: 40px;
	margin-bottom: 40px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 30px;
}

.page-title {
	margin: 0 0 8px 0;
	font-size: 36px;
	font-weight: 700;
	color: #1a202c;
	letter-spacing: -0.5px;
}

.page-subtitle {
	margin: 0;
	font-size: 16px;
	color: #718096;
	line-height: 1.6;
}

.login-prompt {
	margin: 0;
	font-size: 14px;
	color: #718096;
}

.login-prompt a {
	color: #007bff;
	text-decoration: none;
	font-weight: 600;
}

.login-prompt a:hover {
	text-decoration: underline;
}

/* ボタン */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 20px;
	border: none;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition: all 0.3s ease;
	white-space: nowrap;
}

.btn-primary {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-primary:active {
	transform: translateY(0);
}

.btn-lg {
	padding: 12px 28px;
	font-size: 15px;
	border-radius: 10px;
}

.btn-icon {
	font-size: 18px;
	font-weight: 700;
}

.btn-block {
	width: 100%;
	justify-content: center;
}

/* セクション */
.groups-section {
	margin-bottom: 50px;
}

.section-header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 24px;
}

.section-title {
	margin: 0;
	font-size: 24px;
	font-weight: 700;
	color: #1a202c;
}

.section-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	background-color: #edf2f7;
	border-radius: 50%;
	font-size: 14px;
	font-weight: 700;
	color: #4a5568;
}

/* グループグリッド */
.groups-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 24px;
}

/* グループカード */
.group-card {
	display: flex;
	flex-direction: column;
	background: white;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
	transition: all 0.3s ease;
	text-decoration: none;
	color: inherit;
	border: 1px solid #edf2f7;
}

.group-card:hover {
	transform: translateY(-8px);
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
	border-color: #667eea;
}

.group-card-header {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	padding: 20px;
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	position: relative;
}

.group-avatar {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	background: rgba(255, 255, 255, 0.2);
	border-radius: 12px;
	color: white;
	font-size: 24px;
	font-weight: 700;
	backdrop-filter: blur(10px);
}

.avatar-image {
	width: 100%;
	height: 100%;
	border-radius: 12px;
	object-fit: cover;
	object-position: center;
	display: block;
	transition: transform 0.3s ease;
}

.group-avatar:hover .avatar-image {
	transform: scale(1.05);
}

.group-status {
	display: inline-block;
	font-size: 12px;
	color: white;
	background: rgba(255, 255, 255, 0.2);
	padding: 4px 10px;
	border-radius: 20px;
	backdrop-filter: blur(10px);
	white-space: nowrap;
}

.group-card-body {
	flex: 1;
	padding: 20px;
}

.group-name {
	margin: 0 0 8px 0;
	font-size: 18px;
	font-weight: 700;
	color: #1a202c;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.group-description {
	margin: 0;
	font-size: 13px;
	color: #718096;
	line-height: 1.6;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.group-card-footer {
	border-top: 1px solid #edf2f7;
	padding: 16px 20px;
}

.group-stats {
	display: flex;
	gap: 16px;
}

.stat {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: #718096;
}

.stat-icon {
	font-size: 16px;
}

.stat-label {
	font-weight: 500;
}

/* グループカードラッパー（参加ボタン付き） */
.group-card-wrapper {
	display: flex;
	flex-direction: column;
}

.group-card-wrapper .group-card {
	flex: 1;
	margin-bottom: 12px;
}

.join-form {
	display: flex;
}

.join-form .btn {
	flex: 1;
}

/* 空状態 */
.empty-state {
	background: white;
	border-radius: 12px;
	padding: 60px 40px;
	text-align: center;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
	border: 2px dashed #cbd5e0;
}

.empty-icon {
	font-size: 64px;
	margin-bottom: 16px;
}

.empty-title {
	margin: 0 0 8px 0;
	font-size: 18px;
	font-weight: 700;
	color: #1a202c;
}

.empty-text {
	margin: 0;
	font-size: 14px;
	color: #718096;
	line-height: 1.6;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
	.groups-container {
		padding: 20px 16px;
	}
	
	.page-header {
		flex-direction: column;
		align-items: flex-start;
		padding: 24px;
		gap: 16px;
	}
	
	.page-title {
		font-size: 28px;
	}
	
	.page-subtitle {
		font-size: 14px;
	}
	
	.btn-lg {
		width: 100%;
		justify-content: center;
	}
	
	.groups-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}
	
	.group-card-header {
		padding: 16px;
	}
	
	.group-avatar {
		width: 48px;
		height: 48px;
		font-size: 20px;
	}
	
	.group-card-body {
		padding: 16px;
	}
	
	.group-name {
		font-size: 16px;
	}
	
	.empty-state {
		padding: 40px 24px;
	}
	
	.empty-icon {
		font-size: 48px;
	}
}

@media (max-width: 480px) {
	.groups-container {
		padding: 16px 12px;
	}
	
	.page-header {
		padding: 16px;
		gap: 12px;
	}
	
	.page-title {
		font-size: 24px;
	}
	
	.section-title {
		font-size: 20px;
	}
	
	.group-card {
		border-radius: 8px;
	}
	
	.group-card-header {
		padding: 12px;
		border-radius: 8px 8px 0 0;
	}
}

/* ============================================
 *   グループ作成・編集ページ専用CSS
 *   groups/create.html, groups/edit.html
 *   ============================================ */

/* フォームコンテナ */
.form-container {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.form-card {
	width: 100%;
	max-width: 700px;
	background: white;
	border-radius: 12px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
	overflow: hidden;
	animation: slideIn 0.3s ease-out;
}

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

/* ============================================
 *   ヘッダー
 *   ============================================ */

.form-header {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	padding: 40px 30px;
	text-align: center;
}

.form-title {
	font-size: 28px;
	font-weight: 700;
	margin: 0 0 10px 0;
	letter-spacing: 0.5px;
}

.form-subtitle {
	font-size: 14px;
	margin: 0;
	opacity: 0.9;
	font-weight: 300;
}

/* ============================================
 *   フォームコンテンツ
 *   ============================================ */

.form-content {
	padding: 30px;
}

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

.form-group:last-of-type {
	margin-bottom: 30px;
}

/* ============================================
 *   ラベル
 *   ============================================ */

.form-label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 8px;
	color: #2d3748;
	letter-spacing: 0.3px;
}

.required {
	color: #e53e3e;
	margin-left: 4px;
}

/* ============================================
 *   入力フィールド（テキスト・テキストエリア）
 *   ============================================ */

.form-input,
.form-textarea {
	width: 100%;
	padding: 12px 14px;
	font-size: 14px;
	border: 2px solid #e2e8f0;
	border-radius: 8px;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	transition: all 0.3s ease;
	box-sizing: border-box;
	color: #2d3748;
	background: #f7fafc;
}

.form-input::placeholder,
.form-textarea::placeholder {
	color: #a0aec0;
}

.form-input:focus,
.form-textarea:focus {
	outline: none;
	border-color: #667eea;
	background: white;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-textarea {
	resize: vertical;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, monospace;
}

/* ============================================
 *   ヘルプテキスト
 *   ============================================ */

.form-help {
	display: block;
	font-size: 12px;
	color: #718096;
	margin-top: 6px;
	line-height: 1.5;
}

/* ============================================
 *   エラー表示
 *   ============================================ */

.form-errors {
	margin-top: 8px;
	animation: shake 0.3s ease-in-out;
}

@keyframes shake {
	0%, 100% { transform: translateX(0); }
	25% { transform: translateX(-5px); }
	75% { transform: translateX(5px); }
}

.error-message {
	display: block;
	font-size: 12px;
	color: #e53e3e;
	margin: 4px 0;
	font-weight: 500;
}

.form-input:invalid:not(:placeholder-shown),
.form-textarea:invalid:not(:placeholder-shown) {
	border-color: #e53e3e;
}

/* ============================================
 *   チェックボックス
 *   ============================================ */

.form-checkbox {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
}

.checkbox-input {
	width: 20px;
	height: 20px;
	cursor: pointer;
	accent-color: #667eea;
	border-radius: 4px;
}

.checkbox-label {
	font-size: 14px;
	color: #2d3748;
	cursor: pointer;
	font-weight: 500;
	user-select: none;
}

/* ============================================
 *   画像アップロード
 *   ============================================ */

.image-upload-wrapper {
	margin-top: 12px;
}

.file-input {
	display: none;
}

.image-upload-label {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 40px 20px;
	border: 2px dashed #cbd5e0;
	border-radius: 8px;
	background: #f7fafc;
	cursor: pointer;
	transition: all 0.3s ease;
	position: relative;
}

.image-upload-label:hover {
	border-color: #667eea;
	background: #edf2f7;
}

.image-upload-label.drag-over {
	border-color: #667eea;
	background: #ebf4ff;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.upload-icon {
	font-size: 32px;
	margin-bottom: 12px;
}

.upload-text {
	text-align: center;
}

.upload-main {
	font-size: 14px;
	font-weight: 600;
	color: #2d3748;
	margin: 0 0 4px 0;
}

.upload-sub {
	font-size: 12px;
	color: #718096;
	margin: 0;
}

/* ============================================
 *   画像プレビュー
 *   ============================================ */

.image-preview {
	margin-top: 12px;
}

.preview-container {
	position: relative;
	display: inline-block;
	width: 100%;
	max-width: 300px;
	margin: 0 auto;
}

.preview-container img {
	width: 100%;
	height: auto;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	display: block;
}

.preview-remove {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 32px;
	height: 32px;
	border: none;
	background: rgba(0, 0, 0, 0.6);
	color: white;
	border-radius: 50%;
	font-size: 18px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
	padding: 0;
}

.preview-remove:hover {
	background: rgba(0, 0, 0, 0.8);
	transform: scale(1.1);
}

/* ============================================
 *   現在の画像表示（編集ページ）
 *   ============================================ */

.current-image {
	margin-bottom: 20px;
	padding: 16px;
	background: #f0f4f8;
	border-radius: 8px;
	border-left: 4px solid #667eea;
}

.current-image-label {
	font-size: 12px;
	font-weight: 700;
	color: #4a5568;
	margin-bottom: 10px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.current-image img {
	width: 100%;
	max-width: 200px;
	height: auto;
	border-radius: 6px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	display: block;
}

/* ============================================
 *   アクション（ボタン）
 *   ============================================ */

.form-actions {
	display: flex;
	gap: 12px;
	justify-content: flex-end;
	padding-top: 20px;
	border-top: 1px solid #e2e8f0;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 20px;
	font-size: 14px;
	font-weight: 600;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.3s ease;
	text-decoration: none;
	white-space: nowrap;
	letter-spacing: 0.3px;
}

.btn-primary {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-primary:active {
	transform: translateY(0);
	box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
	background: #e2e8f0;
	color: #2d3748;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
	background: #cbd5e0;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-secondary:active {
	transform: translateY(0);
}

.btn-lg {
	padding: 12px 28px;
	font-size: 15px;
}

.btn-icon {
	font-size: 16px;
	display: inline-flex;
	align-items: center;
}

/* ============================================
 *   レスポンシブデザイン
 *   ============================================ */

@media (max-width: 640px) {
	.form-container {
		padding: 16px;
	}
	
	.form-card {
		border-radius: 8px;
	}
	
	.form-header {
		padding: 30px 20px;
	}
	
	.form-title {
		font-size: 24px;
	}
	
	.form-content {
		padding: 20px;
	}
	
	.form-group {
		margin-bottom: 18px;
	}
	
	.image-upload-label {
		padding: 30px 15px;
	}
	
	.form-actions {
		flex-direction: column;
	}
	
	.btn {
		width: 100%;
	}
	
	.btn-primary,
	.btn-secondary {
		font-size: 15px;
	}
}

/* ============================================
 *   ダーク対応（オプション）
 *   ============================================ */

@media (prefers-color-scheme: dark) {
	.form-container {
		background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
	}
	
	.form-card {
		background: #2d3748;
	}
	
	.form-label,
	.checkbox-label,
	.upload-main {
		color: #e2e8f0;
	}
	
	.form-input,
	.form-textarea {
		background: #1a202c;
		border-color: #4a5568;
		color: #e2e8f0;
	}
	
	.form-input::placeholder,
	.form-textarea::placeholder {
		color: #718096;
	}
	
	.image-upload-label {
		background: #1a202c;
		border-color: #4a5568;
	}
	
	.image-upload-label:hover {
		background: #2d3748;
	}
	
	.upload-sub,
	.form-help {
		color: #a0aec0;
	}
	
	.current-image {
		background: #1a202c;
		border-left-color: #667eea;
	}
	
	.form-actions {
		border-top-color: #4a5568;
	}
}

/* グループアイコン（大） */
.group-avatar-large {
	position: relative;
	width: 120px;
	height: 120px;
	border-radius: 12px;
	overflow: hidden;
}

/* 画像スタイル */
.avatar-image-large {
	width: 100%;
	height: 100%;
	object-fit: cover;
	position: relative;
	z-index: 1;
	filter: brightness(1.1) contrast(1.2);
}

.group-avatar-large:hover .avatar-image-large {
	transform: scale(1.05);
}

.avatar-placeholder-large {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 16px;
}

.avatar-container,
.avatar-placeholder-large {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 100%);
	border: 2px solid;
	border-image: linear-gradient(135deg, #00d4ff 0%, #7b2ff7 100%) 1;
	box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

/* グロー効果 */
.avatar-glow {
	position: absolute;
	inset: -10px;
	background: radial-gradient(circle, rgba(0, 212, 255, 0.2) 0%, transparent 70%);
	border-radius: 12px;
	pointer-events: none;
	animation: glow-pulse 3s ease-in-out infinite;
}

@keyframes glow-pulse {
	0%, 100% {
		opacity: 0.5;
	}
	50% {
		opacity: 1;
	}
}

/* グリッド背景 */
.avatar-grid {
	position: absolute;
	inset: 0;
	background-image: 
	linear-gradient(0deg, transparent 24%, rgba(0, 212, 255, 0.05) 25%, rgba(0, 212, 255, 0.05) 26%, transparent 27%, transparent 74%, rgba(0, 212, 255, 0.05) 75%, rgba(0, 212, 255, 0.05) 76%, transparent 77%, transparent),
	linear-gradient(90deg, transparent 24%, rgba(0, 212, 255, 0.05) 25%, rgba(0, 212, 255, 0.05) 26%, transparent 27%, transparent 74%, rgba(0, 212, 255, 0.05) 75%, rgba(0, 212, 255, 0.05) 76%, transparent 77%, transparent);
	background-size: 30px 30px;
	pointer-events: none;
	opacity: 0.3;
}

/* イニシャルスタイル */
.avatar-initial {
	font-size: 48px;
	font-weight: 900;
	background: linear-gradient(135deg, #00d4ff 0%, #7b2ff7 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	position: relative;
	z-index: 2;
	text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
	letter-spacing: 2px;
}

/* ボーダーアニメーション */
.avatar-border {
	position: absolute;
	inset: 0;
	border: 2px solid transparent;
	border-image: linear-gradient(45deg, #00d4ff, #7b2ff7, #00d4ff) 1;
	border-radius: 12px;
	pointer-events: none;
	animation: border-glow 2s linear infinite;
}

@keyframes border-glow {
	0% {
		box-shadow: 0 0 5px rgba(0, 212, 255, 0.5), inset 0 0 5px rgba(0, 212, 255, 0.1);
	}
	50% {
		box-shadow: 0 0 20px rgba(123, 47, 247, 0.6), inset 0 0 10px rgba(123, 47, 247, 0.2);
	}
	100% {
		box-shadow: 0 0 5px rgba(0, 212, 255, 0.5), inset 0 0 5px rgba(0, 212, 255, 0.1);
	}
}

/* ホバーエフェクト */
.avatar-container:hover,
.avatar-placeholder-large:hover {
	box-shadow: 0 0 40px rgba(0, 212, 255, 0.6), 0 0 80px rgba(123, 47, 247, 0.4);
}

.avatar-container:hover .avatar-image-large,
.avatar-placeholder-large:hover .avatar-initial {
	filter: brightness(1.3) contrast(1.3);
	transform: scale(1.05);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
	.group-header {
		flex-direction: column;
		text-align: center;
		gap: 16px;
	}
	
	.group-avatar-large {
		width: 100px;
		height: 100px;
		font-size: 40px;
	}
	
	.header-content h1 {
		font-size: 24px;
	}
	
	.group-controls {
		justify-content: center;
		width: 100%;
	}
}

@media (max-width: 480px) {
	.group-avatar-large {
		width: 80px;
		height: 80px;
		font-size: 32px;
	}
	
	.header-content h1 {
		font-size: 20px;
	}
	
	.group-controls {
		gap: 8px;
	}
	
	.btn {
		padding: 8px 12px;
		font-size: 12px;
	}
}

.message-user-profile {
	text-decoration: none;
	color: inherit;
	display: flex;
	align-items: flex-start;
	margin-right: 12px;
}

.message-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	flex-shrink: 0;
	background-color: #e0e0e0;
	transition: transform 0.2s;
}

.message-user-profile:hover .message-avatar {
	transform: scale(1.1);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.message-avatar .avatar-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.message-avatar .avatar-initial {
	font-weight: bold;
	font-size: 16px;
	color: #555;
	user-select: none;
}

.message-author-link {
	text-decoration: none;
	color: #1976d2;
	transition: color 0.2s;
}

.message-author-link:hover {
	color: #1565c0;
	text-decoration: underline;
}

.message {
	display: flex;
	margin-bottom: 12px;
	transition: background-color 0.2s;
}

.message:hover {
	background-color: #f5f5f5;
	border-radius: 8px;
	padding: 4px;
}
