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

body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	background: #f5f5f5;
	min-height: 100vh;
	color: #333;
	padding: 20px;
}

.nav-bar {
	background: white;
	border: 1px solid #ddd;
	border-radius: 6px;
	padding: 15px 30px;
	margin-bottom: 30px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.nav-bar .logo {
	color: #333;
	font-size: 1.3rem;
	font-weight: 600;
	text-decoration: none;
}

.nav-links {
	display: flex;
	gap: 15px;
}

.nav-links a {
	color: #666;
	text-decoration: none;
	padding: 8px 16px;
	border-radius: 4px;
	transition: all 0.3s ease;
	font-weight: 400;
}

.nav-links a:hover {
	background: #f5f5f5;
	color: #333;
}

.nav-links a.active {
	background: #e8e8e8;
	color: #333;
}

.container {
	max-width: 1000px;
	margin: 0 auto;
	background: white;
	border-radius: 8px;
	border: 1px solid #ddd;
	box-shadow: 0 2px 8px rgba(0,0,0,0.08);
	overflow: hidden;
}

.header {
	background: #333;
	color: white;
	padding: 25px;
	text-align: center;
}

.header h1 {
	font-size: 1.8rem;
	margin-bottom: 8px;
	font-weight: 600;
}

.header p {
	font-size: 0.95rem;
	opacity: 0.9;
}

.tabs {
	display: flex;
	background: #fafafa;
	border-bottom: 1px solid #ddd;
}

.tab {
	flex: 1;
	padding: 15px;
	text-align: center;
	background: #fafafa;
	border: none;
	cursor: pointer;
	font-size: 0.9rem;
	font-weight: 500;
	color: #666;
	transition: all 0.3s ease;
	position: relative;
}

.tab:hover {
	background: #f0f0f0;
}

.tab.active {
	background: white;
	color: #333;
}

.tab.active::after {
	content: '';
	position: absolute;
	bottom: -1px;
	left: 0;
	right: 0;
	height: 2px;
	background: #333;
}

.tab-content {
	display: none;
	padding: 25px;
}

.tab-content.active {
	display: block;
}

.main-content {
	padding: 30px;
}

.method-info {
	background: #fafafa;
	border-radius: 6px;
	padding: 20px;
	margin-bottom: 30px;
	border-left: 3px solid #333;
}

.method-info h2 {
	color: #333;
	margin-bottom: 15px;
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 1.3em;
}

.method-info p {
	line-height: 1.6;
	color: #666;
	margin-bottom: 10px;
}

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

.feature-card {
	background: white;
	padding: 15px;
	border-radius: 6px;
	border: 1px solid #ddd;
}

.feature-card h4 {
	color: #333;
	margin-bottom: 8px;
}

.tool-section {
	margin-bottom: 40px;
}

.section-header {
	background: #333;
	color: white;
	padding: 18px;
	border-radius: 6px 6px 0 0;
	margin: 0;
}

.section-header h3 {
	margin: 0;
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 1.2em;
}

.section-content {
	background: #fafafa;
	border: 1px solid #ddd;
	border-top: none;
	border-radius: 0 0 6px 6px;
	padding: 25px;
}

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

.form-group label {
	display: block;
	margin-bottom: 8px;
	font-weight: 500;
	color: #333;
}

.form-control {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 14px;
	transition: all 0.3s ease;
	font-family: inherit;
	resize: vertical;
}

.form-control:focus {
	outline: none;
	border-color: #666;
	box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

textarea.form-control {
	min-height: 120px;
	font-family: 'SF Mono', Monaco, monospace;
}

.btn {
	background: #333;
	color: white;
	border: none;
	padding: 10px 20px;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	transition: all 0.3s ease;
}

.btn:hover {
	background: #555;
}

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

.btn-secondary {
	background: #666;
}

.btn-danger {
	background: #888;
}

.button-group {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.results-section {
	margin-top: 25px;
	padding: 20px;
	background: white;
	border-radius: 6px;
	border: 1px solid #ddd;
}

.results-section.success {
	border-left: 3px solid #333;
	background: #fafafa;
}

.results-section.error {
	border-left: 3px solid #666;
	background: #f5f5f5;
}

.stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 12px;
	margin-top: 15px;
}

.stat-item {
	text-align: center;
	padding: 12px;
	background: #fafafa;
	border-radius: 4px;
	border: 1px solid #ddd;
}

.stat-value {
	font-size: 1.5em;
	font-weight: 600;
	color: #333;
}

.stat-label {
	font-size: 0.85em;
	color: #666;
	margin-top: 5px;
}

.analysis-details {
	margin-top: 20px;
	padding: 15px;
	background: #fafafa;
	border-radius: 6px;
	border: 1px solid #ddd;
}

.analysis-details h4 {
	color: #333;
	margin-bottom: 10px;
}

.space-counts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 10px;
	margin-top: 10px;
}

.space-count-item {
	background: white;
	padding: 10px;
	border-radius: 4px;
	text-align: center;
	border: 1px solid #ddd;
}

.space-count-value {
	font-size: 1.2em;
	font-weight: 600;
	color: #333;
}

.space-count-label {
	font-size: 0.8em;
	color: #666;
	margin-top: 2px;
}

.warning {
	background: #fafafa;
	border: 1px solid #ddd;
	border-radius: 6px;
	padding: 15px;
	margin: 20px 0;
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.warning-icon {
	color: #666;
	font-size: 1.2em;
	margin-top: 2px;
}

.warning-content h4 {
	color: #333;
	margin-bottom: 5px;
}

.warning-content p {
	color: #666;
	font-size: 0.9em;
	line-height: 1.4;
}

@media (max-width: 768px) {
	.container {
		padding: 15px;
	}

	.header h1 {
		font-size: 2em;
	}

	.nav-buttons {
		gap: 10px;
	}

	.nav-btn {
		padding: 10px 16px;
		font-size: 14px;
	}

	.main-content {
		padding: 20px;
	}

	.button-group {
		justify-content: center;
	}
}

.copy-button {
	position: absolute;
	top: 10px;
	right: 10px;
	background: #333;
	color: white;
	border: none;
	padding: 6px 12px;
	border-radius: 4px;
	cursor: pointer;
	font-size: 12px;
	opacity: 0.8;
}

.copy-button:hover {
	opacity: 1;
}

.textarea-wrapper {
	position: relative;
}

#loadingSpinner {
	display: none;
	text-align: center;
	margin: 20px 0;
}

.spinner {
	border: 3px solid #e8e8e8;
	border-top: 3px solid #333;
	border-radius: 50%;
	width: 30px;
	height: 30px;
	animation: spin 1s linear infinite;
	margin: 0 auto;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

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

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: #f5f5f5;
            min-height: 100vh;
            padding: 20px;
            color: #333;
        }

        .nav-bar {
            background: white;
            border: 1px solid #ddd;
            border-radius: 6px;
            padding: 15px 30px;
            margin-bottom: 30px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            box-shadow: 0 1px 3px rgba(0,0,0,0.08);
        }

        .nav-bar .logo {
            color: #333;
            font-size: 1.3rem;
            font-weight: 600;
            text-decoration: none;
        }

        .nav-links {
            display: flex;
            gap: 15px;
        }

        .nav-links a {
            color: #666;
            text-decoration: none;
            padding: 8px 16px;
            border-radius: 4px;
            transition: all 0.3s ease;
            font-weight: 400;
        }

        .nav-links a:hover {
            background: #f5f5f5;
            color: #333;
        }

        .nav-links a.active {
            background: #e8e8e8;
            color: #333;
        }

        .container {
            max-width: 900px;
            margin: 0 auto;
            background: white;
            border-radius: 8px;
            border: 1px solid #ddd;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
            overflow: hidden;
        }

        .header {
            background: #333;
            color: white;
            padding: 25px;
            text-align: center;
        }

        .header h1 {
            font-size: 1.8rem;
            margin-bottom: 8px;
            font-weight: 600;
        }

        .header p {
            font-size: 0.95rem;
            opacity: 0.9;
        }

        .tabs {
            display: flex;
            background: #fafafa;
            border-bottom: 1px solid #ddd;
        }

        .tab {
            flex: 1;
            padding: 15px;
            text-align: center;
            background: #fafafa;
            border: none;
            cursor: pointer;
            font-size: 0.9rem;
            font-weight: 500;
            color: #666;
            transition: all 0.3s ease;
            position: relative;
        }

        .tab:hover {
            background: #f0f0f0;
        }

        .tab.active {
            background: white;
            color: #333;
        }

        .tab.active::after {
            content: '';
            position: absolute;
            bottom: -1px;
            left: 0;
            right: 0;
            height: 2px;
            background: #333;
        }

        .tab-content {
            display: none;
            padding: 25px;
        }

        .tab-content.active {
            display: block;
        }

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

        .form-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
            color: #333;
            font-size: 0.9rem;
        }

        .form-control {
            width: 100%;
            padding: 10px 12px;
            border: 1px solid #ccc;
            border-radius: 4px;
            font-size: 0.9rem;
            transition: all 0.3s ease;
            resize: vertical;
            min-height: 100px;
            font-family: inherit;
        }

        .form-control:focus {
            outline: none;
            border-color: #666;
            box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
        }

        .form-control.small {
            min-height: 40px;
        }

        .emoji-display {
            font-size: 3rem;
            text-align: center;
            padding: 25px;
            background: #fafafa;
            border: 1px solid #ddd;
            border-radius: 6px;
            margin: 15px 0;
            min-height: 100px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
        }

        .button-group {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }

        .btn {
            padding: 10px 18px;
            border: none;
            border-radius: 4px;
            font-size: 0.9rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

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

        .btn-primary:hover {
            background: #555;
        }

        .btn-secondary {
            background: #e8e8e8;
            color: #333;
            border: 1px solid #ccc;
        }

        .btn-secondary:hover {
            background: #d8d8d8;
        }

        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
            gap: 12px;
            margin-top: 15px;
            padding: 15px;
            background: #fafafa;
            border-radius: 6px;
            border: 1px solid #ddd;
        }

        .stat-item {
            text-align: center;
            padding: 10px;
            background: white;
            border-radius: 4px;
            border: 1px solid #ddd;
        }

        .stat-value {
            font-size: 1.4rem;
            font-weight: 600;
            color: #333;
            margin-bottom: 4px;
        }

        .stat-label {
            font-size: 0.8rem;
            color: #666;
        }

        .alert {
            padding: 12px 16px;
            border-radius: 4px;
            margin-bottom: 15px;
            display: none;
            font-size: 0.9rem;
        }

        .alert.show {
            display: block;
        }

        .alert-success {
            background: #f0f0f0;
            color: #333;
            border: 1px solid #ccc;
        }

        .alert-error {
            background: #f5f5f5;
            color: #333;
            border: 1px solid #ccc;
        }

        .alert-info {
            background: #fafafa;
            color: #333;
            border: 1px solid #ddd;
        }

        .demo-section {
            background: #fafafa;
            border: 1px solid #ddd;
            border-radius: 6px;
            padding: 20px;
            margin-bottom: 20px;
        }

        .demo-section h3 {
            color: #333;
            margin-bottom: 12px;
            font-size: 1.1rem;
            font-weight: 500;
        }

        .demo-buttons {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }

        .demo-btn {
            padding: 6px 12px;
            background: white;
            color: #4a5568;
            border: 1px solid #d1d5db;
            border-radius: 4px;
            cursor: pointer;
            font-size: 0.85rem;
            font-weight: 400;
            transition: all 0.3s ease;
        }

        .demo-btn:hover {
            background: #f7fafc;
            border-color: #4299e1;
        }

        .emoji-selector {
            background: #f7fafc;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 20px;
        }

        .emoji-selector h4 {
            margin-bottom: 15px;
            font-size: 1rem;
            font-weight: 500;
            color: #2d3748;
        }

        .emoji-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
            gap: 8px;
            max-height: 200px;
            overflow-y: auto;
            border: 1px solid #e2e8f0;
            border-radius: 6px;
            padding: 12px;
            background: white;
        }

        .emoji-btn {
            background: white;
            border: 1px solid #e2e8f0;
            border-radius: 4px;
            padding: 8px;
            font-size: 1.4rem;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 45px;
            font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
        }

        .emoji-btn:hover {
            border-color: #4299e1;
            background: #f7fafc;
            transform: scale(1.05);
        }

        .emoji-btn.selected {
            border-color: #4299e1;
            background: #ebf8ff;
        }

        .char-counter {
            text-align: right;
            font-size: 0.8rem;
            color: #718096;
            margin-top: 5px;
        }

        .copy-btn {
            margin-left: 8px;
            padding: 4px 8px;
            font-size: 0.75rem;
            min-height: auto;
        }

        .analysis-results {
            background: #f7fafc;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            padding: 20px;
            margin-top: 20px;
        }

        .analysis-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 8px 0;
            border-bottom: 1px solid #e2e8f0;
            font-size: 0.9rem;
        }

        .analysis-item:last-child {
            border-bottom: none;
        }

        .decoded-message {
            background: #fafafa;
            border: 1px solid #ddd;
            border-radius: 6px;
            padding: 15px;
            margin-top: 15px;
        }

        .decoded-message h4 {
            color: #333;
            margin-bottom: 10px;
            font-size: 0.95rem;
        }

        .decoded-message p {
            color: #333;
            font-family: monospace;
            background: white;
            padding: 8px;
            border-radius: 4px;
            word-break: break-all;
            font-size: 0.85rem;
        }        .info-box {
            background: #fafafa;
            border: 1px solid #ddd;
            border-radius: 6px;
            padding: 16px;
            margin: 20px 0;
            font-size: 0.9rem;
            color: #333;
        }

        .info-box h4 {
            margin-bottom: 8px;
            font-size: 0.95rem;
        }

        @media (max-width: 768px) {
            .nav-bar {
                flex-direction: column;
                gap: 15px;
                padding: 20px;
            }

            .nav-links {
                flex-wrap: wrap;
                justify-content: center;
            }

            .tabs {
                flex-direction: column;
            }

            .header h1 {
                font-size: 1.8rem;
            }

            .button-group {
                flex-direction: column;
            }

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

            .emoji-grid {
                grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
                gap: 6px;
            }

            .emoji-btn {
                min-height: 40px;
                font-size: 1.2rem;
                padding: 4px;
            }
        }

        .technical-note {
            background: #f7fafc;
            border: 1px solid #e2e8f0;
            border-radius: 6px;
            padding: 16px;
            margin: 20px 0;
            font-size: 0.85rem;
            color: #4a5568;
        }

        .technical-note code {
            background: #e2e8f0;
            padding: 2px 4px;
            border-radius: 3px;
            font-family: 'Courier New', monospace;
        }
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        body {
            font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
            background: #f5f5f5;
            min-height: 100vh;
            padding: 20px;
            color: #333;
        }
        .nav-bar {
            background: white;
            border: 1px solid #ddd;
            border-radius: 6px;
            padding: 15px 30px;
            margin-bottom: 30px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            box-shadow: 0 1px 3px rgba(0,0,0,0.08);
        }
        .nav-bar .logo {
            color: #333;
            font-size: 1.3rem;
            font-weight: 600;
            text-decoration: none;
        }
        .nav-links {
            display: flex;
            gap: 15px;
        }
        .nav-links a {
            color: #666;
            text-decoration: none;
            padding: 8px 16px;
            border-radius: 4px;
            transition: all 0.3s ease;
            font-weight: 400;
        }
        .nav-links a:hover {
            background: #f5f5f5;
            color: #333;
        }
        .nav-links a.active {
            background: #e8e8e8;
            color: #333;
        }
        .container {
            max-width: 1000px;
            margin: 0 auto;
            background: white;
            border-radius: 8px;
            border: 1px solid #ddd;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
            overflow: hidden;
        }

        .header h1 {
            font-size: 2rem;
            margin-bottom: 10px;
        }
        .header p {
            font-size: 1rem;
            opacity: 0.95;
        }
        .tabs {
            display: flex;
            border-bottom: 1px solid #ddd;
            background: #fafafa;
        }
        .tab {
            flex: 1;
            padding: 18px;
            text-align: center;
            cursor: pointer;
            border: none;
            background: transparent;
            font-size: 1rem;
            font-weight: 500;
            color: #666;
            transition: all 0.3s ease;
        }
        .tab:hover {
            background: #f0f0f0;
            color: #333;
        }
        .tab.active {
            background: white;
            color: #667eea;
            border-bottom: 2px solid #667eea;
        }
        .tab-content {
            display: none;
            padding: 30px;
        }
        .tab-content.active {
            display: block;
        }
        .form-group {
            margin-bottom: 25px;
        }
        .form-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
            color: #333;
            font-size: 0.95rem;
        }
        .form-group textarea {
            width: 100%;
            padding: 12px;
            border: 1px solid #ddd;
            border-radius: 6px;
            font-family: "Courier New", monospace;
            font-size: 0.9rem;
            resize: vertical;
            transition: border-color 0.3s ease;
        }
        .form-group textarea:focus {
            outline: none;
            border-color: #667eea;
        }
        .form-group input[type="text"] {
            width: 100%;
            padding: 12px;
            border: 1px solid #ddd;
            border-radius: 6px;
            font-size: 0.95rem;
            transition: border-color 0.3s ease;
        }
        .form-group input[type="text"]:focus {
            outline: none;
            border-color: #667eea;
        }
        .form-group select {
            width: 100%;
            padding: 12px;
            border: 1px solid #ddd;
            border-radius: 6px;
            font-size: 0.95rem;
            background: white;
            cursor: pointer;
        }

