/* primary-color: #4a6fa5; */
/* CSS Variables */
        :root {
            --primary-color: #2e5799;
            --secondary-color: #597ebe;
            --accent-color: #4cb5f5;
            --background-color: #f8f9fa;
            --card-color: #ffffff;
            --text-color: #333333;
            --border-color: #e0e0e0;
            --sidebar-width: 250px;
            --header-height: 70px;
            --transition-speed: 0.3s;
        }

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

        html, body {
            width: 100%;
            overflow-x: hidden;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background-color: var(--background-color);
            color: var(--text-color);
            line-height: 1.6;
            min-width: 320px;
        }

        /* Header Styles */
        header {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: var(--header-height);
            width: 100%;
            background-color: var(--primary-color);
            color: white;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 20px;
            z-index: 1000;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        }

        .header-left {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 1.5rem;
            font-weight: bold;
        }
        .logo-image {
             width:45px;
             height:45px; 
             margin-top:10px;
        }

        .hamburger {
            display: none;
            flex-direction: column;
            justify-content: space-around;
            width: 25px;
            height: 22px;
            background: transparent;
            border: none;
            cursor: pointer;
            padding: 0;
            position: relative;
        }

        .hamburger span {
            width: 100%;
            height: 3px;
            background-color: white;
            border-radius: 5px;
            transition: all var(--transition-speed);
            transform-origin: center;
        }

        /* Hamburger to Close (X) transformation */
        .hamburger.active span:nth-child(1) {
            transform: translateY(0.47rem) rotate(45deg);
        }

        .hamburger.active span:nth-child(2) {
            opacity: 0;
        }

        .hamburger.active span:nth-child(3) {
            transform: translateY(-0.47rem) rotate(-45deg);
        }

        .header-right {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .search-toggle {
            background: rgba(255, 255, 255, 0.1);
            border: none;
            color: white;
            cursor: pointer;
            font-size: 1.2rem;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            transition: background-color var(--transition-speed);
        }

        .search-toggle:hover {
            background-color: rgba(255, 255, 255, 0.2);
        }

        .search-container {
            position: absolute;
            top: 100%;
            right: 20px;
            background-color: white;
            border-radius: 20px;
            padding: 5px;
            box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
            display: none;
            align-items: center;
            z-index: 1001;
        }

        .search-container.active {
            display: flex;
            animation: slideDown 0.3s ease;
        }

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

        #search-input {
            padding: 8px 15px;
            border: none;
            border-radius: 20px;
            width: 250px;
            outline: none;
        }

        #home-button {
            background: rgba(255, 255, 255, 0.1);
            border: none;
            color: white;
            cursor: pointer;
            font-size: 1.2rem;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            transition: background-color var(--transition-speed);
        }

        #home-button:hover {
            background-color: rgba(255, 255, 255, 0.2);
        }

        /* Layout */
        .container {
            display: flex;
            margin-top: var(--header-height);
            min-height: calc(100vh - var(--header-height));
            width: 100%;
        }

        /* Sidebar Styles */
        aside {
            width: var(--sidebar-width);
            background-color: var(--card-color);
            border-right: 1px solid var(--border-color);
            height: calc(100vh - var(--header-height));
            position: fixed;
            overflow-y: auto;
            transition: transform var(--transition-speed);
            z-index: 900;
        }

        .sidebar-content {
            padding: 20px 0;
        }

        .category {
            margin-bottom: 1px;
            border-bottom: 1px solid var(--border-color);
        }

        .category-header {
            padding: 10px 20px;
            font-weight: bold;
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
            transition: background-color var(--transition-speed);
        }

        .category-header:hover {
            background-color: rgba(0, 0, 0, 0.05);
        }

        .subcategories {
            padding-left: 20px;
            max-height: 0;
            overflow: hidden;
            transition: max-height var(--transition-speed);
        }

        .subcategories.show {
            max-height: 500px;
        }

        .subcategory {
            padding: 8px 15px;
            cursor: pointer;
            transition: background-color var(--transition-speed);
        }

        .subcategory:hover {
            background-color: rgba(0, 0, 0, 0.05);
        }

        .sidebar-footer {
            position: fixed;
            bottom: 0;
            background-color: var(--card-color);
            padding: 5px 10px;
            border-top: 1px solid var(--border-color);
            font-size: 0.9rem;
            color: #777;
            width: 100%;
            overflow: hidden;
        }

        /* Main Content Styles */
        main {
            flex: 1;
            margin-left: var(--sidebar-width);
            padding: 20px;
            transition: margin-left var(--transition-speed);
        /*    width: calc(100% - var(--sidebar-width));   */
            max-width: 100%;
            overflow-x: hidden;
        }

        .category-title {
            margin-bottom: 5px;
            padding-bottom: 5px;
            font-size: 1.6rem;
            text-align: center;
        }
        
        .category-subtitle {
            margin-bottom: 20px;
            padding-bottom: 10px;
            border-bottom: 2px solid var(--accent-color);
            font-size: 1rem;
            text-align: center;
        }
        
        .subcategory-title {
            font-size: 1.5rem;
        }
        
        .symbols-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
            gap: 10px;
            margin-bottom: 50px;
            margin-top: 10px;
            width: 100%;
        }

        .symbol-card {
            background-color: var(--card-color);
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 0.1rem;
            cursor: pointer;
            transition: transform var(--transition-speed), box-shadow var(--transition-speed);
            position: relative;
            border: 1px solid rgba(3, 3, 3, 0.2);
            border-radius: 0px;
        }

        .symbol-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        }

        .symbol {
            font-size: 2.5rem;
            margin-bottom: 5px;
        }

        /* Tooltip styles */
        .symbol-card .tooltip {
            visibility: hidden;
            background-color: #F3FDE8;
            color: #435334;
            text-align: center;
            border-radius: 4px;
            border: 1px solid rgba(3, 3, 3,0.2);
            padding: 4px 6px;
            position: absolute;
            z-index: 1;
            bottom: 125%;
            left: 50%;
            transform: translateX(-50%);
            opacity: 0;
            transition: opacity var(--transition-speed);
            font-size: 0.8rem;
            white-space: wrap;
            overflow-wrap: break-word;
            pointer-events: none;
        }

        .symbol-card .tooltip::after {
            content: "";
            position: absolute;
            top: 100%;
            left: 50%;
            margin-left: -5px;
            border-width: 5px;
            border-style: solid;
            border-color: #333 transparent transparent transparent;
        }

        .symbol-card:hover .tooltip {
            visibility: visible;
            opacity: 1;
        }

        /* Modal Styles */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
            z-index: 2000;
            justify-content: center;
            align-items: center;
        }

        .modal-content {
            background-color: var(--card-color);
            padding: 30px;
            border-radius: 10px;
            text-align: center;
            max-width: 400px;
            width: 90%;
            box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
        }

        .modal-symbol {
            font-size: 4rem;
            margin-bottom: 15px;
        }

        .modal-name {
            font-size: 1.2rem;
            margin-bottom: 10px;
            font-weight: bold;
        }

        .modal-unicode {
            font-family: monospace;
            background-color: #f0f0f0;
            padding: 5px 10px;
            border-radius: 4px;
            margin-bottom: 20px;
            display: inline-block;
        }

        .modal-message {
            color: var(--secondary-color);
            margin-bottom: 20px;
            font-weight: 500;
        }

        .modal-close {
            background-color: var(--primary-color);
            color: white;
            border: none;
            padding: 8px 20px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 1rem;
            transition: background-color var(--transition-speed);
        }

        .modal-close:hover {
            background-color: var(--secondary-color);
        }

        /* Responsive Styles */
        @media (max-width: 1024px) {
            :root {
                --sidebar-width: 220px;
            }
            
            .logo span {
                font-size: 1.3rem;
            }
            
            .search-toggle, #home-button {
                width: 36px;
                height: 36px;
                font-size: 1.1rem;
            }
        }

        @media (max-width: 768px) {
            .hamburger {
                display: flex;
            }

            .logo span {
                font-size: 1.2rem;
            }
            
            header {
                padding: 0 15px;
            }
            
            .header-right {
                gap: 10px;
            }

            aside {
                transform: translateX(-100%);
                width: 280px;
            }

            aside.show {
                transform: translateX(0);
            }

            main {
                margin-left: 0;
                padding: 15px;
                width: 100%;
            }

            .search-container {
                right: 10px;
                width: calc(100% - 30px);
                max-width: 300px;
            }

            #search-input {
                width: 100%;
            }
            
            .category-title {
                font-size: 1.6rem;
            }
            
            .subcategory-title {
            font-size: 1.3rem;
        }
            
            .symbol {
                font-size: 2.4rem;
            }
        }

        @media (max-width: 480px) {
            .logo span {
                display:flex;
            }
            
            .logo-image {
             width:35px;
             height:35px;
             margin-bottom: 10px;
             }
            .header-left {
                gap: 10px;
            }
            
            .logo {
                font-size: 1.2rem;
            }
            
            .search-toggle, #home-button {
                width: 32px;
                height: 32px;
                font-size: 1rem;
            }
            
            .category-title {
                font-size: 1.4rem;
            }
            
            .subcategory-title {
            font-size: 1.2rem;
        }

            .symbols-grid {
                grid-template-columns: repeat(auto-fill, minmax(65px, 1fr));
            }

            .symbol {
                font-size: 2.2rem;
            }
            
            .modal-content {
                padding: 20px;
            }
            
            .modal-symbol {
                font-size: 3.5rem;
            }
            
            .search-container {
                width: calc(100% - 20px);
                right: 10px;
            }
        }
        
        @media (max-width: 360px) {
            header {
                padding: 0 10px;
            }
            
            .logo {
                font-size: 1.1rem;
            }
            
            .logo-image {
             width:30px;
             height:30px; 
            }
            
            .search-toggle, #home-button {
                width: 30px;
                height: 30px;
            }
            
            .symbols-grid {
                grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
                gap: 0.4rem;
            }
            
            .symbol {
                font-size: 2rem;
            }
            
            .subcategory-title {
            font-size: 1rem;
            }
            
            main {
                padding: 10px;
            }
        }

        .search-status {
            padding: 10px;
            text-align: center;
            color: #666;
            font-style: italic;
            display: none;
        }