/* CSS Variables - Design System */
:root {
    --color-cream: #FAF8F5;
    --color-cream-dark: #F5F2ED;
    --color-peach: #FF9B7A;
    --color-peach-light: #FFB399;
    --color-peach-dark: #E8856A;
    --color-sage: #8B9D83;
    --color-sage-light: #A4B59C;
    --color-charcoal: #2D2D2D;
    --color-charcoal-light: #4A4A4A;
    --color-white: #FFFFFF;
    --color-shadow: rgba(45, 45, 45, 0.08);
    --color-shadow-hover: rgba(45, 45, 45, 0.15);

    --font-display: 'Playfair Display', serif;
    --font-body: 'DM Sans', sans-serif;

    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

body {
    font-family: var(--font-body);
    background: linear-gradient(135deg, var(--color-cream) 0%, var(--color-cream-dark) 100%);
    color: var(--color-charcoal);
    min-height: 100vh;
    line-height: 1.6;
}

/* Navigation Styles */
nav {
    background: linear-gradient(135deg, var(--color-white) 0%, var(--color-cream) 100%);
    box-shadow: 0 2px 20px var(--color-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(139, 157, 131, 0.1);
}

.nav-container {
    max-width: 64rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 5rem;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.site-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-peach) 0%, var(--color-sage) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    transition: var(--transition-smooth);
}

.site-title:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--color-charcoal);
    text-decoration: none;
    position: relative;
    padding: 0.5rem 0;
    transition: var(--transition-smooth);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-peach), var(--color-sage));
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--color-peach);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.lang-selector {
    background: var(--color-cream);
    border: 2px solid var(--color-sage-light);
    color: var(--color-charcoal);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.6rem 1.2rem;
    border-radius: 2rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    outline: none;
}

.lang-selector:hover {
    background: var(--color-white);
    border-color: var(--color-peach);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--color-shadow);
}

.lang-selector:focus {
    border-color: var(--color-peach);
    box-shadow: 0 0 0 3px rgba(255, 155, 122, 0.2);
}

/* Symbol Item Styles */
.symbol-item,
#symbolBoard {
    font-family: Arial, serif;
}

.symbol-item {
    transition: var(--transition-bounce);
    white-space: nowrap;
    overflow: visible;
    line-height: 1.2;
    max-width: fit-content;
    position: relative;
    cursor: pointer;
}

.symbol-item:hover {
    transform: scale(1.15) rotate(5deg);
    background: linear-gradient(135deg, var(--color-peach), var(--color-peach-light)) !important;
    color: white !important;
    z-index: 10;
    box-shadow: 0 8px 24px var(--color-shadow-hover);
}

/* Enhanced tooltip styling */
.symbol-item[title]:hover::before {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-charcoal);
    color: white;
    padding: 0.6rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-family: var(--font-body);
    white-space: nowrap;
    margin-bottom: 0.75rem;
    z-index: 50;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    animation: tooltipFadeIn 0.2s ease;
}

.symbol-item[title]:hover::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--color-charcoal);
    margin-bottom: -6px;
    z-index: 50;
    pointer-events: none;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.copied-notification {
    animation: fadeInOut 2s ease-in-out;
}

@keyframes fadeInOut {

    0%,
    100% {
        opacity: 0;
        transform: translateY(-10px);
    }

    10%,
    90% {
        opacity: 1;
        transform: translateY(0);
    }
}

.symbol-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-start;
    align-items: center;
}

/* Page load animation */
@keyframes pageLoad {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body {
    animation: pageLoad 0.6s ease;
}

/* Mobile Menu Defaults */
.mobile-menu-trigger {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-charcoal);
    margin: 5px 0;
    transition: var(--transition-smooth);
    border-radius: 2px;
}

.mobile-menu-trigger.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-trigger.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-trigger.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    z-index: 900;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    text-align: center;
    transform: translateY(20px);
    transition: var(--transition-smooth);
}

.mobile-menu.active .mobile-menu-content {
    transform: translateY(0);
}

.mobile-nav-link {
    display: block;
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--color-charcoal);
    text-decoration: none;
    padding: 1rem;
    margin-bottom: 0.5rem;
    transition: var(--transition-smooth);
}

.mobile-nav-link:hover {
    color: var(--color-peach);
    transform: scale(1.05);
}

.mobile-lang-options {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(139, 157, 131, 0.2);
}

