* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Malgun Gothic", sans-serif; background: #f5f5f5; min-height: 100vh; padding: 20px; line-height: 1.6; }
.container { max-width: 800px; margin: 0 auto; background: #fff; border: 1px solid #ddd; }
header { background: #2c3e50; color: #fff; padding: 25px 30px; border-bottom: 3px solid #1a252f; }
h1 { font-size: 1.6rem; font-weight: 600; margin-bottom: 15px; }
.home-link { display: inline-block; color: #ecf0f1; text-decoration: none; font-size: 0.95rem; margin-bottom: 15px; opacity: 0.8; transition: opacity 0.2s; font-weight: 500; }
.home-link:hover { opacity: 1; color: #fff; }
.info-box { background: #34495e; padding: 12px 18px; display: inline-block; border-left: 3px solid #8e44ad; }
.info-box p { margin: 3px 0; font-size: 0.95rem; color: #ecf0f1; }
.info-box strong { color: #fff; font-weight: 600; }
main { padding: 30px; }
h2 { color: #333; margin-bottom: 20px; font-size: 1.2rem; font-weight: 600; }

.type-tabs { display: flex; gap: 0; border-bottom: 2px solid #eee; margin-bottom: 20px; }
.tab-btn { padding: 10px 20px; background: none; border: none; border-bottom: 3px solid transparent; font-size: 0.95rem; cursor: pointer; color: #666; transition: all 0.2s; font-weight: 500; }
.tab-btn:hover { color: #8e44ad; }
.tab-btn.active { color: #8e44ad; border-bottom-color: #8e44ad; font-weight: 600; }

.direction-toggle { display: flex; gap: 0; margin-bottom: 20px; border: 1px solid #ccc; border-radius: 6px; overflow: hidden; }
.dir-btn { flex: 1; padding: 10px; background: #f8f9fa; border: none; font-size: 0.9rem; cursor: pointer; color: #666; font-weight: 500; transition: all 0.2s; }
.dir-btn.active { background: #8e44ad; color: #fff; font-weight: 600; }

.encode-section { margin-bottom: 16px; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.section-header label { font-size: 0.95rem; font-weight: 600; color: #333; }
.char-count { font-size: 0.8rem; color: #999; }
.encode-section textarea { width: 100%; padding: 12px 14px; border: 1px solid #ccc; border-radius: 4px; font-size: 0.9rem; font-family: 'Consolas', 'Monaco', monospace; resize: vertical; transition: border-color 0.2s; }
.encode-section textarea:focus { outline: none; border-color: #8e44ad; }
.text-actions { display: flex; gap: 8px; margin-top: 8px; }
.action-btn { padding: 6px 14px; background: #f8f9fa; color: #333; border: 1px solid #ccc; border-radius: 4px; font-size: 0.85rem; cursor: pointer; transition: all 0.2s; }
.action-btn:hover { border-color: #8e44ad; color: #8e44ad; }

.swap-section { text-align: center; margin: 8px 0; }
.swap-btn { width: 40px; height: 40px; border-radius: 50%; background: #8e44ad; color: #fff; border: none; font-size: 1.2rem; cursor: pointer; transition: background 0.2s; }
.swap-btn:hover { background: #7d3c98; }

.sample-section { margin-top: 20px; padding: 16px; background: #f8f9fa; border: 1px solid #e0e0e0; border-radius: 6px; }
.sample-section label { display: block; font-size: 0.9rem; font-weight: 600; color: #555; margin-bottom: 10px; }
.sample-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.sample-btn { padding: 6px 14px; background: #fff; color: #333; border: 1px solid #ccc; border-radius: 4px; font-size: 0.85rem; cursor: pointer; transition: all 0.2s; }
.sample-btn:hover { border-color: #8e44ad; color: #8e44ad; }

.notice-section { background: #fffbe6; border: 1px solid #e6d8a8; border-left: 4px solid #d4a017; padding: 20px; margin: 0 30px 25px 30px; }
.notice-section h2 { color: #5d4e00; margin-bottom: 12px; font-size: 1.1rem; }
.notice-content p { color: #665500; margin: 8px 0; line-height: 1.6; font-size: 0.9rem; }
.notice-content strong { color: #4a4000; }

footer { background: #f8f9fa; text-align: center; padding: 15px 20px; color: #777; font-size: 0.85rem; border-top: 1px solid #ddd; }
.footer-links { margin-top: 8px; }
.lang-select { padding: 4px 8px; border: 1px solid #ccc; border-radius: 4px; font-size: 0.85rem; background: #fff; color: #333; cursor: pointer; }

.toast { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(100px); background: #2c3e50; color: #fff; padding: 12px 24px; border-radius: 4px; font-size: 0.9rem; opacity: 0; transition: all 0.3s ease; z-index: 1000; box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 768px) { body { padding: 10px; } h1 { font-size: 1.3rem; } header { padding: 20px; } main { padding: 20px; } .notice-section { margin: 0 20px 20px 20px; } }
@media (max-width: 480px) { .direction-toggle { flex-direction: column; } .sample-buttons { flex-direction: column; } }
