        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        :root {
            --background: #0f0f23;
            --surface: #1a1a3a;
            --text-primary: #e0e0e0;
            --text-secondary: #b0b0b0;
            --border: #2d2d66;
        }

        .container {
            max-width: 1600px;
            margin: 0 auto;
        }


        .subtitle {
            color: var(--text-secondary);
            font-size: 1rem;
        }

        .table-btn.disabled {
            opacity: 0.5;
            cursor: not-allowed;
            background: rgba(0, 0, 0, 0.2);
        }

        .table-btn.disabled:hover {
            border-color: var(--border);
            color: var(--text-secondary);
        }

        .table-count {
            font-size: 0.75rem;
            margin-left: 8px;
            opacity: 0.7;
        }

        .filters-section {
            background: var(--surface);
            border-radius: 12px;
            padding: 20px;
            border: 1px solid var(--border);
            margin-bottom: 30px;
        }

        .filters-row {
            display: grid;
            grid-template-columns: 1fr auto;
            gap: 16px;
            align-items: end;
        }

        .filter-group {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .filter-label {
            color: var(--text-secondary);
            font-size: 0.85rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .filter-select {
            background: var(--background);
            border: 1px solid var(--border);
            border-radius: 8px;
            padding: 10px 12px;
            color: var(--text-primary);
            font-size: 0.95rem;
            font-family: inherit;
            cursor: text;
            transition: all 0.3s ease;
        }

        .filter-select:focus {
            outline: none;
            border-color: #6366f1;
            box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
        }

        .filter-select::placeholder {
            color: var(--text-secondary);
            opacity: 0.6;
        }

        .filter-btn {
            padding: 10px 20px;
            border: none;
            border-radius: 8px;
            font-size: 0.9rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            font-family: inherit;
            background: var(--border);
            color: var(--text-secondary);
        }

        .filter-btn:hover {
            background: #4b5563;
            color: var(--text-primary);
        }

        .view-toggle-container {
            display: flex;
            align-items: center;
            gap: 12px;
            justify-content: flex-start;
        }

        .view-toggle-label {
            font-size: 0.9rem;
            color: var(--text-secondary);
            font-weight: 500;
        }

        .view-toggle {
            display: flex;
            background: var(--border);
            border-radius: 8px;
            padding: 4px;
            gap: 4px;
        }

        .view-toggle-btn {
            padding: 6px 16px;
            border: none;
            border-radius: 6px;
            font-size: 0.9rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
            font-family: inherit;
            background: transparent;
            color: var(--text-secondary);
        }

        .view-toggle-btn:hover {
            color: var(--text-primary);
        }

        .view-toggle-btn.active {
            background: var(--primary);
            color: white;
        }

        .filter-results {
            margin-top: 16px;
            padding-top: 16px;
            border-top: 1px solid var(--border);
            color: var(--text-secondary);
            font-size: 0.9rem;
        }

        .pokemon-card {
            border-radius: 12px;
            padding: 20px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }

        .pokemon-card:hover {
            transform: translateY(-4px);
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
        }

        .pokemon-card.filtered-out {
            display: none;
        }

        .pokemon-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 24px;
            margin-bottom: 40px;
        }

        .pokemon-grid.detail-view {
            grid-template-columns: 1fr;
        }

        .pokemon-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
            margin-bottom: 40px;
        }

        .pokemon-list-item {
            background: var(--surface);
            border-radius: 12px;
            padding: 20px;
            border: 1px solid var(--border);
            border-left: none;
            transition: all 0.3s ease;
            display: grid;
            grid-template-columns: auto 1fr auto;
            gap: 20px;
            align-items: center;
            cursor: pointer;
            position: relative;
            overflow: hidden;
        }

        .pokemon-list-item::before {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            width: 4px;
            background: var(--border-left-gradient, var(--border-left-color, var(--primary)));
            z-index: 1;
        }

        .pokemon-list-item:hover {
            border-color: var(--primary);
            box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
            transform: translateX(4px);
        }

        .pokemon-list-type-icons {
            display: flex;
            flex-direction: column;
            gap: 4px;
            flex-shrink: 0;
        }

        .pokemon-list-type-icon {
            width: 48px;
            height: 20px;
            object-fit: contain;
        }

        .pokemon-list-main {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .pokemon-list-name {
            font-size: 1.1rem;
            font-weight: 600;
            color: var(--text-primary);
        }

        .pokemon-list-dex-number {
            font-size: 0.85rem;
            color: var(--text-secondary);
            font-weight: 500;
        }

        .pokemon-list-dex-entry {
            font-size: 0.85rem;
            color: var(--text-secondary);
            line-height: 1.5;
            margin-top: 4px;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .pokemon-list-item {
            position: relative;
        }

        .pokemon-actions {
            display: flex;
            gap: 6px;
            align-items: center;
            margin-left: auto;
        }

        .action-btn {
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 6px;
            padding: 6px 10px;
            cursor: pointer;
            font-size: 0.85rem;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            min-width: 32px;
            height: 32px;
        }

        .action-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        }

        .action-btn.edit-btn:hover {
            background: rgba(99, 102, 241, 0.2);
            border-color: #6366f1;
        }

        .action-btn.duplicate-btn:hover {
            background: rgba(16, 185, 129, 0.2);
            border-color: #10b981;
        }

        .action-btn.delete-btn:hover {
            background: rgba(239, 68, 68, 0.2);
            border-color: #ef4444;
        }

        .action-btn.export-btn {
            background: var(--surface);
            border-color: var(--border);
            color: var(--text-primary);
        }

        .action-btn.export-btn:hover {
            background: rgba(99, 102, 241, 0.1);
            border-color: var(--border);
        }
        
        .pokemon-header {
            display: flex;
            align-items: center;
            gap: 16px;
            margin-bottom: 16px;
            padding-bottom: 16px;
            border-bottom: 2px solid rgba(255, 255, 255, 0.25);
        }
        
        .pokemon-sprite-header {
            width: 96px;
            height: 96px;
            background-repeat: no-repeat;
            flex-shrink: 0;
            image-rendering: pixelated;
            image-rendering: -moz-crisp-edges;
            image-rendering: crisp-edges;
            display: block;
            min-width: 96px;
            min-height: 96px;
            overflow: hidden;
            margin: 0;
            padding: 0;
            border: none;
        }
        
        .pokemon-sprites-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 16px;
            margin-top: 12px;
        }
        
        .pokemon-sprite-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
        }
        
        .pokemon-sprite-label {
            font-size: 0.75rem;
            color: rgba(255, 255, 255, 0.6);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        
        .pokemon-sprite-grid-item {
            width: 192px;
            height: 192px;
            background-repeat: no-repeat;
            image-rendering: pixelated;
            image-rendering: -moz-crisp-edges;
            image-rendering: crisp-edges;
            display: block;
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 4px;
            background-color: rgba(0, 0, 0, 0.2);
        }
        
        .pokemon-egg-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
        }
        
        .pokemon-egg-sprite-display {
            width: 64px;
            height: 64px;
            background-repeat: no-repeat;
            image-rendering: pixelated;
            image-rendering: -moz-crisp-edges;
            image-rendering: crisp-edges;
            display: block;
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 4px;
            background-color: rgba(0, 0, 0, 0.2);
        }
        
        .pokemon-type-icons {
            display: flex;
            flex-direction: column;
            gap: 4px;
            flex-shrink: 0;
        }
        
        .pokemon-type-icon {
            width: 64px;
            height: 28px;
            object-fit: contain;
            display: block;
            flex-shrink: 0;
        }
        
        .pokemon-name-id {
            flex: 1;
        }
        
        .pokemon-name {
            font-size: 1.85rem;
            font-weight: 700;
            color: #fff;
            margin-bottom: 6px;
            line-height: 1.2;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
        }
        
        .pokemon-id {
            font-size: 0.95rem;
            color: rgba(255, 255, 255, 0.75);
            font-weight: 500;
        }
        
        .pokemon-content {
            column-count: 2;
            column-gap: 24px;
            column-fill: balance;
        }
        
        @media (max-width: 768px) {
            .pokemon-content {
                column-count: 1;
            }
        }
        
        .pokemon-section-fullwidth {
            column-span: all;
            display: block;
        }
        
        .pokemon-section {
            background: rgba(0, 0, 0, 0.3);
            padding: 12px;
            border-radius: 8px;
            margin-bottom: 16px;
            break-inside: avoid;
            page-break-inside: avoid;
            display: block;
            width: 100%;
            box-sizing: border-box;
        }
        
        .pokemon-section-title {
            font-size: 0.85rem;
            font-weight: 600;
            color: rgba(255, 255, 255, 0.7);
            margin-bottom: 4px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        
        .pokemon-section-subtitle {
            font-size: 0.85rem;
            color: rgba(255, 255, 255, 0.7);
            margin-bottom: 8px;
            font-style: italic;
        }
        
        .pokemon-description {
            font-size: 0.95rem;
            color: rgba(255, 255, 255, 0.9);
            line-height: 1.6;
            margin-bottom: 20px;
        }
        
        .pokemon-info-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 8px;
        }
        
        .pokemon-info-item {
            display: flex;
            gap: 8px;
            font-size: 0.85rem;
            color: rgba(255, 255, 255, 0.9);
        }
        
        .info-label {
            color: rgba(255, 255, 255, 0.7);
        }
        
        .evolution-tree-container {
            min-height: 100px;
        }
        
        .evolution-tree-loading {
            text-align: center;
            padding: 20px;
            color: rgba(255, 255, 255, 0.7);
            font-size: 0.9rem;
        }
        
        .evolution-tree-table-container {
            width: 100%;
            overflow-x: auto;
            margin: 16px 0;
        }
        
        .evolution-tree-table {
            width: 100%;
            border-collapse: collapse;
            background: rgba(0, 0, 0, 0.2);
            border-radius: 8px;
            overflow: hidden;
        }
        
        .evolution-tree-table thead {
            background: rgba(0, 0, 0, 0.4);
        }
        
        .evolution-tree-table th {
            padding: 12px 16px;
            text-align: left;
            font-weight: 600;
            font-size: 0.9rem;
            color: rgba(255, 255, 255, 0.9);
            border-bottom: 2px solid rgba(255, 255, 255, 0.2);
        }
        
        .evolution-tree-table td {
            padding: 12px 16px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            vertical-align: middle;
        }
        
        .evolution-tree-table tbody tr:hover {
            background: rgba(255, 255, 255, 0.05);
        }
        
        .evolution-tree-table tbody tr:last-child td {
            border-bottom: none;
        }
        
        .evolution-pokemon-cell {
            min-width: 180px;
        }
        
        .evolution-method-cell,
        .evolution-parameter-cell {
            min-width: 120px;
            color: rgba(255, 255, 255, 0.8);
            font-size: 0.9rem;
        }
        
        .evolution-table-pokemon {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }
        
        .evolution-table-pokemon-link {
            text-decoration: none;
            color: inherit;
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: 8px;
        }
        
        .evolution-table-pokemon-link:hover {
            opacity: 0.8;
        }
        
        .pokemon-icon-sprite {
            width: 64px;
            height: 64px;
            background-repeat: no-repeat;
            flex-shrink: 0;
            image-rendering: pixelated;
            image-rendering: -moz-crisp-edges;
            image-rendering: crisp-edges;
            display: block;
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 4px;
            background-color: rgba(0, 0, 0, 0.2);
        }
        
        .evolution-table-pokemon-name {
            font-weight: 600;
            font-size: 0.95rem;
            color: rgba(255, 255, 255, 0.95);
        }
        
        .evolution-table-pokemon-dex {
            font-size: 0.8rem;
            color: rgba(255, 255, 255, 0.6);
        }
        
        .evolution-table-pokemon-types {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 2px;
        }
        
        .evolution-table-types-column {
            width: 50px;
            text-align: center;
        }
        
        .evolution-table-type-icon {
            width: 48px;
            height: 21px;
            object-fit: contain;
        }
        
        .evolution-pokemon-types {
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: 4px;
            margin-top: 4px;
        }
        
        .evolution-pokemon-type-icon {
            width: 36px;
            height: 36px;
            object-fit: contain;
        }
        
        .evolution-none {
            color: rgba(255, 255, 255, 0.4);
            font-style: italic;
        }
        
        .evolution-tree-empty {
            text-align: center;
            padding: 20px;
            color: rgba(255, 255, 255, 0.5);
            font-size: 0.9rem;
            font-style: italic;
        }
        
        .info-value {
            color: rgba(255, 255, 255, 0.9);
            font-weight: 500;
        }
        
        .pokemon-moves-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 6px;
        }
        
        .pokemon-move-chip {
            position: relative;
            font-size: 0.85rem;
            color: rgba(255, 255, 255, 0.9);
            padding: 4px 8px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 4px;
            text-align: center;
            cursor: help;
            width: 100%;
            min-width: 0;
            box-sizing: border-box;
        }

        .pokemon-item-chip-container {
            display: flex;
            align-items: center;
            gap: 4px;
            width: 100%;
        }

        .pokemon-item-chip-icon-wrapper {
            width: 32px;
            height: 32px;
            padding: 4px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            cursor: help;
            box-sizing: border-box;
        }

        .pokemon-item-chip {
            position: relative;
            font-size: 0.85rem;
            color: rgba(255, 255, 255, 0.9);
            padding: 4px 8px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 4px;
            cursor: help;
            flex: 1;
            min-width: 0;
            box-sizing: border-box;
            text-align: center;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .pokemon-item-chip-icon {
            width: 24px;
            height: 24px;
            object-fit: contain;
            display: block;
        }

        .pokemon-stats-table {
            border: 1px solid rgba(0, 0, 0, 0.3);
            border-radius: 6px;
            overflow: hidden;
            background: rgba(0, 0, 0, 0.2);
            font-size: 0.75rem;
        }
        
        .pokemon-stat-row {
            display: grid;
            grid-template-columns: 1fr 2fr;
            border-bottom: 1px solid rgba(0, 0, 0, 0.3);
            background: rgba(255, 255, 255, 0.05);
        }
        
        .pokemon-stat-row:last-of-type {
            border-bottom: none;
        }
        
        .stats-label-column {
            padding: 4px 8px;
            font-size: 0.75rem;
            color: rgba(255, 255, 255, 0.9);
            display: flex;
            align-items: center;
        }
        
        .stats-bar-column {
            padding: 4px 8px;
        }
        
        .stat-bar-container {
            width: 100%;
            height: 16px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 2px;
            overflow: hidden;
            position: relative;
        }
        
        .stat-bar {
            height: 100%;
            transition: width 0.3s ease;
            border-radius: 2px;
        }
        
        .pokemon-stat-total-row {
            background: rgba(0, 0, 0, 0.3);
            font-weight: 600;
            border-top: 2px solid rgba(255, 255, 255, 0.2);
        }
        
        .pokemon-level-moves-list {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }
        
        .pokemon-level-move-row {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }
        
        .pokemon-level-label {
            font-size: 0.75rem;
            color: rgba(255, 255, 255, 0.6);
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            flex-shrink: 0;
            min-width: 70px;
        }
        
        .pokemon-moves-grid-inline {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 6px;
            flex: 1;
            min-width: 0;
        }

        .empty-state {
            text-align: center;
            padding: 60px 20px;
            color: var(--text-secondary);
        }

        .empty-state-icon {
            font-size: 4rem;
            margin-bottom: 20px;
            opacity: 0.5;
        }

        @media (max-width: 1000px) {
            .pokemon-grid {
                grid-template-columns: 1fr;
            }
            
            .pokemon-content {
                grid-template-columns: 1fr;
            }
            
            .pokemon-moves-grid {
                grid-template-columns: repeat(3, 1fr);
            }
            
            .pokemon-moves-grid-inline {
                grid-template-columns: repeat(3, 1fr);
            }
        }
        
        @media (max-width: 768px) {
            .pokemon-moves-grid {
                grid-template-columns: repeat(2, 1fr);
            }
            
            .pokemon-moves-grid-inline {
                grid-template-columns: repeat(2, 1fr);
            }
            
            .pokemon-info-grid {
                grid-template-columns: 1fr;
            }
        }

        /* Modal Styles */
        .modal-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.7);
            z-index: 1000;
            backdrop-filter: blur(4px);
        }

        .modal-overlay.active {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }

        .modal {
            background: var(--surface);
            border-radius: 16px;
            padding: 32px;
            max-width: 1200px;
            width: 100%;
            max-height: 90vh;
            overflow-y: auto;
            border: 2px solid var(--border);
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
            position: relative;
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 24px;
            padding-bottom: 16px;
            border-bottom: 2px solid var(--border);
        }

        .modal-title {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--text-primary);
        }

        .modal-close {
            background: none;
            border: none;
            color: var(--text-secondary);
            font-size: 1.5rem;
            cursor: pointer;
            padding: 0;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 6px;
            transition: all 0.2s ease;
        }

        .modal-close:hover {
            background: rgba(239, 68, 68, 0.2);
            color: #ef4444;
        }

        .modal-form {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        .form-row {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 16px;
        }

        .form-row-3 {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 16px;
        }

        .form-row-4 {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 16px;
        }

        .form-row-full {
            grid-column: 1 / -1;
        }

        .form-field {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .form-label {
            font-size: 0.9rem;
            font-weight: 600;
            color: var(--text-secondary);
        }

        .form-input,
        .form-select,
        .form-textarea {
            background: var(--background);
            border: 2px solid var(--border);
            border-radius: 8px;
            padding: 10px 12px;
            color: var(--text-primary);
            font-size: 0.95rem;
            font-family: inherit;
            transition: all 0.3s ease;
        }

        .form-input:focus,
        .form-select:focus,
        .form-textarea:focus {
            outline: none;
            border-color: #6366f1;
            box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
        }

        .form-textarea {
            resize: vertical;
            min-height: 80px;
        }
        
        /* Ruby syntax highlighting for function textareas */
        .form-textarea.function-code-textarea {
            font-family: 'Consolas', 'Monaco', 'Courier New', monospace !important;
            font-size: 0.9rem !important;
            line-height: 1.5 !important;
            background: #1e1e2e !important;
            color: #cdd6f4 !important;
            border: 2px solid #2d2d66 !important;
        }
        
        .form-textarea.function-code-textarea::placeholder {
            color: #6c7086 !important;
        }
        
        .form-textarea.function-code-textarea:focus {
            border-color: #6366f1 !important;
            box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1) !important;
            background: #1e1e2e !important;
            color: #cdd6f4 !important;
        }

        .form-select {
            appearance: none;
            -webkit-appearance: none;
            -moz-appearance: none;
            background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><path fill="%23666" d="M6 9L1 4h10z"/></svg>');
            background-repeat: no-repeat;
            background-position: right 12px center;
            padding-right: 40px;
            padding-left: 12px;
            background-size: 12px;
        }
        
        .form-select::-ms-expand {
            display: none;
        }

        /* Autocomplete Tag Input Container */
        .autocomplete-tag-container {
            position: relative;
            width: 100%;
        }

        .autocomplete-tags-wrapper {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            min-height: 44px;
            padding: 8px;
            background: var(--background);
            border: 2px solid var(--border);
            border-radius: 8px;
            align-items: flex-start;
            cursor: text;
        }

        .autocomplete-tags-wrapper:focus-within {
            border-color: #6366f1;
            box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
        }

        .autocomplete-input {
            flex: 1;
            min-width: 150px;
            border: none;
            background: transparent;
            color: var(--text-primary);
            font-size: 0.95rem;
            padding: 4px 0;
            outline: none;
        }

        .autocomplete-input::placeholder {
            color: var(--text-secondary);
        }

        .autocomplete-dropdown {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: var(--surface);
            border: 2px solid var(--border);
            border-top: none;
            border-radius: 0 0 8px 8px;
            max-height: 200px;
            overflow-y: auto;
            z-index: 100;
            display: none;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        }

        .autocomplete-dropdown.show {
            display: block;
        }

        .autocomplete-item {
            padding: 10px 12px;
            cursor: pointer;
            color: var(--text-primary);
            border-bottom: 1px solid var(--border);
            transition: background 0.2s ease;
        }

        .autocomplete-item:last-child {
            border-bottom: none;
        }

        .autocomplete-item:hover,
        .autocomplete-item.highlighted {
            background: rgba(99, 102, 241, 0.1);
        }

        .autocomplete-item.disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        /* Tags */
        .flag-tag,
        .ability-tag,
        .move-tag,
        .egg-group-tag {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            background: rgba(99, 102, 241, 0.2);
            color: var(--text-primary);
            padding: 6px 10px;
            border-radius: 6px;
            font-size: 0.85rem;
            border: 1px solid rgba(99, 102, 241, 0.3);
        }

        .move-tag-level {
            font-weight: 600;
            color: var(--text-secondary);
        }

        .flag-tag-remove,
        .ability-tag-remove,
        .move-tag-remove,
        .egg-group-tag-remove {
            background: none;
            border: none;
            color: var(--text-secondary);
            cursor: pointer;
            padding: 0;
            width: 16px;
            height: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 3px;
            transition: all 0.2s ease;
            font-size: 14px;
            line-height: 1;
        }

        .flag-tag-remove:hover,
        .ability-tag-remove:hover,
        .move-tag-remove:hover,
        .egg-group-tag-remove:hover {
            background: rgba(239, 68, 68, 0.2);
            color: #ef4444;
        }

        /* Copy Button */
        .copy-btn {
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 6px;
            padding: 6px 10px;
            cursor: pointer;
            font-size: 1rem;
            transition: all 0.2s ease;
            color: var(--text-secondary);
            display: flex;
            align-items: center;
            justify-content: center;
            min-width: 32px;
            height: 32px;
        }

        .copy-btn:hover {
            background: rgba(99, 102, 241, 0.2);
            border-color: #6366f1;
            color: #6366f1;
            transform: translateY(-1px);
        }

        /* Pagination */
        .pagination {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 8px;
            margin: 32px 0;
            flex-wrap: wrap;
        }

        .pagination-info {
            color: var(--text-secondary);
            font-size: 0.9rem;
            margin: 0 16px;
        }

        .pagination-btn {
            padding: 8px 16px;
            background: var(--surface);
            border: 2px solid var(--border);
            border-radius: 8px;
            color: var(--text-primary);
            cursor: pointer;
            font-size: 0.9rem;
            font-weight: 600;
            transition: all 0.2s ease;
            text-decoration: none;
            display: inline-block;
        }

        .pagination-btn:hover:not(.disabled) {
            background: rgba(99, 102, 241, 0.1);
            border-color: #6366f1;
            color: #6366f1;
        }

        .pagination-btn.active {
            background: #6366f1;
            border-color: #6366f1;
            color: white;
        }

        .pagination-btn.disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .modal-actions {
            display: flex;
            gap: 12px;
            justify-content: flex-end;
            margin-top: 24px;
            padding-top: 24px;
            border-top: 2px solid var(--border);
        }

        .modal-btn {
            padding: 12px 24px;
            border-radius: 8px;
            font-size: 0.95rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            border: 2px solid transparent;
        }

        .modal-btn-primary {
            background: #6366f1;
            color: white;
            border-color: #6366f1;
        }

        .modal-btn-primary:hover {
            background: #818cf8;
            border-color: #818cf8;
        }

        .modal-btn-secondary {
            background: var(--surface);
            color: var(--text-secondary);
            border-color: var(--border);
        }

        .modal-btn-secondary:hover {
            background: var(--border);
            color: var(--text-primary);
        }

        /* Modal Tabs */
        .modal-tabs {
            display: flex;
            gap: 8px;
            margin-bottom: 24px;
            border-bottom: 2px solid var(--border);
        }

        .modal-tab-button {
            padding: 12px 24px;
            background: none;
            border: none;
            border-bottom: 3px solid transparent;
            color: var(--text-secondary);
            font-size: 0.95rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
            bottom: -2px;
        }

        .modal-tab-button:hover {
            color: var(--text-primary);
            background: rgba(99, 102, 241, 0.05);
        }

        .modal-tab-button.active {
            color: #6366f1;
            border-bottom-color: #6366f1;
        }

        .modal-tab-content {
            display: none;
        }

        .modal-tab-content.active {
            display: block;
        }

        /* Toast Notification */
        .toast-container {
            position: fixed;
            top: 20px;
            right: 20px;
            z-index: 2000;
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .toast {
            background: var(--surface);
            border: 2px solid var(--border);
            border-radius: 8px;
            padding: 16px 20px;
            min-width: 300px;
            max-width: 400px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
            display: flex;
            align-items: center;
            gap: 12px;
            animation: slideInRight 0.3s ease-out;
            position: relative;
        }

        .toast.success {
            border-color: #10b981;
            background: rgba(16, 185, 129, 0.1);
        }

        .toast.error {
            border-color: #ef4444;
            background: rgba(239, 68, 68, 0.1);
        }

        .toast.info {
            border-color: #6366f1;
            background: rgba(99, 102, 241, 0.1);
        }

        .toast-icon {
            font-size: 1.2rem;
            flex-shrink: 0;
        }

        .toast.success .toast-icon {
            color: #10b981;
        }

        .toast.error .toast-icon {
            color: #ef4444;
        }

        .toast.info .toast-icon {
            color: #6366f1;
        }

        .toast-message {
            flex: 1;
            color: var(--text-primary);
            font-size: 0.95rem;
        }

        .toast-close {
            background: none;
            border: none;
            color: var(--text-secondary);
            cursor: pointer;
            padding: 4px;
            font-size: 1.2rem;
            line-height: 1;
            opacity: 0.6;
            transition: opacity 0.2s ease;
        }

        .toast-close:hover {
            opacity: 1;
        }

        @keyframes slideInRight {
            from {
                transform: translateX(100%);
                opacity: 0;
            }
            to {
                transform: translateX(0);
                opacity: 1;
            }
        }

        @keyframes slideOutRight {
            from {
                transform: translateX(0);
                opacity: 1;
            }
            to {
                transform: translateX(100%);
                opacity: 0;
            }
        }

        .toast.hiding {
            animation: slideOutRight 0.3s ease-out forwards;
        }

        /* Modal Stats Table */
        .modal-stats-table {
            border: 1px solid var(--border);
            border-radius: 8px;
            overflow: hidden;
            background: var(--background);
            font-size: 0.85rem;
        }

        .modal-stat-row {
            display: grid;
            grid-template-columns: 80px 80px 1fr;
            gap: 12px;
            align-items: center;
            padding: 8px 12px;
            border-bottom: 1px solid var(--border);
        }

        .modal-stat-row:last-of-type {
            border-bottom: none;
        }

        .modal-stat-label {
            font-weight: 600;
            color: var(--text-primary);
            font-size: 0.9rem;
        }

        .modal-stat-input-container {
            display: flex;
            align-items: center;
        }

        .modal-stat-input {
            width: 100%;
            background: var(--surface);
            border: 2px solid var(--border);
            border-radius: 6px;
            padding: 6px 8px;
            color: var(--text-primary);
            font-size: 0.9rem;
            text-align: center;
        }

        .modal-stat-input:focus {
            outline: none;
            border-color: #6366f1;
        }

        .modal-stat-bar-column {
            flex: 1;
        }

        .modal-stat-bar-container {
            width: 100%;
            height: 20px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 4px;
            overflow: hidden;
            position: relative;
        }

        .modal-stat-bar {
            height: 100%;
            transition: width 0.3s ease;
            border-radius: 4px;
        }

        .species-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
            margin-bottom: 40px;
        }

        .species-list-item {
            background: var(--surface);
            border-radius: 12px;
            padding: 20px;
            border: 1px solid var(--border);
            border-left: 4px solid var(--primary);
            transition: all 0.3s ease;
            display: grid;
            grid-template-columns: 1fr auto;
            gap: 20px;
            align-items: center;
            cursor: pointer;
            position: relative;
            margin: 0;
            margin-bottom: 12px;
        }

        .species-list-item:last-child {
            margin-bottom: 0;
        }

        .species-list-item.form-card-dual-type {
            border-left: none;
        }

        .species-list-item.form-card-dual-type::before {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            width: 4px;
            border-radius: 12px 0 0 12px;
            z-index: 1;
        }

        .species-list-item.form-card-dual-type[data-has-dual-type="true"]::before {
            background: var(--border-gradient);
        }

        .species-list-item.form-card-dual-type[data-has-dual-type="false"]::before {
            background: var(--border-color);
        }

        .species-list-item:hover {
            transform: translateX(4px);
            border-color: var(--primary);
            box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
        }

        .species-list-main {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .species-list-name {
            font-size: 1.1rem;
            font-weight: 600;
            color: var(--text-primary);
        }

        .species-list-internal {
            font-size: 0.85rem;
            color: var(--text-secondary);
            font-family: monospace;
        }

        .species-forms-grid {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: 12px;
        }

        .species-form-card {
            background: rgba(0, 0, 0, 0.35);
            border: 1px solid var(--border);
            border-left: none;
            border-radius: 6px;
            padding: 5px 10px;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-size: 0.75rem;
            transition: all 0.2s ease;
            cursor: pointer;
            position: relative;
        }
        
        .species-form-card::before {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            width: 4px;
            border-radius: 6px 0 0 6px;
            z-index: 1;
        }
        
        .species-form-card[data-has-dual-type="true"]::before {
            background: var(--border-gradient);
        }
        
        .species-form-card[data-has-dual-type="false"]::before {
            background: var(--border-color);
        }

        .species-form-card:hover {
            background: rgba(0, 0, 0, 0.5);
        }

        .species-form-name {
            color: rgba(255, 255, 255, 0.95);
            font-weight: 500;
        }

        .species-form-sprite {
            width: 48px;
            height: 48px;
            background-repeat: no-repeat;
            flex-shrink: 0;
            image-rendering: pixelated;
            image-rendering: -moz-crisp-edges;
            image-rendering: crisp-edges;
            display: block;
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 4px;
            background-color: rgba(0, 0, 0, 0.2);
        }
        
        .species-list-form-sprite {
            width: 64px;
            height: 64px;
            background-repeat: no-repeat;
            flex-shrink: 0;
            image-rendering: pixelated;
            image-rendering: -moz-crisp-edges;
            image-rendering: crisp-edges;
            display: block;
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 4px;
            background-color: rgba(0, 0, 0, 0.2);
        }

        .species-form-type-icons {
            display: flex;
            gap: 4px;
            align-items: center;
        }

        .species-form-type-icon {
            width: 32px;
            height: 14px;
            object-fit: contain;
        }

        .species-form-actions {
            display: flex;
            gap: 4px;
            align-items: center;
            margin-left: auto;
        }

        .action-btn-small {
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 4px;
            padding: 4px 6px;
            cursor: pointer;
            font-size: 0.85rem;
            transition: all 0.2s ease;
            line-height: 1;
        }

        .action-btn-small:hover {
            transform: translateY(-1px);
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        }

        .action-btn-small.edit-btn:hover {
            background: rgba(99, 102, 241, 0.2);
            border-color: #6366f1;
        }

        .action-btn-small.delete-btn:hover {
            background: rgba(239, 68, 68, 0.2);
            border-color: #ef4444;
        }

        .species-form-add {
            border-left: 4px solid var(--primary) !important;
            border-style: dashed !important;
            opacity: 0.7;
        }

        .species-form-add:hover {
            opacity: 1;
            border-color: var(--primary) !important;
        }

        .species-list-add {
            border-style: dashed !important;
            opacity: 0.7;
            border-left: 4px solid var(--primary) !important;
        }

        .species-list-add:hover {
            opacity: 1;
            border-color: var(--primary) !important;
            transform: translateX(4px);
            box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
        }

        .species-list-id {
            font-size: 0.9rem;
            color: var(--text-secondary);
            font-weight: 600;
            text-align: right;
            min-width: 50px;
        }

        .modal-audit-section {
            margin-top: 20px;
            padding-top: 20px;
            border-top: 2px solid var(--border);
        }
        .modal-audit-title {
            font-weight: 700;
            font-size: 0.95rem;
            margin-bottom: 12px;
            color: var(--text-primary);
        }
        .modal-audit-entry {
            margin-bottom: 12px;
            padding: 8px 0;
            border-bottom: 1px solid var(--border);
        }
        .modal-audit-entry:last-child { border-bottom: none; margin-bottom: 0; }
        .modal-audit-header {
            font-weight: 600;
            color: var(--text-secondary);
            font-size: 0.85rem;
        }
        .modal-audit-changes {
            margin-top: 6px;
            margin-left: 10px;
            font-size: 0.8rem;
            color: var(--text-secondary);
            word-wrap: break-word;
            overflow-wrap: break-word;
            max-width: 100%;
        }
        .modal-audit-empty { opacity: 0.7; font-size: 0.9rem; }
        .modal-audit-revert-btn {
            margin-top: 8px;
            padding: 6px 12px;
            font-size: 0.8rem;
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 6px;
            cursor: pointer;
            color: var(--text-secondary);
            transition: all 0.2s ease;
        }
        .modal-audit-revert-btn:hover {
            background: rgba(99, 102, 241, 0.2);
            border-color: #6366f1;
            color: #6366f1;
        }