.mobile-lang-title {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--color-sage);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mobile-lang-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.mobile-lang-btn {
    text-decoration: none;
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    border: 2px solid var(--color-sage-light);
    color: var(--color-charcoal);
    font-weight: 500;
    transition: var(--transition-smooth);
}

.mobile-lang-btn.active,
.mobile-lang-btn:hover {
    background: var(--color-peach);
    border-color: var(--color-peach);
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {

    .nav-links,
    .custom-dropdown {
        display: none;
    }

    .mobile-menu-trigger {
        display: block;
    }

    .site-title {
        font-size: 1.3rem;
    }

    .nav-content {
        height: 4rem;
    }
}

/* Extracted Styles */

/* Layout & Common */
.container {
    max-width: 64rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

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

.py-2 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.py-1 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 1rem;
    animation: cardFadeIn 0.5s ease;

    /* Reset nav styles */
    background: transparent;
    box-shadow: none;
    position: static;
    backdrop-filter: none;
    border: none;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-charcoal-light);
    font-size: 0.9rem;
    list-style: none;
    padding: 0;
}

.breadcrumb-separator {
    margin: 0 0.5rem;
    color: var(--color-sage-light);
}

.breadcrumb-link {
    color: var(--color-sage);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.breadcrumb-link:hover {
    color: var(--color-peach);
}

.breadcrumb-active {
    color: var(--color-peach);
    font-weight: 500;
}

/* Cards */
.card {
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 4px 20px var(--color-shadow);
    padding: 2rem;
    margin-bottom: 2.5rem;
    border: 1px solid rgba(139, 157, 131, 0.15);
    animation: cardFadeIn 0.6s ease;
    animation-fill-mode: both;
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

/* Symbol Board */
.board-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.board-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-charcoal);
    margin: 0;
}

.btn-group {
    display: flex;
    gap: 0.75rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-peach), var(--color-peach-light));
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    border: none;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 2px 8px rgba(255, 155, 122, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 155, 122, 0.4);
}

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

.btn-outline {
    background: var(--color-cream-dark);
    color: var(--color-charcoal);
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    border: 2px solid var(--color-sage-light);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-outline:hover {
    background: white;
    border-color: var(--color-peach);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--color-shadow);
}

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

.board-textarea {
    width: 100%;
    min-height: 100px;
    padding: 1.25rem;
    border: 2px solid var(--color-sage-light);
    border-radius: 1rem;
    background: var(--color-cream);
    font-size: 1.75rem;
    resize: vertical;
    font-family: Arial, serif;
    color: var(--color-charcoal);
    transition: var(--transition-smooth);
    outline: none;
}

.board-textarea:focus {
    border-color: var(--color-peach);
    box-shadow: 0 0 0 3px rgba(255, 155, 122, 0.2);
}

/* Instructions */
.instruction-card {
    background: linear-gradient(135deg, rgba(139, 157, 131, 0.1), rgba(164, 181, 156, 0.15));
    border-left: 4px solid var(--color-sage);
    padding: 1.25rem 1.5rem;
    margin-bottom: 2.5rem;
    border-radius: 0.75rem;
    animation: cardFadeIn 0.6s ease;
    animation-fill-mode: both;
}

.instruction-text {
    color: var(--color-charcoal-light);
    font-size: 0.95rem;
    margin: 0;
}

/* Cross-reference Link Card */
.cross-link-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, rgba(255, 155, 122, 0.1), rgba(255, 180, 158, 0.15));
    border-left: 4px solid var(--color-peach);
    border-radius: 0.75rem;
    animation: cardFadeIn 0.6s ease;
    animation-fill-mode: both;
}

.cross-link-card span {
    color: var(--color-charcoal);
    font-weight: 500;
}

.cross-link {
    color: var(--color-peach-dark);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.cross-link:hover {
    color: var(--color-peach);
    transform: translateX(4px);
    display: inline-block;
}

/* Typography & Titles */
.gradient-text {
    background: linear-gradient(135deg, var(--color-peach), var(--color-sage));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: var(--transition-smooth);
}

.page-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--color-charcoal);
    margin: 0 0 2rem 0;
}

.category-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 600;
    color: var(--color-charcoal);
    margin: 0 0 1.5rem 0;
    position: relative;
    display: inline-block;
}

.category-link {
    color: var(--color-charcoal);
    text-decoration: none;
}

