/* Binary to Decimal Converter Specific Styles */

/* Gradient Text for Tool Title */
.gradient-text-binary {
    background: linear-gradient(135deg, #4f46e5, #6366f1, #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 2.5rem;
    font-weight: 700;
}

/* Tab styling */
.tab-btn {
    transition: all 0.3s ease;
}

.tab-btn.active {
    background-color: #4f46e5;
    color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tab-btn:not(.active):hover {
    background-color: rgba(79, 70, 229, 0.1);
}

/* Input focus styles */
input:focus {
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

/* Convert button hover effect */
.convert-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Result value styling */
.result-value {
    font-family: 'Courier New', monospace;
    overflow-x: auto;
    white-space: nowrap;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
}

/* Copy button states */
.copy-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.copy-success {
    color: #10b981;
}

/* Binary blocks visualization */
.binary-block {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    min-width: 3rem;
    margin: 0.25rem;
    animation: fadeIn 0.5s ease forwards;
}

.binary-digit {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
    transition: all 0.3s ease;
}

.binary-value {
    font-size: 0.75rem;
    color: #6b7280;
}

.binary-position {
    font-size: 0.7rem;
    color: #4f46e5;
    font-weight: 600;
}

.digit-1 {
    background-color: rgba(79, 70, 229, 0.2);
    border: 1px solid rgba(79, 70, 229, 0.5);
    color: #4f46e5;
}

.digit-0 {
    background-color: rgba(209, 213, 219, 0.3);
    border: 1px solid rgba(156, 163, 175, 0.3);
    color: #6b7280;
}

.digit-highlight {
    transform: scale(1.1);
    box-shadow: 0 0 8px rgba(79, 70, 229, 0.4);
}

/* Animation for binary blocks */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.block-animated {
    animation-duration: 0.5s;
    animation-fill-mode: both;
}

/* Steps in conversion explanation */
.conversion-step {
    padding: 0.75rem;
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
    border-left: 3px solid #4f46e5;
    background-color: rgba(79, 70, 229, 0.05);
    animation: fadeIn 0.5s ease forwards;
}

.step-number {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    background-color: #4f46e5;
    color: white;
    border-radius: 50%;
    text-align: center;
    font-size: 0.875rem;
    line-height: 1.5rem;
    margin-right: 0.5rem;
}

.remainder-highlight {
    font-weight: 600;
    color: #4f46e5;
    background-color: rgba(79, 70, 229, 0.1);
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
}

/* Error message animation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .gradient-text-binary {
        font-size: 2rem;
    }
    
    .binary-blocks {
        gap: 0.25rem;
    }
    
    .binary-block {
        min-width: 2.5rem;
    }
    
    .binary-digit {
        width: 2rem;
        height: 2rem;
        font-size: 1rem;
    }
    
    .binary-value, .binary-position {
        font-size: 0.65rem;
    }
} 