/* Main Calculator Container */
.binary-calculator-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.binary-calculator-container h2 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 20px;
    font-size: 24px;
}

.binary-calculator-container h2 i {
    margin-right: 10px;
    color: #3498db;
}

/* Tab Styles */
.conversion-tabs {
    display: flex;
    margin-bottom: 0;
    border-bottom: 1px solid #ddd;
    flex-wrap: wrap;
}

.tab-button {
    padding: 12px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #7f8c8d;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    margin-right: 5px;
}

.tab-button:hover {
    color: #3498db;
    background-color: #f1f8fe;
}

.tab-button.active {
    color: #3498db;
    border-bottom: 3px solid #3498db;
    background-color: #fff;
}

.tab-content {
    display: none;
    padding: 20px;
    background-color: #fff;
    border-radius: 0 8px 8px 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.tab-content.active {
    display: block;
}

/* Input Groups */
.input-group {
    margin-bottom: 0;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #34495e;
}

.input-group label i {
    margin-right: 8px;
    width: 20px;
    color: #7f8c8d;
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
    margin-bottom: 15px;
}

.input-group input:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.convert-btn {
    width: 100%;
    padding: 12px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.convert-btn:hover {
    background-color: #2980b9;
}

.convert-btn i {
    margin-right: 8px;
}

.error-message {
    color: #e74c3c;
    margin: 10px 0;
    font-size: 14px;
    text-align: center;
    min-height: 20px;
    padding: 10px;
    background-color: #fde8e8;
    border-radius: 4px;
    display: none;
}

/* Results Section */
.binary-results {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.binary-results h3 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 20px;
    text-align: center;
}

.binary-results h3 i {
    margin-right: 10px;
    color: #27ae60;
}

.result-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 4px;
    align-items: center;
}

.result-label {
    font-weight: 600;
    color: #7f8c8d;
}

.result-value {
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    color: #2c3e50;
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .conversion-tabs {
        flex-direction: column;
        border-bottom: none;
    }
    
    .tab-button {
        border-bottom: none;
        border-left: 3px solid transparent;
        margin-right: 0;
        margin-bottom: 5px;
        text-align: left;
    }
    
    .tab-button.active {
        border-bottom: none;
        border-left: 3px solid #3498db;
    }
    
    .tab-content {
        border-radius: 0 0 8px 8px;
    }
    
    .result-box {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .binary-calculator-container {
        padding: 15px;
    }
    
    .tab-button {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .input-group input {
        padding: 10px 12px;
    }
    
    .convert-btn {
        padding: 10px;
        font-size: 14px;
    }
}