/* Symbol Grid Items override */
.symbol-item-box {
    cursor: pointer;
    text-align: center;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    background: var(--color-cream);
    font-size: 1.75rem;
    font-weight: 500;
    min-width: 3.5rem;
    min-height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
}

.symbol-item-box:hover {
    border-color: var(--color-peach-light);
}

/* Footer */
.site-footer {
    background: linear-gradient(135deg, #2D2D2D 0%, #4A4A4A 100%);
    color: white;
    padding: 3rem 0 2rem;
    margin-top: 4rem;
    position: relative;
    overflow: hidden;
}

.footer-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #FF9B7A, #8B9D83, transparent);
}

.footer-text {
    color: var(--color-cream-dark);
    /* #F5F2ED */
    margin-bottom: 1rem;
    font-size: 1rem;
}

.footer-copyright {
    color: var(--color-sage-light);
    /* #A4B59C */
    font-size: 0.875rem;
}

/* Notification */
.notification-toast,
.notification {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #8B9D83, #A4B59C);
    color: white;
    padding: 1rem 2rem;
    border-radius: 1rem;
    box-shadow: 0 8px 24px rgba(45, 45, 45, 0.2);
    display: none;
    font-weight: 600;
    font-size: 1.1rem;
    z-index: 1000;
}

@keyframes notificationFadeInOut {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }

    15% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    85% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
}

/* Keyframes */
@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom Dropdown Styles */
.custom-dropdown {
    position: relative;
    font-family: var(--font-body);
}

.dropdown-trigger {
    background: var(--color-cream);
    border: 2px solid var(--color-sage-light);
    color: var(--color-charcoal);
    padding: 0.6rem 1.2rem;
    border-radius: 2rem;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-smooth);
}

.dropdown-trigger:hover,
.dropdown-trigger.active {
    background: var(--color-white);
    border-color: var(--color-peach);
    box-shadow: 0 4px 12px var(--color-shadow);
}

.dropdown-arrow {
    transition: transform 0.3s ease;
}

.dropdown-trigger.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    min-width: 140px;
    border-radius: 1rem;
    box-shadow: 0 4px 20px var(--color-shadow-hover);
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition-smooth);
    border: 1px solid rgba(139, 157, 131, 0.15);
    z-index: 1000;
}

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

.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--color-charcoal);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 0.75rem;
    transition: var(--transition-smooth);
}

.dropdown-item:hover {
    background: var(--color-cream);
    color: var(--color-peach-dark);
}

.dropdown-item.active {
    color: var(--color-peach-dark);
    background: var(--color-cream);
    font-weight: 600;
}

/* Language Menu with scroll support */
.dropdown-menu.lang-menu {
    max-height: 320px;
    overflow-y: auto;
}

.dropdown-menu.lang-menu::-webkit-scrollbar {
    width: 6px;
}

.dropdown-menu.lang-menu::-webkit-scrollbar-track {
    background: var(--color-cream);
    border-radius: 3px;
}

.dropdown-menu.lang-menu::-webkit-scrollbar-thumb {
    background: var(--color-sage-light);
    border-radius: 3px;
}

.dropdown-menu.lang-menu::-webkit-scrollbar-thumb:hover {
    background: var(--color-sage);
}

/* Nav More Dropdown Styles */
.nav-more-dropdown {
    display: inline-block;
}

.nav-more-dropdown .more-trigger {
    background: transparent;
    border: none;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    color: var(--color-charcoal);
    transition: var(--transition-smooth);
}

.nav-more-dropdown .more-trigger:hover {
    color: var(--color-peach);
}

.nav-more-dropdown .more-menu {
    left: 0;
    right: auto;
    min-width: 180px;
}

/* Font Generator Styles */
.font-input {
    font-size: 1.5rem;
    min-height: 80px;
}

.font-preview-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.font-preview-card {
    margin-bottom: 1rem;
    padding: 1.25rem 1.5rem;
}

.font-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.font-name {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-charcoal);
}

.font-output {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--color-sage-light);
    border-radius: 0.75rem;
    background: var(--color-cream);
    font-size: 1.6rem;
    font-family: Arial, sans-serif;
    color: var(--color-charcoal);
    cursor: pointer;
    transition: var(--transition-smooth);
    outline: none;
}

.font-output:hover {
    border-color: var(--color-peach);
    background: var(--color-white);
}

