.barcode-category {
    cursor: pointer;
    transition: all 0.3s;
}
.barcode-category:hover {
    background-color: #f3f4f6;
}
.barcode-category.active {
    background-color: #dbeafe;
    border-left: 4px solid #2563eb;
}
.barcode-list {
    display: none;
    animation: slideDown 0.3s ease-out;
}
.barcode-list.show {
    display: block;
}
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.barcode-item {
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.2s;
}
.barcode-item:hover {
    background-color: #e5e7eb;
    padding-left: 24px;
}
.barcode-item.selected {
    background-color: #2563eb;
    color: white;
    font-weight: 600;
}
#barcodePreview {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}



.dice-3d {
    animation: rollDice 0.5s ease-in-out;
}
@keyframes rollDice {
    0% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(90deg) scale(1.1); }
    50% { transform: rotate(180deg) scale(0.9); }
    75% { transform: rotate(270deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); }
}
.dice-result {
    animation: popIn 0.3s ease-out;
}
@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}
.history-item {
    animation: slideIn 0.3s ease-out;
}
@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}






.hash-output {
    word-break: break-all;
}
.copy-animation {
    animation: copyPulse 0.3s ease-in-out;
}
@keyframes copyPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}




.key {
    transition: all 0.1s ease;
    user-select: none;
}
.key.pressed {
    transform: scale(0.95);
    background: linear-gradient(to bottom, #3b82f6, #2563eb);
    color: white;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}
.key.tested {
    background: linear-gradient(to bottom, #10b981, #059669);
    color: white;
}
.keyboard-layout {
    max-width: 1200px;
    margin: 0 auto;
}
@keyframes ripple {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}
.ripple-effect {
    animation: ripple 0.6s ease-out;
}




.info-card {
    transition: all 0.3s;
}
.info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}
.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.fade-in {
    animation: fadeIn 0.5s ease-in;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .5; }
}




#notepad {
    font-family: 'Courier New', Courier, monospace;
    resize: none;
}
.markdown-preview {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
}
.markdown-preview h1 { font-size: 2em; font-weight: bold; margin: 0.67em 0; }
.markdown-preview h2 { font-size: 1.5em; font-weight: bold; margin: 0.75em 0; }
.markdown-preview h3 { font-size: 1.17em; font-weight: bold; margin: 0.83em 0; }
.markdown-preview p { margin: 1em 0; }
.markdown-preview code { background: #f3f4f6; padding: 2px 6px; border-radius: 4px; }
.markdown-preview pre { background: #f3f4f6; padding: 1em; border-radius: 8px; overflow-x: auto; }
.markdown-preview ul, .markdown-preview ol { margin: 1em 0; padding-left: 2em; }
.markdown-preview a { color: #2563eb; text-decoration: underline; }
.saved-indicator {
    animation: fadeInOut 2s ease-in-out;
}
@keyframes fadeInOut {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}
.toolbar-btn {
    transition: all 0.2s;
}
.toolbar-btn:hover {
    transform: translateY(-2px);
}




.qr-card {
    transition: all 0.3s;
}
.qr-card:hover {
    transform: translateY(-2px);
}
.tab-btn {
    position: relative;
}
.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: #2563eb;
}



.match-highlight {
    background-color: #fef08a;
    padding: 2px 0;
    border-radius: 2px;
}
.pattern-btn {
    transition: all 0.2s;
}
.pattern-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.flag-checkbox:checked + label {
    background-color: #3b82f6;
    color: white;
}




.time-zone-card {
    transition: all 0.3s;
}
.time-zone-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}
.current-time {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.05em;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}
.time-separator {
    animation: pulse 2s ease-in-out infinite;
}




.operator-btn {
    transition: all 0.2s;
}
.operator-btn:active {
    transform: scale(0.95);
}
.variable-btn {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}
.logic-btn {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
}
.control-btn {
    background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
}
.number-btn {
    background: linear-gradient(135deg, #fecdd3 0%, #fda4af 100%);
}
table {
    border-collapse: separate;
    border-spacing: 0;
}
th, td {
    border: 1px solid #d1d5db;
}
th {
    background-color: #f3f4f6;
}
tr:hover td {
    background-color: #f9fafb;
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .keyboard-layout {
        overflow-x: auto;
        padding-bottom: 10px;
    }
    
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .hash-output {
        font-size: 14px;
        word-break: break-all;
    }
    
    .barcode-item {
        padding: 10px 12px;
    }
    
    #barcodePreview {
        overflow-x: auto;
        max-width: 100%;
    }
    
    #barcodePreview canvas,
    #barcodePreview svg,
    #barcodePreview img {
        max-width: 100%;
        height: auto;
    }
}

@media (max-width: 640px) {
    .markdown-preview {
        font-size: 14px;
    }
    
    .markdown-preview pre {
        overflow-x: auto;
        font-size: 12px;
    }
}

/* Ensure no horizontal scroll */
body {
    overflow-x: hidden;
}

* {
    box-sizing: border-box;
}