 :root {
     --md-sys-color-primary: #6750A4;
     --md-sys-color-on-primary: #FFFFFF;
     --md-sys-color-primary-container: #EADDFF;
     --md-sys-color-on-primary-container: #21005D;
     --md-sys-color-surface: #FEF7FF;
     --md-sys-color-on-surface: #1D1B20;
     --md-sys-color-surface-variant: #E7E0EC;
     --md-sys-color-on-surface-variant: #49454F;
     --md-sys-color-outline: #79747E;
     --md-sys-color-background: #FEF7FF;
     --md-sys-color-on-background: #1D1B20;
     --md-sys-color-shadow: #000000;
     --md-sys-color-scrim: #000000;
 }

 [data-theme="dark"] {
     --md-sys-color-primary: #D0BCFF;
     --md-sys-color-on-primary: #381E72;
     --md-sys-color-primary-container: #4F378B;
     --md-sys-color-on-primary-container: #EADDFF;
     --md-sys-color-surface: #141218;
     --md-sys-color-on-surface: #E6E1E5;
     --md-sys-color-surface-variant: #49454F;
     --md-sys-color-on-surface-variant: #CAC4D0;
     --md-sys-color-outline: #938F99;
     --md-sys-color-background: #141218;
     --md-sys-color-on-background: #E6E1E5;
 }

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

 html {
     scroll-behavior: smooth;
 }

 body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
     background-color: var(--md-sys-color-background);
     color: var(--md-sys-color-on-background);
     transition: background-color 0.3s, color 0.3s;
     line-height: 1.6;
 }

 /* ---=== Header ===--- */
 .app-header {
     display: flex;
     justify-content: space-between;
     align-items: center;
     padding: 8px 16px;
     background-color: color-mix(in srgb, var(--md-sys-color-surface) 90%, transparent);
     backdrop-filter: blur(10px);
     -webkit-backdrop-filter: blur(10px);
     border-bottom: 1px solid var(--md-sys-color-outline);
     position: sticky;
     top: 0;
     z-index: 1000;
     width: 100%;
 }

 .app-header h1 {
     font-size: 1.5rem;
     font-weight: 500;
     color: var(--md-sys-color-primary);
 }

 .header-left,
 .header-center,
 .header-right {
     display: flex;
     align-items: center;
     gap: 8px;
 }

 .icon-button {
     display: inline-flex;
     justify-content: center;
     align-items: center;
     width: 40px;
     height: 40px;
     background-color: transparent;
     border: none;
     border-radius: 50%;
     cursor: pointer;
     color: var(--md-sys-color-on-surface-variant);
     transition: background-color 0.2s;
 }

 .icon-button:hover {
     background-color: color-mix(in srgb, var(--md-sys-color-on-surface) 10%, transparent);
 }

 .language-dropdown {
     position: relative;
 }

 .language-dropdown .dropdown-menu {
     display: none;
     position: absolute;
     top: 100%;
     right: 0;
     background-color: var(--md-sys-color-surface-variant);
     list-style: none;
     padding: 8px 0;
     border-radius: 8px;
     min-width: 200px;
     box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
     max-height: 50vh;
     overflow: hidden;
     overflow-y: scroll;
 }

 .language-dropdown:hover .dropdown-menu {
     display: block;
 }

 .dropdown-menu a {
     display: block;
     padding: 8px 16px;
     color: var(--md-sys-color-on-surface-variant);
     text-decoration: none;
     font-size: 0.9rem;
 }

 .dropdown-menu a:hover {
     background-color: color-mix(in srgb, var(--md-sys-color-on-surface) 10%, transparent);
 }

 /* ---=== Drawer Menu ===--- */
 .drawer {
     position: fixed;
     top: 0;
     left: 0;
     width: 280px;
     height: 100%;
     background-color: var(--md-sys-color-surface);
     z-index: 1200;
     transform: translateX(-100%);
     transition: transform 0.3s ease-in-out;
     display: flex;
     flex-direction: column;
 }

 .drawer.open {
     transform: translateX(0);
     box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
 }

 .drawer-header {
     display: flex;
     justify-content: space-between;
     align-items: center;
     padding: 16px;
     border-bottom: 1px solid var(--md-sys-color-outline);
 }

 .drawer-header h2 {
     font-weight: 500;
 }

 .drawer ul {
     list-style: none;
     padding: 8px;
     overflow-y: scroll;
 }

 .drawer ul a {
     display: flex;
     align-items: center;
     gap: 16px;
     padding: 12px 16px;
     text-decoration: none;
     color: var(--md-sys-color-on-surface);
     border-radius: 24px;
 }

 .drawer ul a:hover {
     background-color: var(--md-sys-color-surface-variant);
 }

 .drawer-overlay {
     position: fixed;
     top: 0;
     left: 0;
     width: 100%;
     height: 100%;
     background-color: var(--md-sys-color-scrim);
     opacity: 0;
     visibility: hidden;
     transition: opacity 0.3s, visibility 0.3s;
     z-index: 1100;
 }

 .drawer-overlay.visible {
     opacity: 0.5;
     visibility: visible;
 }

 /* ---=== Main Content & Search ===--- */
 main {
     padding: 24px;
     max-width: 1200px;
     margin: 0 auto;
 }

 .search-container {
     margin-bottom: 32px;
 }

 .search-bar {
     display: flex;
     align-items: center;
     background-color: var(--md-sys-color-surface-variant);
     border-radius: 28px;
     padding: 0 16px;
     max-width: 600px;
     margin: 0 auto;
 }

 .search-bar .material-symbols-outlined {
     color: var(--md-sys-color-on-surface-variant);
 }

 #search-input {
     width: 100%;
     border: none;
     background: transparent;
     outline: none;
     padding: 14px 12px;
     font-size: 1rem;
     color: var(--md-sys-color-on-surface-variant);
 }

 #search-input::placeholder {
     color: var(--md-sys-color-on-surface-variant);
     opacity: 0.7;
 }

 /* ---=== Symbols Grid ===--- */
 .symbol-category {
     margin-bottom: 48px;
 }

 .category-title {
     font-weight: 400;
     color: var(--md-sys-color-on-surface-variant);
     margin-bottom: 16px;
     padding-bottom: 8px;
     border-bottom: 1px solid var(--md-sys-color-outline);
 }

 .symbol-grid {
     display: grid;
     grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
     gap: 12px;
 }

 .symbol-item {
     display: flex;
     justify-content: center;
     align-items: center;
     height: 60px;
     background-color: var(--md-sys-color-surface-variant);
     border-radius: 12px;
     font-size: 1.8rem;
     cursor: pointer;
     transition: transform 0.2s ease, background-color 0.2s;
     color: var(--md-sys-color-on-surface-variant);
     -webkit-user-select: none;
     -ms-user-select: none;
     user-select: none;
 }

 .symbol-item.emoji {
     font-size: 2.2rem;
 }

 .symbol-item:hover {
     background-color: var(--md-sys-color-primary-container);
     color: var(--md-sys-color-on-primary-container);
     transform: scale(1.1);
 }

 /* ---=== Special Table for Non-Printing Chars ===--- */
 .special-table {
     width: 100%;
     border-collapse: collapse;
     margin-top: 16px;
     background-color: var(--md-sys-color-surface-variant);
     border-radius: 12px;
     overflow: hidden;
 }

 .special-table th,
 .special-table td {
     padding: 12px 16px;
     text-align: left;
     border-bottom: 1px solid var(--md-sys-color-outline);
 }

 .special-table th {
     background-color: var(--md-sys-color-primary-container);
     color: var(--md-sys-color-on-primary-container);
     font-weight: 500;
 }

 .special-table tr:last-child td {
     border-bottom: none;
 }

 .special-table .copy-cell {
     font-family: monospace;
     cursor: pointer;
     color: var(--md-sys-color-primary);
     font-weight: 500;
 }

 .special-table .copy-cell:hover {
     text-decoration: underline;
 }

 .special-table .symbol-item {
     display: inline-flex;
     padding: 4px 12px;
     height: auto;
     width: auto;
     font-size: 1rem;
 }

 /* ---=== Article/Prose Section ===--- */
 .prose-section {
     max-width: 800px;
     margin: 48px auto 0;
     padding: 24px;
     background-color: var(--md-sys-color-surface-variant);
     color: var(--md-sys-color-on-surface-variant);
     border-radius: 16px;
 }

 .prose-section h2 {
     font-weight: 500;
     margin-bottom: 16px;
     color: var(--md-sys-color-on-surface);
 }

 .prose-section p {
     margin-bottom: 16px;
     line-height: 1.7;
 }

 .prose-section a {
     color: var(--md-sys-color-primary);
     text-decoration: none;
     font-weight: 500;
 }

 .prose-section a:hover {
     text-decoration: underline;
 }

 .prose-section ul, .prose-section ol {
     margin-bottom: 16px;
     line-height: 1.7;
     margin-left: 1rem;
 }

 /* ---=== Footer ===--- */
 .app-footer {
     text-align: center;
     padding: 24px;
     margin-top: 48px;
     border-top: 1px solid var(--md-sys-color-outline);
     color: var(--md-sys-color-on-surface-variant);
     font-size: 0.9rem;
 }

 .app-footer p {
     margin-bottom: 4px;
 }

 /* ---=== Toast Notification ===--- */
 .toast {
     position: fixed;
     bottom: 30px;
     left: 50%;
     transform: translateX(-50%);
     background-color: var(--md-sys-color-on-background);
     color: var(--md-sys-color-background);
     padding: 12px 24px;
     border-radius: 24px;
     box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
     opacity: 0;
     visibility: hidden;
     transition: opacity 0.5s, visibility 0.5s, bottom 0.5s;
     z-index: 2000;
     font-weight: 500;
     white-space: nowrap;
 }

 .toast.show {
     opacity: 1;
     visibility: visible;
     bottom: 50px;
 }

 /* ---=== Responsive Design ===--- */
 @media (max-width: 768px) {
     .app-header h1 {
         font-size: 1.2rem;
     }

     main {
         padding: 16px;
     }

     .symbol-grid {
         grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
         gap: 8px;
     }

     .symbol-item {
         height: 50px;
         font-size: 1.5rem;
         border-radius: 8px;
     }

     .language-dropdown .dropdown-menu {
         min-width: 150px;
     }
 }