.font-output:focus {
    border-color: var(--color-peach);
    box-shadow: 0 0 0 3px rgba(255, 155, 122, 0.2);
}

.copy-btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.copy-btn .copy-icon {
    margin-right: 0.25rem;
}

/* Responsive adjustments for font generator */
@media (max-width: 768px) {
    .font-preview-card {
        padding: 1rem;
    }

    .font-name {
        font-size: 0.95rem;
    }

    .font-output {
        font-size: 1.35rem;
        padding: 0.875rem;
    }

    .font-input {
        font-size: 1.25rem;
    }

    .copy-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* Emoticon Text Styles */
.emoticon-item {
    font-size: 1.25rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    background: var(--color-cream);
    border: 2px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    white-space: nowrap;
}

/* Alt Codes Table */
.alt-codes {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

.alt-codes th,
.alt-codes td {
    padding: 0.75rem;
    text-align: center;
    border: 1px solid var(--color-sage-light);
}

.alt-codes th {
    background-color: var(--color-cream-dark);
    font-family: var(--font-display);
    font-weight: 600;
}

.alt-codes td {
    background-color: white;
}

.alt-codes .cs {
    font-size: 1.5rem;
    cursor: pointer;
    display: inline-block;
    transition: var(--transition-bounce);
}

.alt-codes .cs:hover {
    transform: scale(1.2);
    color: var(--color-peach);
}

.alt-codes .alt-code {
    font-family: monospace;
    color: var(--color-charcoal-light);
    font-size: 0.9rem;
}

/* Responsive Table */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Alt Codes Grid System */
.alt-codes-container {
    display: flex;
    flex-wrap: wrap;
    border: 1px solid var(--color-sage-light);
    border-radius: 1rem;
    overflow: hidden;
    background: white;
}

.alt-column {
    flex: 0 0 25%;
    max-width: 25%;
    border-right: 4px solid var(--color-sage-light);
    /* Bold separator */
    background: white;
}

.alt-column:last-child {
    border-right: none;
}

/* Header inside columns */
.alt-header {
    display: flex;
    background: var(--color-cream-dark);
    font-family: var(--font-display);
    font-weight: 600;
    border-bottom: 2px solid var(--color-sage-light);
}

.ah-sym,
.ah-code {
    padding: 0.75rem;
    text-align: center;
    flex: 1;
}

.ah-sym {
    border-right: 1px solid var(--color-sage-light);
}

/* Rows inside columns */
.alt-row {
    display: flex;
    border-bottom: 1px solid rgba(139, 157, 131, 0.2);
}

.alt-row:last-child {
    border-bottom: none;
}

.alt-row:hover {
    background-color: var(--color-cream);
}

.ac-sym,
.ac-code {
    padding: 0.5rem;
    text-align: center;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ac-sym {
    border-right: 1px solid var(--color-sage-light);
}

/* Symbol styling reuse */
.ac-sym .cs {
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-bounce);
    display: inline-block;
}

.ac-sym .cs:hover {
    transform: scale(1.2);
    color: var(--color-peach);
}

.ac-code {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", monospace;
    color: var(--color-charcoal-light);
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .alt-column {
        flex: 0 0 33.333%;
        max-width: 33.333%;
    }

    /* Hide 4th column border if it wraps? 
       With flex wrap, 4th item goes to next line.
       We need to handle borders for wrapped items. 
    */
    .alt-column:nth-child(3) {
        border-right: none;
        /* End of row 1 on tablet */
    }

    .alt-column:nth-child(4) {
        border-right: 4px solid var(--color-sage-light);
        border-top: 4px solid var(--color-sage-light);
        /* Separator for wrapped row */
    }
}

@media (max-width: 768px) {
    .alt-column {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .alt-column:nth-child(even) {
        border-right: none;
    }

    .alt-column:nth-child(odd) {
        border-right: 4px solid var(--color-sage-light);
    }

    .alt-column:nth-child(3),
    .alt-column:nth-child(4) {
        border-top: 4px solid var(--color-sage-light);
    }
}

/* Text Decorator - Sticky Preview */
.decorator-preview-card {
    position: sticky;
    top: 5rem;
    z-index: 50;
    margin-bottom: 2rem;
    padding: 1.2rem 2rem;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.decorator-preview-text {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-family: Arial, 'Segoe UI Symbol', 'Noto Sans', sans-serif;
    word-break: break-all;
    text-align: center;
    padding: 0.5rem 0;
}

@media (max-width: 768px) {
    .decorator-preview-card {
        top: 4rem;
        padding: 0.8rem 1.2rem;
    }

    .decorator-preview-text {
        font-size: 1rem;
        min-height: 36px;
    }
}

/* Text Decorator - Font Style Dropdown */
.font-style-dropdown {
    position: relative;
    width: 100%;
}

.font-style-dropdown-card {
    position: relative;
    z-index: 10;
}

.font-style-trigger {
    width: 100%;
    background: var(--color-cream);
    border: 2px solid var(--color-sage-light);
    color: var(--color-charcoal);
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    cursor: pointer;
    font-family: Arial, 'Segoe UI Symbol', 'Noto Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    transition: var(--transition-smooth);
}

.font-style-trigger:hover,
.font-style-trigger.active {
    background: var(--color-white);
    border-color: var(--color-peach);
    box-shadow: 0 4px 12px var(--color-shadow);
}

.font-style-trigger.active .dropdown-arrow {
    transform: rotate(180deg);
}

.font-style-menu {
    position: absolute;
    top: calc(100% + 0.4rem);
    left: 0;
    right: 0;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 20px var(--color-shadow-hover);
    padding: 0.4rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition-smooth);
    border: 1px solid rgba(139, 157, 131, 0.15);
    z-index: 1000;
}

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

.font-style-search {
    width: 100%;
    padding: 0.45rem 0.75rem;
    border: 1.5px solid var(--color-sage-light);
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
    margin-bottom: 0.3rem;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.font-style-search:focus {
    border-color: var(--color-peach);
}

.font-style-list {
    max-height: 240px;
    overflow-y: auto;
}

.font-style-list::-webkit-scrollbar {
    width: 5px;
}

.font-style-list::-webkit-scrollbar-track {
    background: var(--color-cream);
    border-radius: 3px;
}

.font-style-list::-webkit-scrollbar-thumb {
    background: var(--color-sage-light);
    border-radius: 3px;
}

.font-style-list::-webkit-scrollbar-thumb:hover {
    background: var(--color-sage);
}

.font-style-item {
    padding: 0.4rem 0.75rem;
    color: var(--color-charcoal);
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.font-style-item-preview {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: Arial, 'Segoe UI Symbol', 'Noto Sans', sans-serif;
}

.font-style-item-name {
    flex-shrink: 0;
    font-size: 0.75rem;
    color: var(--color-sage);
    font-weight: 400;
}

.font-style-item:hover {
    background: var(--color-cream);
    color: var(--color-peach-dark);
}

.font-style-item.active {
    color: var(--color-peach-dark);
    background: var(--color-cream);
    font-weight: 600;
}

.font-style-item.hidden {
    display: none;
}

/* Text Decorator - Decoration Buttons */
.decoration-btn {
    font-size: 1.25rem;
    padding: 0.6rem 1rem;
    border-radius: 0.75rem;
    background: var(--color-cream);
    border: 1.5px solid transparent;
    min-width: fit-content;
}

.decoration-btn:hover {
    border-color: var(--color-peach-light);
}

.decoration-btn.active {
    background: var(--color-peach-light, #fde8d8);
    border-color: var(--color-peach);
    color: var(--color-peach-dark);
}

/* Mars Text Level Buttons */
.mars-level-group {
    display: flex;
    gap: 0.75rem;
}

.mars-level-btn {
    flex: 1;
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-body);
    border: 2px solid rgba(139, 157, 131, 0.2);
    border-radius: 12px;
    background: var(--color-white);
    color: var(--color-charcoal-light);
    cursor: pointer;
    transition: var(--transition-smooth);
    text-align: center;
}

.mars-level-btn:hover {
    border-color: var(--color-peach-light);
    background: rgba(255, 155, 122, 0.05);
    transform: translateY(-1px);
}

.mars-level-btn.active {
    background: linear-gradient(135deg, var(--color-peach), var(--color-peach-light));
    border-color: var(--color-peach);
    color: var(--color-white);
    box-shadow: 0 4px 12px rgba(255, 155, 122, 0.3);
}

/* Mars Text Input/Output sizing */
#mars-text-input {
    font-size: 0.9rem;
}

#converted-text {
    font-size: 1.5rem;
    line-height: 2;
}